{"id":994565,"date":"2024-12-27T08:56:38","date_gmt":"2024-12-27T00:56:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/994565.html"},"modified":"2024-12-27T08:56:41","modified_gmt":"2024-12-27T00:56:41","slug":"python%e5%a6%82%e4%bd%95%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e4%bd%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/994565.html","title":{"rendered":"python\u5982\u4f55\u83b7\u53d6\u6587\u4ef6\u4f4d\u7f6e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25071503\/2c7b7f4e-473e-49f7-9f5b-4c346975c45f.webp\" alt=\"python\u5982\u4f55\u83b7\u53d6\u6587\u4ef6\u4f4d\u7f6e\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python\u4e2d\u83b7\u53d6\u6587\u4ef6\u7684\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u4f7f\u7528os\u6a21\u5757\u7684\u8def\u5f84\u64cd\u4f5c\u51fd\u6570\u3001\u5229\u7528os.path.abspath()\u83b7\u53d6\u7edd\u5bf9\u8def\u5f84\u3001\u4f7f\u7528os.path.dirname()\u83b7\u53d6\u76ee\u5f55\u8def\u5f84<\/strong>\u3002\u5176\u4e2d\uff0cos.path.abspath()\u662f\u6700\u4e3a\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u76f8\u5bf9\u8def\u5f84\u8f6c\u6362\u4e3a\u7edd\u5bf9\u8def\u5f84\uff0c\u786e\u4fdd\u6587\u4ef6\u8def\u5f84\u7684\u51c6\u786e\u6027\u3002\u8fd9\u5728\u9700\u8981\u8de8\u5e73\u53f0\u64cd\u4f5c\u6216\u5728\u4e0d\u540c\u76ee\u5f55\u4e2d\u8bbf\u95ee\u6587\u4ef6\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>\u8981\u66f4\u8be6\u7ec6\u5730\u7406\u89e3Python\u4e2d\u83b7\u53d6\u6587\u4ef6\u4f4d\u7f6e\u7684\u65b9\u6cd5\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528os\u6a21\u5757\u83b7\u53d6\u6587\u4ef6\u8def\u5f84<\/p>\n<\/p>\n<p><p>Python\u7684os\u6a21\u5757\u63d0\u4f9b\u4e86\u591a\u79cd\u8def\u5f84\u64cd\u4f5c\u51fd\u6570\uff0c\u4f7f\u5f97\u83b7\u53d6\u6587\u4ef6\u4f4d\u7f6e\u53d8\u5f97\u7b80\u5355\u3002\u8981\u83b7\u53d6\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\uff0cos.path.abspath()\u51fd\u6570\u662f\u975e\u5e38\u6709\u7528\u7684\u3002<\/p>\n<\/p>\n<ol>\n<li>os.path.abspath()\u51fd\u6570<\/li>\n<\/ol>\n<p><p>os.path.abspath()\u51fd\u6570\u7528\u4e8e\u5c06\u76f8\u5bf9\u8def\u5f84\u8f6c\u6362\u4e3a\u7edd\u5bf9\u8def\u5f84\u3002\u8fd9\u610f\u5473\u7740\u65e0\u8bba\u4f60\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u662f\u4ec0\u4e48\uff0c\u5b83\u90fd\u80fd\u8fd4\u56de\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u3002\u8fd9\u5728\u9700\u8981\u786e\u4fdd\u8def\u5f84\u7684\u51c6\u786e\u6027\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84<\/strong><\/h2>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>absolute_path = os.path.abspath(file_path)<\/p>\n<p>print(f&quot;Absolute path: {absolute_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u65e0\u8bbaexample.txt\u6587\u4ef6\u4f4d\u4e8e\u4f55\u5904\uff0c\u4ee3\u7801\u90fd\u4f1a\u8fd4\u56de\u5b83\u7684\u7edd\u5bf9\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>os.path.dirname()\u548cos.path.basename()\u51fd\u6570<\/li>\n<\/ol>\n<p><p>os.path.dirname()\u51fd\u6570\u7528\u4e8e\u83b7\u53d6\u6587\u4ef6\u6240\u5728\u76ee\u5f55\u7684\u8def\u5f84\uff0c\u800cos.path.basename()\u5219\u7528\u4e8e\u83b7\u53d6\u6587\u4ef6\u540d\u3002\u8fd9\u4e24\u8005\u7ed3\u5408\u4f7f\u7528\u53ef\u4ee5\u5e2e\u52a9\u4f60\u62c6\u5206\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u7684\u76ee\u5f55\u548c\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>file_path = &#39;\/path\/to\/example.txt&#39;<\/p>\n<p>directory = os.path.dirname(file_path)<\/p>\n<p>file_name = os.path.basename(file_path)<\/p>\n<p>print(f&quot;Directory: {directory}&quot;)<\/p>\n<p>print(f&quot;File name: {file_name}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u5bf9\u4e8e\u9700\u8981\u5206\u522b\u5904\u7406\u76ee\u5f55\u548c\u6587\u4ef6\u540d\u7684\u60c5\u5f62\u7279\u522b\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528Pathlib\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u81eaPython 3.4\u8d77\uff0cPathlib\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u79cd\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u65b9\u6cd5\uff0c\u7b80\u5316\u4e86\u8def\u5f84\u7684\u5904\u7406\u3002<\/p>\n<\/p>\n<ol>\n<li>Path.resolve()\u65b9\u6cd5<\/li>\n<\/ol>\n<p><p>Pathlib\u6a21\u5757\u7684Path.resolve()\u65b9\u6cd5\u4e0eos.path.abspath()\u529f\u80fd\u76f8\u4f3c\uff0c\u7528\u4e8e\u83b7\u53d6\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84<\/strong><\/h2>\n<p>file_path = Path(&#39;example.txt&#39;)<\/p>\n<p>absolute_path = file_path.resolve()<\/p>\n<p>print(f&quot;Absolute path: {absolute_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Pathlib\u63d0\u4f9b\u7684\u9762\u5411\u5bf9\u8c61\u65b9\u5f0f\u4f7f\u5f97\u4ee3\u7801\u66f4\u5177\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>Path.parent\u548cPath.name\u5c5e\u6027<\/li>\n<\/ol>\n<p><p>Pathlib\u6a21\u5757\u8fd8\u63d0\u4f9b\u4e86Path.parent\u548cPath.name\u5c5e\u6027\uff0c\u7528\u4e8e\u83b7\u53d6\u6587\u4ef6\u7684\u76ee\u5f55\u8def\u5f84\u548c\u6587\u4ef6\u540d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u7684\u76ee\u5f55\u548c\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>file_path = Path(&#39;\/path\/to\/example.txt&#39;)<\/p>\n<p>directory = file_path.parent<\/p>\n<p>file_name = file_path.name<\/p>\n<p>print(f&quot;Directory: {directory}&quot;)<\/p>\n<p>print(f&quot;File name: {file_name}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7Pathlib\u6a21\u5757\uff0c\u53ef\u4ee5\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u548c\u64cd\u4f5c\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u662f\u5341\u5206\u5fc5\u8981\u7684\uff0c\u56e0\u4e3a\u8fd9\u4f1a\u5f71\u54cd\u5230\u76f8\u5bf9\u8def\u5f84\u7684\u89e3\u6790\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528os.getcwd()\u6216\u8005Path.cwd()\u6765\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002<\/p>\n<\/p>\n<ol>\n<li>os.getcwd()\u51fd\u6570<\/li>\n<\/ol>\n<p><p>os.getcwd()\u51fd\u6570\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u7684\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(f&quot;Current directory: {current_directory}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>Path.cwd()\u65b9\u6cd5<\/li>\n<\/ol>\n<p><p>Pathlib\u6a21\u5757\u63d0\u4f9b\u4e86Path.cwd()\u65b9\u6cd5\uff0c\u5177\u6709\u76f8\u540c\u7684\u529f\u80fd\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(f&quot;Current directory: {current_directory}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e24\u79cd\u65b9\u6cd5\u63d0\u4f9b\u4e86\u83b7\u53d6\u5de5\u4f5c\u76ee\u5f55\u7684\u4fbf\u6377\u65b9\u5f0f\uff0c\u5e2e\u52a9\u4f60\u5728\u5904\u7406\u8def\u5f84\u65f6\u66f4\u597d\u5730\u7406\u89e3\u6587\u4ef6\u7684\u76f8\u5bf9\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u8de8\u5e73\u53f0\u8def\u5f84\u5904\u7406<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u8def\u5f84\u65f6\uff0c\u8fd8\u9700\u8981\u8003\u8651\u8de8\u5e73\u53f0\u7684\u517c\u5bb9\u6027\u3002\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u8def\u5f84\u683c\u5f0f\u4e0d\u540c\uff0cos.path\u548cPathlib\u6a21\u5757\u90fd\u63d0\u4f9b\u4e86\u8de8\u5e73\u53f0\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528os.path.join()\u548cPathlib\u7684Path()\u6784\u9020\u8def\u5f84<\/li>\n<\/ol>\n<p><p>os.path.join()\u548cPathlib\u7684Path()\u65b9\u6cd5\u90fd\u53ef\u4ee5\u7528\u4e8e\u6784\u9020\u8de8\u5e73\u53f0\u517c\u5bb9\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u4f7f\u7528os.path.join()\u6784\u9020\u8def\u5f84<\/strong><\/h2>\n<p>directory = &#39;\/path\/to&#39;<\/p>\n<p>file_name = &#39;example.txt&#39;<\/p>\n<p>file_path = os.path.join(directory, file_name)<\/p>\n<p>print(f&quot;File path: {file_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u4f7f\u7528Pathlib\u7684Path()\u6784\u9020\u8def\u5f84<\/strong><\/h2>\n<p>directory = Path(&#39;\/path\/to&#39;)<\/p>\n<p>file_path = directory \/ &#39;example.txt&#39;<\/p>\n<p>print(f&quot;File path: {file_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u4f7f\u7528os.sep\u548cPathlib\u6765\u5904\u7406\u8def\u5f84\u5206\u9694\u7b26<\/li>\n<\/ol>\n<p><p>os.sep\u8868\u793a\u64cd\u4f5c\u7cfb\u7edf\u7279\u5b9a\u7684\u8def\u5f84\u5206\u9694\u7b26\uff0c\u800cPathlib\u5219\u81ea\u52a8\u5904\u7406\u5206\u9694\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u4f7f\u7528os.sep\u5904\u7406\u8def\u5f84<\/strong><\/h2>\n<p>directory = &#39;\/path\/to&#39;<\/p>\n<p>file_name = &#39;example.txt&#39;<\/p>\n<p>file_path = directory + os.sep + file_name<\/p>\n<p>print(f&quot;File path: {file_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u4f7f\u7528Pathlib\u5904\u7406\u8def\u5f84<\/strong><\/h2>\n<p>directory = Path(&#39;\/path\/to&#39;)<\/p>\n<p>file_path = directory \/ &#39;example.txt&#39;<\/p>\n<p>print(f&quot;File path: {file_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u83b7\u53d6\u6587\u4ef6\u4f4d\u7f6e\u662fPython\u7f16\u7a0b\u4e2d\u4e00\u4e2a\u5e38\u89c1\u7684\u9700\u6c42\uff0c\u65e0\u8bba\u662f\u901a\u8fc7os\u6a21\u5757\u8fd8\u662fPathlib\u6a21\u5757\uff0c\u90fd\u63d0\u4f9b\u4e86\u5f3a\u5927\u4e14\u7075\u6d3b\u7684\u8def\u5f84\u64cd\u4f5c\u529f\u80fd\u3002\u901a\u8fc7\u7406\u89e3\u548c\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u66f4\u6709\u6548\u5730\u5904\u7406\u6587\u4ef6\u548c\u76ee\u5f55\u8def\u5f84\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\u548c\u8def\u5f84\u7684\u51c6\u786e\u6027\u3002\u65e0\u8bba\u662f\u5728\u65e5\u5e38\u5f00\u53d1\u8fd8\u662f\u5728\u590d\u6742\u9879\u76ee\u4e2d\uff0c\u8fd9\u4e9b\u6280\u5de7\u90fd\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7ba1\u7406\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u83b7\u53d6\u5f53\u524d\u811a\u672c\u7684\u6587\u4ef6\u8def\u5f84\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u4e2d\u7684<code>__file__<\/code>\u5c5e\u6027\u6765\u83b7\u53d6\u5f53\u524d\u811a\u672c\u7684\u6587\u4ef6\u8def\u5f84\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\nscript_path = os.path.abspath(__file__)\nprint(&quot;\u5f53\u524d\u811a\u672c\u7684\u6587\u4ef6\u8def\u5f84\u662f:&quot;, script_path)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u5c06\u8fd4\u56de\u811a\u672c\u7684\u5b8c\u6574\u8def\u5f84\uff0c\u65b9\u4fbf\u60a8\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528\u3002<\/p>\n<p><strong>\u600e\u6837\u83b7\u53d6\u6307\u5b9a\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\uff1f<\/strong><br \/>\u60a8\u53ef\u4ee5\u4f7f\u7528<code>os.path.abspath()<\/code>\u51fd\u6570\u6765\u83b7\u53d6\u6307\u5b9a\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u3002\u53ea\u9700\u4f20\u5165\u6587\u4ef6\u540d\u6216\u76f8\u5bf9\u8def\u5f84\uff0c\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\nfile_name = &quot;example.txt&quot;  # \u66ff\u6362\u4e3a\u60a8\u7684\u6587\u4ef6\u540d\nabsolute_path = os.path.abspath(file_name)\nprint(&quot;\u6307\u5b9a\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u662f:&quot;, absolute_path)\n<\/code><\/pre>\n<p>\u8fd9\u5c06\u8fd4\u56de\u60a8\u6307\u5b9a\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\uff0c\u4fbf\u4e8e\u6587\u4ef6\u7684\u8fdb\u4e00\u6b65\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1f<\/strong><br \/>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u53ef\u4ee5\u901a\u8fc7<code>os.getcwd()<\/code>\u51fd\u6570\u5b9e\u73b0\u3002\u8be5\u51fd\u6570\u8fd4\u56de\u5f53\u524d\u811a\u672c\u8fd0\u884c\u65f6\u7684\u5de5\u4f5c\u76ee\u5f55\uff0c\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\ncurrent_directory = os.getcwd()\nprint(&quot;\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u662f:&quot;, current_directory)\n<\/code><\/pre>\n<p>\u4e86\u89e3\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u5bf9\u4e8e\u6587\u4ef6\u64cd\u4f5c\u548c\u8def\u5f84\u7ba1\u7406\u975e\u5e38\u91cd\u8981\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python\u4e2d\u83b7\u53d6\u6587\u4ef6\u7684\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u4f7f\u7528os\u6a21\u5757\u7684\u8def\u5f84\u64cd\u4f5c\u51fd\u6570\u3001\u5229\u7528os.path.abspath()\u83b7\u53d6\u7edd [&hellip;]","protected":false},"author":3,"featured_media":994575,"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\/994565"}],"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=994565"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/994565\/revisions"}],"predecessor-version":[{"id":994580,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/994565\/revisions\/994580"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/994575"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=994565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=994565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=994565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}