{"id":976605,"date":"2024-12-27T06:22:59","date_gmt":"2024-12-26T22:22:59","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/976605.html"},"modified":"2024-12-27T06:23:02","modified_gmt":"2024-12-26T22:23:02","slug":"python%e5%a6%82%e4%bd%95%e7%a1%ae%e5%ae%9a%e5%b7%a5%e4%bd%9c%e7%a9%ba%e9%97%b4","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/976605.html","title":{"rendered":"python\u5982\u4f55\u786e\u5b9a\u5de5\u4f5c\u7a7a\u95f4"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24202233\/5ab36ffa-f391-49d9-a5e8-6f66ca4e0ad3.webp\" alt=\"python\u5982\u4f55\u786e\u5b9a\u5de5\u4f5c\u7a7a\u95f4\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u786e\u5b9a\u5de5\u4f5c\u7a7a\u95f4\uff0c\u53ef\u4ee5\u4f7f\u7528os\u5e93\u7684getcwd()\u51fd\u6570\u3001chdir()\u51fd\u6570\u3001\u4ee5\u53ca\u67e5\u770bsys.path\u6a21\u5757\u8def\u5f84\u7b49\u65b9\u5f0f\u3002\u901a\u8fc7getcwd()\u51fd\u6570\uff0c\u53ef\u4ee5\u83b7\u53d6\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\uff1b\u4f7f\u7528chdir()\u51fd\u6570\u53ef\u4ee5\u6539\u53d8\u5de5\u4f5c\u76ee\u5f55\uff1b\u800c\u901a\u8fc7sys.path\u6a21\u5757\u8def\u5f84\u53ef\u4ee5\u67e5\u770bPython\u89e3\u91ca\u5668\u7684\u641c\u7d22\u8def\u5f84\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u786e\u5b9a\u548c\u7ba1\u7406Python\u7684\u5de5\u4f5c\u7a7a\u95f4\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528os\u5e93\u83b7\u53d6\u548c\u8bbe\u7f6e\u5de5\u4f5c\u7a7a\u95f4<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0cos\u5e93\u63d0\u4f9b\u4e86\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u4ea4\u4e92\u7684\u7b80\u5355\u65b9\u6cd5\u3002\u901a\u8fc7\u8fd9\u4e2a\u5e93\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u4ee5\u53ca\u66f4\u6539\u5de5\u4f5c\u76ee\u5f55\uff0c\u4ece\u800c\u5e2e\u52a9\u6211\u4eec\u7ba1\u7406\u5de5\u4f5c\u7a7a\u95f4\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528os\u5e93\u4e2d\u7684getcwd()\u51fd\u6570\u53ef\u4ee5\u83b7\u53d6\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u3002\u8fd9\u4e2a\u51fd\u6570\u4e0d\u9700\u8981\u4efb\u4f55\u53c2\u6570\uff0c\u76f4\u63a5\u8fd4\u56de\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u8868\u793a\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/h2>\n<p>current_directory = os.getcwd()<\/p>\n<p>print(&quot;\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55:&quot;, current_directory)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u6539\u53d8\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/li>\n<\/ol>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u5728\u4e0d\u540c\u7684\u76ee\u5f55\u4e4b\u95f4\u5207\u6362\u5de5\u4f5c\uff0c\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528os\u5e93\u4e2d\u7684chdir()\u51fd\u6570\u6765\u6539\u53d8\u5de5\u4f5c\u76ee\u5f55\u3002\u901a\u8fc7\u4f20\u5165\u4e00\u4e2a\u65b0\u7684\u8def\u5f84\u4f5c\u4e3a\u53c2\u6570\uff0c\u5373\u53ef\u66f4\u6539\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u6539\u53d8\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/h2>\n<p>os.chdir(&#39;\/path\/to\/new\/directory&#39;)<\/p>\n<h2><strong>\u9a8c\u8bc1\u662f\u5426\u6539\u53d8\u6210\u529f<\/strong><\/h2>\n<p>current_directory = os.getcwd()<\/p>\n<p>print(&quot;\u65b0\u5de5\u4f5c\u76ee\u5f55:&quot;, current_directory)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u6ce8\u610f<\/strong>\uff1a\u5728\u4f7f\u7528chdir()\u51fd\u6570\u65f6\uff0c\u8981\u786e\u4fdd\u6307\u5b9a\u7684\u8def\u5f84\u5b58\u5728\uff0c\u5426\u5219\u4f1a\u5f15\u53d1FileNotFoundError\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u67e5\u770bPython\u89e3\u91ca\u5668\u7684\u641c\u7d22\u8def\u5f84<\/p>\n<\/p>\n<p><p>Python\u5728\u6267\u884c\u5bfc\u5165\u8bed\u53e5\u65f6\uff0c\u4f1a\u6839\u636esys.path\u4e2d\u7684\u8def\u5f84\u6765\u641c\u7d22\u6a21\u5757\u3002sys.path\u662f\u4e00\u4e2a\u5217\u8868\uff0c\u5305\u542b\u4e86Python\u89e3\u91ca\u5668\u4f1a\u641c\u7d22\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u67e5\u770bsys.path\u5185\u5bb9<\/strong><\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u67e5\u770bsys.path\u7684\u5185\u5bb9\uff0c\u6211\u4eec\u53ef\u4ee5\u4e86\u89e3Python\u89e3\u91ca\u5668\u5728\u5bfc\u5165\u6a21\u5757\u65f6\u4f1a\u641c\u7d22\u54ea\u4e9b\u8def\u5f84\u3002\u8fd9\u5bf9\u8c03\u8bd5\u6a21\u5757\u5bfc\u5165\u95ee\u9898\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<h2><strong>\u67e5\u770bPython\u641c\u7d22\u8def\u5f84<\/strong><\/h2>\n<p>for path in sys.path:<\/p>\n<p>    print(path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4fee\u6539sys.path<\/strong><\/li>\n<\/ol>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u4fee\u6539sys.path\uff0c\u4ece\u800c\u6539\u53d8\u6a21\u5757\u7684\u641c\u7d22\u8def\u5f84\u3002\u8fd9\u901a\u5e38\u7528\u4e8e\u5728\u4ee3\u7801\u4e2d\u4e34\u65f6\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6a21\u5757\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<h2><strong>\u6dfb\u52a0\u65b0\u8def\u5f84\u5230sys.path<\/strong><\/h2>\n<p>sys.path.append(&#39;\/path\/to\/custom\/module&#39;)<\/p>\n<h2><strong>\u9a8c\u8bc1\u662f\u5426\u6dfb\u52a0\u6210\u529f<\/strong><\/h2>\n<p>for path in sys.path:<\/p>\n<p>    print(path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528os.path\u6a21\u5757\u8fdb\u884c\u8def\u5f84\u64cd\u4f5c<\/p>\n<\/p>\n<p><p>os.path\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e9b\u6709\u7528\u7684\u51fd\u6570\uff0c\u7528\u4e8e\u5904\u7406\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u8def\u5f84\u3002\u8fd9\u4e9b\u51fd\u6570\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ba1\u7406\u548c\u64cd\u4f5c\u5de5\u4f5c\u7a7a\u95f4\u4e2d\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u8fde\u63a5\u8def\u5f84<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528os.path.join()\u51fd\u6570\u53ef\u4ee5\u667a\u80fd\u5730\u8fde\u63a5\u4e0d\u540c\u7684\u8def\u5f84\u7247\u6bb5\uff0c\u751f\u6210\u4e00\u4e2a\u5b8c\u6574\u7684\u8def\u5f84\u3002\u8be5\u51fd\u6570\u4f1a\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u7684\u8def\u5f84\u5206\u9694\u7b26\u81ea\u52a8\u5904\u7406\u8fde\u63a5\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u8fde\u63a5\u8def\u5f84\u7247\u6bb5<\/strong><\/h2>\n<p>directory = &#39;\/path\/to\/directory&#39;<\/p>\n<p>filename = &#39;file.txt&#39;<\/p>\n<p>full_path = os.path.join(directory, filename)<\/p>\n<p>print(&quot;\u5b8c\u6574\u8def\u5f84:&quot;, full_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u68c0\u67e5\u8def\u5f84\u662f\u5426\u5b58\u5728<\/strong><\/li>\n<\/ol>\n<p><p>os.path.exists()\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u68c0\u67e5\u6307\u5b9a\u7684\u8def\u5f84\u662f\u5426\u5b58\u5728\u3002\u8fd9\u5728\u6267\u884c\u6587\u4ef6\u6216\u76ee\u5f55\u64cd\u4f5c\u4e4b\u524d\u662f\u975e\u5e38\u6709\u7528\u7684\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u68c0\u67e5\u8def\u5f84\u662f\u5426\u5b58\u5728<\/strong><\/h2>\n<p>path = &#39;\/path\/to\/check&#39;<\/p>\n<p>if os.path.exists(path):<\/p>\n<p>    print(&quot;\u8def\u5f84\u5b58\u5728&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u8def\u5f84\u4e0d\u5b58\u5728&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u5224\u65ad\u8def\u5f84\u7c7b\u578b<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528os.path.isdir()\u548cos.path.isfile()\u51fd\u6570\u53ef\u4ee5\u5206\u522b\u5224\u65ad\u4e00\u4e2a\u8def\u5f84\u662f\u76ee\u5f55\u8fd8\u662f\u6587\u4ef6\u3002\u8fd9\u5bf9\u4e8e\u9700\u8981\u533a\u5206\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u64cd\u4f5c\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u5224\u65ad\u8def\u5f84\u7c7b\u578b<\/strong><\/h2>\n<p>path = &#39;\/path\/to\/check&#39;<\/p>\n<p>if os.path.isdir(path):<\/p>\n<p>    print(&quot;\u8fd9\u662f\u4e00\u4e2a\u76ee\u5f55&quot;)<\/p>\n<p>elif os.path.isfile(path):<\/p>\n<p>    print(&quot;\u8fd9\u662f\u4e00\u4e2a\u6587\u4ef6&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u672a\u77e5\u7c7b\u578b&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u7ba1\u7406\u5de5\u4f5c\u7a7a\u95f4<\/p>\n<\/p>\n<p><p>\u9664\u4e86Python\u5185\u7f6e\u7684os\u548csys\u6a21\u5757\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5e93\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ba1\u7406\u5de5\u4f5c\u7a7a\u95f4\u3002\u4f8b\u5982\uff0cpathlib\u5e93\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\uff0c\u4f7f\u5f97\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u6613\u8bfb\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528pathlib\u5e93<\/strong><\/li>\n<\/ol>\n<p><p>pathlib\u5e93\u662fPython 3.4\u5f15\u5165\u7684\u65b0\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u3002\u901a\u8fc7pathlib\u5e93\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u8fdb\u884c\u8def\u5f84\u7684\u6784\u5efa\u3001\u904d\u5386\u548c\u6587\u4ef6\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/h2>\n<p>current_directory = Path.cwd()<\/p>\n<p>print(&quot;\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55:&quot;, current_directory)<\/p>\n<h2><strong>\u6539\u53d8\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/h2>\n<p>new_directory = Path(&#39;\/path\/to\/new\/directory&#39;)<\/p>\n<p>Path.cwd().chdir(new_directory)<\/p>\n<h2><strong>\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6<\/strong><\/h2>\n<p>for file in new_directory.iterdir():<\/p>\n<p>    print(file)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4e0eos\u5e93\u7684\u5bf9\u6bd4<\/strong><\/li>\n<\/ol>\n<p><p>\u76f8\u6bd4\u4e8eos\u5e93\uff0cpathlib\u5e93\u63d0\u4f9b\u4e86\u4e00\u79cd\u66f4\u4f18\u96c5\u7684\u65b9\u5f0f\u6765\u5904\u7406\u8def\u5f84\u3002\u5b83\u5c06\u8def\u5f84\u64cd\u4f5c\u5c01\u88c5\u4e3a\u5bf9\u8c61\u65b9\u6cd5\uff0c\u4f7f\u5f97\u4ee3\u7801\u66f4\u5177\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>from pathlib import Path<\/p>\n<h2><strong>\u4f7f\u7528os\u5e93\u83b7\u53d6\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>filename_os = os.path.basename(&#39;\/path\/to\/file.txt&#39;)<\/p>\n<p>print(&quot;\u4f7f\u7528os\u5e93\u83b7\u53d6\u6587\u4ef6\u540d:&quot;, filename_os)<\/p>\n<h2><strong>\u4f7f\u7528pathlib\u5e93\u83b7\u53d6\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>filename_pathlib = Path(&#39;\/path\/to\/file.txt&#39;).name<\/p>\n<p>print(&quot;\u4f7f\u7528pathlib\u5e93\u83b7\u53d6\u6587\u4ef6\u540d:&quot;, filename_pathlib)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u4e2d\u6709\u6548\u5730\u786e\u5b9a\u548c\u7ba1\u7406\u5de5\u4f5c\u7a7a\u95f4\u3002\u65e0\u8bba\u662f\u4f7f\u7528\u5185\u7f6e\u7684os\u548csys\u6a21\u5757\uff0c\u8fd8\u662f\u5229\u7528\u7b2c\u4e09\u65b9\u5e93pathlib\uff0c\u6211\u4eec\u90fd\u80fd\u7075\u6d3b\u5730\u5904\u7406\u8def\u5f84\u548c\u76ee\u5f55\u64cd\u4f5c\uff0c\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u5f00\u53d1\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u67e5\u770b\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u6765\u67e5\u770b\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002\u901a\u8fc7\u8c03\u7528<code>os.getcwd()<\/code>\u51fd\u6570\uff0c\u60a8\u53ef\u4ee5\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u7a7a\u95f4\u7684\u8def\u5f84\u3002\u8fd9\u5bf9\u4e8e\u786e\u8ba4\u60a8\u5728\u6267\u884c\u6587\u4ef6\u64cd\u4f5c\u65f6\u6240\u5904\u7684\u76ee\u5f55\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<p><strong>\u5982\u4f55\u66f4\u6539Python\u7684\u5de5\u4f5c\u7a7a\u95f4\uff1f<\/strong><br \/>\u8981\u66f4\u6539\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.chdir(path)<\/code>\u51fd\u6570\uff0c\u5176\u4e2d<code>path<\/code>\u662f\u60a8\u60f3\u8981\u5207\u6362\u5230\u7684\u65b0\u76ee\u5f55\u7684\u8def\u5f84\u3002\u786e\u4fdd\u60a8\u63d0\u4f9b\u7684\u8def\u5f84\u662f\u6709\u6548\u7684\uff0c\u8fd9\u6837\u60a8\u5c31\u53ef\u4ee5\u5728\u65b0\u7684\u5de5\u4f5c\u7a7a\u95f4\u4e2d\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5217\u51fa\u5de5\u4f5c\u7a7a\u95f4\u4e2d\u7684\u6587\u4ef6\uff1f<\/strong><br \/>\u4f7f\u7528<code>os.listdir(path)<\/code>\u51fd\u6570\uff0c\u60a8\u53ef\u4ee5\u5217\u51fa\u6307\u5b9a\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u3002\u5982\u679c\u60a8\u4e0d\u63d0\u4f9b\u8def\u5f84\u53c2\u6570\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5c06\u5217\u51fa\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\u7684\u5185\u5bb9\u3002\u8fd9\u4f7f\u5f97\u7ba1\u7406\u6587\u4ef6\u53d8\u5f97\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u786e\u5b9a\u5de5\u4f5c\u7a7a\u95f4\uff0c\u53ef\u4ee5\u4f7f\u7528os\u5e93\u7684getcwd()\u51fd\u6570\u3001chdir()\u51fd\u6570\u3001\u4ee5\u53ca\u67e5\u770bsys.pat [&hellip;]","protected":false},"author":3,"featured_media":976615,"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\/976605"}],"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=976605"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/976605\/revisions"}],"predecessor-version":[{"id":976621,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/976605\/revisions\/976621"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/976615"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=976605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=976605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=976605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}