{"id":929543,"date":"2024-12-26T16:57:48","date_gmt":"2024-12-26T08:57:48","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/929543.html"},"modified":"2024-12-26T16:57:49","modified_gmt":"2024-12-26T08:57:49","slug":"python-%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8b%e8%b7%af%e5%be%84","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/929543.html","title":{"rendered":"python \u5982\u4f55\u67e5\u770b\u8def\u5f84"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25064715\/b5a032f3-e428-4866-94a2-744578d7813d.webp\" alt=\"python \u5982\u4f55\u67e5\u770b\u8def\u5f84\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u67e5\u770b\u8def\u5f84\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u3001<code>sys<\/code>\u6a21\u5757\u3001<code>pathlib<\/code>\u6a21\u5757\u7b49\u3002\u5176\u4e2d\uff0c<code>os<\/code>\u6a21\u5757\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u548c\u811a\u672c\u76ee\u5f55\uff0c<code>sys<\/code>\u6a21\u5757\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6Python\u89e3\u91ca\u5668\u7684\u8def\u5f84\uff0c<code>pathlib<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\u3002<\/strong>\u5728\u8fd9\u51e0\u4e2a\u65b9\u6cd5\u4e2d\uff0c<code>os<\/code>\u6a21\u5757\u7684\u4f7f\u7528\u6700\u4e3a\u7b80\u5355\u548c\u5e38\u89c1\uff0c\u63a5\u4e0b\u6765\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u8be5\u6a21\u5757\u67e5\u770b\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><p><code>os<\/code>\u6a21\u5757\u662fPython\u6807\u51c6\u5e93\u4e2d\u7528\u4e8e\u64cd\u4f5c\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u6a21\u5757\u3002\u8981\u67e5\u770b\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.getcwd()<\/code>\u51fd\u6570\uff1b\u800c\u8981\u67e5\u770b\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.path.abspath(__file__)<\/code>\u3002\u8fd9\u4e24\u4e2a\u51fd\u6570\u662f\u67e5\u770b\u8def\u5f84\u7684\u57fa\u7840\u5de5\u5177\uff0c\u80fd\u8ba9\u6211\u4eec\u8f7b\u677e\u83b7\u53d6\u7a0b\u5e8f\u8fd0\u884c\u65f6\u7684\u8def\u5f84\u4fe1\u606f\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u4e00\u3001OS\u6a21\u5757\u83b7\u53d6\u8def\u5f84<\/p>\n<\/p>\n<p><p><code>os<\/code>\u6a21\u5757\u662fPython\u4e2d\u7528\u4e8e\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u4ea4\u4e92\u7684\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u83b7\u53d6\u548c\u64cd\u4f5c\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/li>\n<\/ol>\n<p><p>\u5728Python\u4e2d\uff0c\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u975e\u5e38\u7b80\u5355\u3002<code>os.getcwd()<\/code>\u51fd\u6570\u53ef\u4ee5\u8fd4\u56de\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u8def\u5f84\u3002\u5de5\u4f5c\u76ee\u5f55\u662f\u6307\u5f53\u524dPython\u811a\u672c\u8fd0\u884c\u7684\u6587\u4ef6\u5939\u8def\u5f84\u3002\u4f7f\u7528\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u64cd\u4f5c\u5728\u6b63\u786e\u7684\u76ee\u5f55\u4e2d\u8fdb\u884c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\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>\u83b7\u53d6\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84<\/li>\n<\/ol>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u4e00\u4e2a\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.path.abspath(__file__)<\/code>\u51fd\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u8fd4\u56de\u5f53\u524d\u811a\u672c\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u786e\u8ba4\u6587\u4ef6\u7684\u5b9e\u9645\u5b58\u50a8\u4f4d\u7f6e\u3002\u4f8b\u5b50\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>file_path = os.path.abspath(__file__)<\/p>\n<p>print(&quot;\u5f53\u524d\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84:&quot;, file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001SYS\u6a21\u5757\u83b7\u53d6\u8def\u5f84<\/p>\n<\/p>\n<p><p><code>sys<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e9b\u7cfb\u7edf\u76f8\u5173\u7684\u529f\u80fd\uff0c\u5176\u4e2d\u5305\u62ec\u4e0e\u8def\u5f84\u76f8\u5173\u7684\u529f\u80fd\u3002\u5b83\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6Python\u89e3\u91ca\u5668\u7684\u8def\u5f84\u4ee5\u53ca\u5f53\u524d\u6267\u884c\u811a\u672c\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\u83b7\u53d6Python\u89e3\u91ca\u5668\u8def\u5f84<\/li>\n<\/ol>\n<p><p><code>sys.executable<\/code>\u5c5e\u6027\u8fd4\u56dePython\u89e3\u91ca\u5668\u7684\u8def\u5f84\u3002\u8fd9\u5728\u9700\u8981\u786e\u5b9a\u8fd0\u884c\u73af\u5883\u65f6\u975e\u5e38\u6709\u7528\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>python_path = sys.executable<\/p>\n<p>print(&quot;Python\u89e3\u91ca\u5668\u8def\u5f84:&quot;, python_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u83b7\u53d6\u811a\u672c\u8def\u5f84<\/li>\n<\/ol>\n<p><p><code>sys.argv[0]<\/code>\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u6b63\u5728\u6267\u884c\u7684\u811a\u672c\u7684\u8def\u5f84\u3002\u8fd9\u5728\u9700\u8981\u5904\u7406\u547d\u4ee4\u884c\u53c2\u6570\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>script_path = sys.argv[0]<\/p>\n<p>print(&quot;\u5f53\u524d\u811a\u672c\u8def\u5f84:&quot;, script_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001PATHLIB\u6a21\u5757\u4f7f\u7528<\/p>\n<\/p>\n<p><p><code>pathlib<\/code>\u6a21\u5757\u662fPython 3.4\u5f15\u5165\u7684\uff0c\u7528\u4e8e\u63d0\u4f9b\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\u3002\u76f8\u6bd4\u4e8e<code>os<\/code>\u6a21\u5757\uff0c<code>pathlib<\/code>\u63d0\u4f9b\u4e86\u4e00\u79cd\u66f4\u76f4\u89c2\u548c\u6613\u4e8e\u7406\u89e3\u7684\u65b9\u6cd5\u6765\u5904\u7406\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\u521b\u5efa\u8def\u5f84\u5bf9\u8c61<\/li>\n<\/ol>\n<p><p>\u4f7f\u7528<code>pathlib.Path<\/code>\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u8def\u5f84\u5bf9\u8c61\uff0c\u5e76\u901a\u8fc7\u5bf9\u8c61\u7684\u65b9\u6cd5\u8fdb\u884c\u8def\u5f84\u64cd\u4f5c\u3002\u4f8b\u5982\uff1a<\/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>\u83b7\u53d6\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84<\/strong><\/h2>\n<p>file_path = Path(__file__).resolve()<\/p>\n<p>print(&quot;\u5f53\u524d\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84:&quot;, file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u8def\u5f84\u7684\u5176\u5b83\u64cd\u4f5c<\/li>\n<\/ol>\n<p><p><code>pathlib<\/code>\u6a21\u5757\u8fd8\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u65b9\u6cd5\u7528\u4e8e\u8def\u5f84\u7684\u62fc\u63a5\u3001\u89e3\u6790\u548c\u4fee\u6539\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u8def\u5f84<\/strong><\/h2>\n<p>new_path = Path.cwd() \/ &#39;new_directory&#39;<\/p>\n<p>print(&quot;\u65b0\u8def\u5f84:&quot;, new_path)<\/p>\n<h2><strong>\u68c0\u67e5\u8def\u5f84\u662f\u5426\u5b58\u5728<\/strong><\/h2>\n<p>exists = new_path.exists()<\/p>\n<p>print(&quot;\u8def\u5f84\u662f\u5426\u5b58\u5728:&quot;, exists)<\/p>\n<h2><strong>\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>if not exists:<\/p>\n<p>    new_path.mkdir()<\/p>\n<p>    print(&quot;\u76ee\u5f55\u5df2\u521b\u5efa:&quot;, new_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u5e94\u7528\u5b9e\u4f8b<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4e86\u89e3\u5982\u4f55\u67e5\u770b\u548c\u64cd\u4f5c\u8def\u5f84\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4f8b\u5982\uff0c\u5728\u6587\u4ef6\u7ba1\u7406\u7cfb\u7edf\u3001\u6570\u636e\u5206\u6790\u9879\u76ee\u4e2d\uff0c\u6211\u4eec\u5e38\u5e38\u9700\u8981\u8bfb\u53d6\u548c\u5199\u5165\u6587\u4ef6\uff0c\u7ba1\u7406\u6587\u4ef6\u8def\u5f84\u3002\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\uff0c\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5\u80fd\u591f\u5e2e\u52a9\u6211\u4eec\u6709\u6548\u5730\u7ba1\u7406\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n<\/p>\n<ol>\n<li>\u6587\u4ef6\u8bfb\u53d6\u4e0e\u5199\u5165<\/li>\n<\/ol>\n<p><p>\u5728\u9700\u8981\u8bfb\u53d6\u548c\u5199\u5165\u6587\u4ef6\u65f6\uff0c\u786e\u4fdd\u8def\u5f84\u6b63\u786e\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4f7f\u7528<code>os<\/code>\u6216<code>pathlib<\/code>\u6a21\u5757\u53ef\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u5728\u6b63\u786e\u7684\u8def\u5f84\u4e0b\u8fd0\u884c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u811a\u672c\u76ee\u5f55<\/strong><\/h2>\n<p>current_dir = Path(__file__).parent<\/p>\n<h2><strong>\u5b9a\u4e49\u6587\u4ef6\u8def\u5f84<\/strong><\/h2>\n<p>file_path = current_dir \/ &#39;data.txt&#39;<\/p>\n<h2><strong>\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>with file_path.open(mode=&#39;w&#39;) as file:<\/p>\n<p>    file.write(&quot;Hello, Python!&quot;)<\/p>\n<h2><strong>\u8bfb\u53d6\u6587\u4ef6<\/strong><\/h2>\n<p>with file_path.open(mode=&#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    print(&quot;\u6587\u4ef6\u5185\u5bb9:&quot;, content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u52a8\u6001\u8def\u5f84\u7ba1\u7406<\/li>\n<\/ol>\n<p><p>\u5728\u9700\u8981\u52a8\u6001\u5904\u7406\u8def\u5f84\u65f6\uff0c\u4f8b\u5982\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u4ee3\u7801\uff0c\u4f7f\u7528<code>pathlib<\/code>\u6a21\u5757\u53ef\u4ee5\u7b80\u5316\u8def\u5f84\u7ba1\u7406\uff0c\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u79fb\u690d\u6027\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u521b\u5efa\u5e73\u53f0\u65e0\u5173\u7684\u8def\u5f84<\/strong><\/h2>\n<p>home_path = Path.home()<\/p>\n<p>project_path = home_path \/ &#39;my_project&#39;<\/p>\n<h2><strong>\u68c0\u67e5\u5e76\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>if not project_path.exists():<\/p>\n<p>    project_path.mkdir()<\/p>\n<p>    print(&quot;\u9879\u76ee\u76ee\u5f55\u5df2\u521b\u5efa:&quot;, project_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u5728Python\u4e2d\u67e5\u770b\u548c\u64cd\u4f5c\u8def\u5f84\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u548c\u517c\u5bb9\u6027\u3002\u65e0\u8bba\u662f\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u3001<code>sys<\/code>\u6a21\u5757\u8fd8\u662f<code>pathlib<\/code>\u6a21\u5757\uff0c\u90fd\u80fd\u591f\u6ee1\u8db3\u4e0d\u540c\u573a\u666f\u4e0b\u7684\u9700\u6c42\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u7ba1\u7406\u548c\u64cd\u4f5c\u8def\u5f84\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\u5de5\u4f5c\u76ee\u5f55\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002\u53ea\u9700\u5bfc\u5165\u8be5\u6a21\u5757\u5e76\u8c03\u7528<code>os.getcwd()<\/code>\u51fd\u6570\uff0c\u5b83\u5c06\u8fd4\u56de\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u7684\u5b8c\u6574\u8def\u5f84\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\ncurrent_directory = os.getcwd()\nprint(current_directory)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u8f93\u51fa\u5f53\u524d\u7684\u5de5\u4f5c\u8def\u5f84\u3002<\/p>\n<p><strong>\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u65b9\u6cd5\u6765\u67e5\u770b\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\uff1f<\/strong><br \/>\u8981\u67e5\u770b\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.path.abspath()<\/code>\u51fd\u6570\u3002\u53ea\u9700\u63d0\u4f9b\u6587\u4ef6\u540d\u6216\u76f8\u5bf9\u8def\u5f84\uff0c\u51fd\u6570\u5c06\u8fd4\u56de\u8be5\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\nabsolute_path = os.path.abspath(&#39;your_file.txt&#39;)\nprint(absolute_path)\n<\/code><\/pre>\n<p>\u8fd9\u5c06\u6253\u5370\u51fa<code>your_file.txt<\/code>\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u3002<\/p>\n<p><strong>\u5982\u4f55\u68c0\u67e5\u67d0\u4e2a\u8def\u5f84\u662f\u5426\u5b58\u5728\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.path.exists()<\/code>\u51fd\u6570\u6765\u68c0\u67e5\u6307\u5b9a\u8def\u5f84\u662f\u5426\u5b58\u5728\u3002\u8be5\u51fd\u6570\u8fd4\u56de\u4e00\u4e2a\u5e03\u5c14\u503c\uff0c\u6307\u793a\u8def\u5f84\u662f\u5426\u6709\u6548\u3002\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\npath_to_check = &#39;some_directory_or_file&#39;\nexists = os.path.exists(path_to_check)\nprint(f&quot;\u8def\u5f84\u5b58\u5728: {exists}&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u8f93\u51fa\u6307\u5b9a\u8def\u5f84\u662f\u5426\u5b58\u5728\u7684\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u67e5\u770b\u8def\u5f84\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528os\u6a21\u5757\u3001sys\u6a21\u5757\u3001pathlib\u6a21\u5757\u7b49\u3002\u5176\u4e2d\uff0cos\u6a21\u5757\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6\u5f53\u524d [&hellip;]","protected":false},"author":3,"featured_media":929547,"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\/929543"}],"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=929543"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/929543\/revisions"}],"predecessor-version":[{"id":929548,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/929543\/revisions\/929548"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/929547"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=929543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=929543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=929543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}