{"id":1095192,"date":"2025-01-08T14:48:41","date_gmt":"2025-01-08T06:48:41","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1095192.html"},"modified":"2025-01-08T14:48:43","modified_gmt":"2025-01-08T06:48:43","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e6%96%b0%e5%bb%ba%e6%96%87%e4%bb%b6%e5%a4%b9-3","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1095192.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u65b0\u5efa\u6587\u4ef6\u5939"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210942\/6386046a-9151-4f12-9f2d-9f8fa12c37d8.webp\" alt=\"python\u4e2d\u5982\u4f55\u65b0\u5efa\u6587\u4ef6\u5939\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u65b0\u5efa\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u6700\u5e38\u7528\u7684\u662f\u4f7f\u7528os\u6a21\u5757\u3001pathlib\u6a21\u5757\u3001shutil\u6a21\u5757\u3002<\/strong> \u5176\u4e2d\uff0c<strong>\u4f7f\u7528os\u6a21\u5757\u662f\u6700\u5e38\u89c1\u7684\u65b9\u5f0f<\/strong>\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u76f4\u63a5\u4e14\u7b80\u5355\u7684\u521b\u5efa\u76ee\u5f55\u7684\u65b9\u6cd5\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u65b0\u5efa\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528os\u6a21\u5757<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528os\u6a21\u5757\u521b\u5efa\u6587\u4ef6\u5939\u662fPython\u4e2d\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u3002os\u6a21\u5757\u63d0\u4f9b\u4e86\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u64cd\u4f5c\u7684\u4e00\u7cfb\u5217\u51fd\u6570\uff0c\u5176\u4e2d<code>os.mkdir()<\/code>\u548c<code>os.makedirs()<\/code>\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u521b\u5efa\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>1\u3001os.mkdir()<\/h4>\n<\/p>\n<p><p><code>os.mkdir()<\/code>\u51fd\u6570\u7528\u4e8e\u521b\u5efa\u5355\u5c42\u76ee\u5f55\u3002\u5982\u679c\u76ee\u5f55\u5df2\u5b58\u5728\uff0c\u5219\u4f1a\u629b\u51faFileExistsError\u5f02\u5e38\u3002\u5982\u679c\u7236\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u4e5f\u4f1a\u629b\u51faFileNotFoundError\u5f02\u5e38\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def create_folder(path):<\/p>\n<p>    try:<\/p>\n<p>        os.mkdir(path)<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; created&quot;)<\/p>\n<p>    except FileExistsError:<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; already exists&quot;)<\/p>\n<p>    except FileNotFoundError:<\/p>\n<p>        print(f&quot;Parent directory of &#39;{path}&#39; does not exist&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>create_folder(&quot;new_folder&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c<code>os.mkdir(&quot;new_folder&quot;)<\/code>\u5c06\u5c1d\u8bd5\u5728\u5f53\u524d\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>new_folder<\/code>\u7684\u6587\u4ef6\u5939\u3002\u5982\u679c\u6587\u4ef6\u5939\u5df2\u5b58\u5728\u6216\u7236\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u5c06\u8f93\u51fa\u76f8\u5e94\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h4>2\u3001os.makedirs()<\/h4>\n<\/p>\n<p><p><code>os.makedirs()<\/code>\u51fd\u6570\u7528\u4e8e\u9012\u5f52\u5730\u521b\u5efa\u76ee\u5f55\u3002\u5982\u679c\u4e2d\u95f4\u7684\u67d0\u4e9b\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u4f1a\u81ea\u52a8\u521b\u5efa\u8fd9\u4e9b\u76ee\u5f55\u3002\u5b83\u4e0d\u4f1a\u56e0\u4e3a\u76ee\u5f55\u5df2\u7ecf\u5b58\u5728\u800c\u629b\u51fa\u5f02\u5e38\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def create_folder_recursively(path):<\/p>\n<p>    try:<\/p>\n<p>        os.makedirs(path, exist_ok=True)<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; created successfully&quot;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;An error occurred: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>create_folder_recursively(&quot;parent_folder\/new_folder&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>os.makedirs(&quot;parent_folder\/new_folder&quot;, exist_ok=True)<\/code>\u5c06\u9012\u5f52\u5730\u521b\u5efa<code>parent_folder<\/code>\u548c<code>new_folder<\/code>\uff0c\u5373\u4f7f\u8fd9\u4e9b\u76ee\u5f55\u4e2d\u7684\u67d0\u4e9b\u76ee\u5f55\u4e0d\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528pathlib\u6a21\u5757<\/h3>\n<\/p>\n<p><p><code>pathlib<\/code>\u6a21\u5757\u662fPython 3.4\u5f15\u5165\u7684\uff0c\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\u3002\u4f7f\u7528<code>pathlib.Path.mkdir()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u65b9\u4fbf\u5730\u521b\u5efa\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5355\u5c42\u76ee\u5f55\u521b\u5efa<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>pathlib.Path.mkdir()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u521b\u5efa\u5355\u5c42\u76ee\u5f55\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>def create_folder_pathlib(path):<\/p>\n<p>    try:<\/p>\n<p>        Path(path).mkdir()<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; created&quot;)<\/p>\n<p>    except FileExistsError:<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; already exists&quot;)<\/p>\n<p>    except FileNotFoundError:<\/p>\n<p>        print(f&quot;Parent directory of &#39;{path}&#39; does not exist&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>create_folder_pathlib(&quot;new_folder&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u9012\u5f52\u521b\u5efa\u76ee\u5f55<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>pathlib.Path.mkdir(parents=True, exist_ok=True)<\/code>\u53ef\u4ee5\u9012\u5f52\u521b\u5efa\u76ee\u5f55\uff0c\u5e76\u4e14\u4e0d\u4f1a\u56e0\u4e3a\u76ee\u5f55\u5df2\u5b58\u5728\u800c\u629b\u51fa\u5f02\u5e38\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>def create_folder_pathlib_recursively(path):<\/p>\n<p>    try:<\/p>\n<p>        Path(path).mkdir(parents=True, exist_ok=True)<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; created successfully&quot;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;An error occurred: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>create_folder_pathlib_recursively(&quot;parent_folder\/new_folder&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528shutil\u6a21\u5757<\/h3>\n<\/p>\n<p><p>\u5c3d\u7ba1<code>shutil<\/code>\u6a21\u5757\u4e3b\u8981\u7528\u4e8e\u9ad8\u7ea7\u6587\u4ef6\u64cd\u4f5c\uff08\u5982\u590d\u5236\u3001\u79fb\u52a8\u3001\u5220\u9664\u6587\u4ef6\uff09\uff0c\u5b83\u4e5f\u53ef\u4ee5\u7528\u6765\u521b\u5efa\u76ee\u5f55\u3002<code>shutil<\/code>\u6a21\u5757\u7684<code>copytree<\/code>\u65b9\u6cd5\u53ef\u4ee5\u9012\u5f52\u5730\u590d\u5236\u6574\u4e2a\u76ee\u5f55\u6811\uff0c\u4ece\u800c\u95f4\u63a5\u5730\u521b\u5efa\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import shutil<\/p>\n<p>import os<\/p>\n<p>def create_folder_shutil(source, destination):<\/p>\n<p>    if not os.path.exists(destination):<\/p>\n<p>        shutil.copytree(source, destination)<\/p>\n<p>        print(f&quot;Directory &#39;{destination}&#39; created from &#39;{source}&#39;&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(f&quot;Directory &#39;{destination}&#39; already exists&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>create_folder_shutil(&quot;existing_folder&quot;, &quot;new_folder&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c<code>shutil.copytree(&quot;existing_folder&quot;, &quot;new_folder&quot;)<\/code>\u5c06\u9012\u5f52\u5730\u590d\u5236<code>existing_folder<\/code>\u53ca\u5176\u6240\u6709\u5185\u5bb9\u5230<code>new_folder<\/code>\uff0c\u4ece\u800c\u521b\u5efa\u65b0\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5f02\u5e38\u5904\u7406\u548c\u6743\u9650\u95ee\u9898<\/h3>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u76ee\u5f55\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\u548c\u6743\u9650\u95ee\u9898\u3002\u4e3a\u4e86\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\uff0c\u5efa\u8bae\u5728\u521b\u5efa\u76ee\u5f55\u65f6\u8fdb\u884c\u5f02\u5e38\u5904\u7406\uff0c\u5e76\u68c0\u67e5\u5f53\u524d\u7528\u6237\u662f\u5426\u5177\u6709\u8db3\u591f\u7684\u6743\u9650\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5e38\u89c1\u5f02\u5e38\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u76ee\u5f55\u65f6\uff0c\u5e38\u89c1\u7684\u5f02\u5e38\u5305\u62ec<code>FileExistsError<\/code>\u3001<code>FileNotFoundError<\/code>\u548c<code>PermissionError<\/code>\u3002\u53ef\u4ee5\u901a\u8fc7\u6355\u83b7\u8fd9\u4e9b\u5f02\u5e38\u6765\u5904\u7406\u4e0d\u540c\u7684\u9519\u8bef\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def create_folder_with_exceptions(path):<\/p>\n<p>    try:<\/p>\n<p>        os.makedirs(path, exist_ok=True)<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; created successfully&quot;)<\/p>\n<p>    except FileExistsError:<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; already exists&quot;)<\/p>\n<p>    except FileNotFoundError:<\/p>\n<p>        print(f&quot;Parent directory of &#39;{path}&#39; does not exist&quot;)<\/p>\n<p>    except PermissionError:<\/p>\n<p>        print(f&quot;Permission denied: unable to create directory &#39;{path}&#39;&quot;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;An unexpected error occurred: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>create_folder_with_exceptions(&quot;parent_folder\/new_folder&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6743\u9650\u68c0\u67e5<\/h4>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u76ee\u5f55\u524d\uff0c\u53ef\u4ee5\u68c0\u67e5\u5f53\u524d\u7528\u6237\u662f\u5426\u5177\u6709\u521b\u5efa\u76ee\u5f55\u7684\u6743\u9650\u3002\u901a\u8fc7<code>os.access()<\/code>\u51fd\u6570\u53ef\u4ee5\u68c0\u67e5\u6307\u5b9a\u8def\u5f84\u662f\u5426\u5177\u6709\u7279\u5b9a\u6743\u9650\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def has_write_permission(path):<\/p>\n<p>    return os.access(path, os.W_OK)<\/p>\n<p>def create_folder_with_permission_check(path):<\/p>\n<p>    if not has_write_permission(os.path.dirname(path)):<\/p>\n<p>        print(f&quot;Permission denied: unable to create directory &#39;{path}&#39;&quot;)<\/p>\n<p>        return<\/p>\n<p>    try:<\/p>\n<p>        os.makedirs(path, exist_ok=True)<\/p>\n<p>        print(f&quot;Directory &#39;{path}&#39; created successfully&quot;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;An error occurred: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>create_folder_with_permission_check(&quot;parent_folder\/new_folder&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u4e2d\u521b\u5efa\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\u4e09\u79cd\uff1a\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u3001<code>pathlib<\/code>\u6a21\u5757\u3001<code>shutil<\/code>\u6a21\u5757\u3002<strong>\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u662f\u6700\u5e38\u89c1\u548c\u6700\u76f4\u63a5\u7684\u65b9\u6cd5<\/strong>\uff0c<code>pathlib<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\uff0c<code>shutil<\/code>\u6a21\u5757\u5219\u4e3b\u8981\u7528\u4e8e\u9ad8\u7ea7\u6587\u4ef6\u64cd\u4f5c\u3002\u4e3a\u4e86\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\uff0c\u5efa\u8bae\u5728\u521b\u5efa\u76ee\u5f55\u65f6\u8fdb\u884c\u5f02\u5e38\u5904\u7406\uff0c\u5e76\u68c0\u67e5\u5f53\u524d\u7528\u6237\u662f\u5426\u5177\u6709\u8db3\u591f\u7684\u6743\u9650\u3002\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u76ee\u5f55\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u521b\u5efa\u65b0\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u4e2d\u7684<code>mkdir()<\/code>\u6216<code>makedirs()<\/code>\u51fd\u6570\u3002<code>mkdir()<\/code>\u7528\u4e8e\u521b\u5efa\u5355\u4e2a\u6587\u4ef6\u5939\uff0c\u800c<code>makedirs()<\/code>\u5219\u53ef\u4ee5\u521b\u5efa\u591a\u5c42\u76ee\u5f55\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\n\n# \u521b\u5efa\u5355\u4e2a\u6587\u4ef6\u5939\nos.mkdir(&#39;new_folder&#39;)\n\n# \u521b\u5efa\u591a\u5c42\u6587\u4ef6\u5939\nos.makedirs(&#39;parent_folder\/child_folder&#39;)\n<\/code><\/pre>\n<p><strong>\u5728\u521b\u5efa\u6587\u4ef6\u5939\u65f6\uff0c\u5982\u4f55\u5904\u7406\u5df2\u5b58\u5728\u7684\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u521b\u5efa\u6587\u4ef6\u5939\u65f6\uff0c\u5982\u679c\u76ee\u6807\u6587\u4ef6\u5939\u5df2\u7ecf\u5b58\u5728\uff0c\u4f1a\u5f15\u53d1<code>FileExistsError<\/code>\u3002\u53ef\u4ee5\u5728\u521b\u5efa\u4e4b\u524d\u5148\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728\uff0c\u6216\u8005\u4f7f\u7528<code>exist_ok=True<\/code>\u53c2\u6570\u6765\u907f\u514d\u9519\u8bef\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">os.makedirs(&#39;new_folder&#39;, exist_ok=True)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u5373\u4f7f\u6587\u4ef6\u5939\u5df2\u5b58\u5728\uff0c\u4e5f\u4e0d\u4f1a\u629b\u51fa\u5f02\u5e38\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u6307\u5b9a\u8def\u5f84\u4e0b\u521b\u5efa\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u53ef\u4ee5\u5728<code>mkdir()<\/code>\u6216<code>makedirs()<\/code>\u51fd\u6570\u4e2d\u6307\u5b9a\u5b8c\u6574\u7684\u8def\u5f84\u6765\u521b\u5efa\u6587\u4ef6\u5939\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">os.makedirs(&#39;\/path\/to\/directory\/new_folder&#39;)\n<\/code><\/pre>\n<p>\u786e\u4fdd\u6307\u5b9a\u7684\u8def\u5f84\u662f\u6709\u6548\u7684\uff0c\u5e76\u4e14\u4f60\u6709\u6743\u9650\u5728\u8be5\u4f4d\u7f6e\u521b\u5efa\u6587\u4ef6\u5939\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u65b0\u5efa\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u6700\u5e38\u7528\u7684\u662f\u4f7f\u7528os\u6a21\u5757\u3001pathlib\u6a21\u5757\u3001shutil\u6a21\u5757\u3002 \u5176\u4e2d [&hellip;]","protected":false},"author":3,"featured_media":1095197,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1095192"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1095192"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1095192\/revisions"}],"predecessor-version":[{"id":1095201,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1095192\/revisions\/1095201"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1095197"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1095192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1095192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1095192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}