{"id":1044985,"date":"2024-12-31T13:19:17","date_gmt":"2024-12-31T05:19:17","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1044985.html"},"modified":"2024-12-31T13:19:22","modified_gmt":"2024-12-31T05:19:22","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e7%94%9f%e6%88%90%e6%96%87%e4%bb%b6%e5%a4%b9%e4%b8%8b","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1044985.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u751f\u6210\u6587\u4ef6\u5939\u4e0b"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/42c71bd2-f621-4b7a-9f7c-fa9596e331f3.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u4e2d\u5982\u4f55\u751f\u6210\u6587\u4ef6\u5939\u4e0b\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u751f\u6210\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528os\u6a21\u5757\u3001pathlib\u6a21\u5757\u7b49\u3002<\/strong> \u8fd9\u4e9b\u6a21\u5757\u63d0\u4f9b\u4e86\u7b80\u5355\u4e14\u7075\u6d3b\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u76ee\u5f55\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u4ee3\u7801\u793a\u4f8b\u6765\u5e2e\u52a9\u4f60\u7406\u89e3\u548c\u5e94\u7528\u8fd9\u4e9b\u6280\u672f\u3002<\/p>\n<\/p>\n<hr>\n<p><h3>\u4e00\u3001\u4f7f\u7528os\u6a21\u5757\u521b\u5efa\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><h4>1.1 os\u6a21\u5757\u7b80\u4ecb<\/h4>\n<\/p>\n<p><p><strong>os\u6a21\u5757\u662fPython\u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u63d0\u4f9b\u4e86\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u529f\u80fd\u7684\u63a5\u53e3\u3002<\/strong> \u901a\u8fc7os\u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u6267\u884c\u8bb8\u591a\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u4ea4\u4e92\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u521b\u5efa\u3001\u5220\u9664\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1.2 \u4f7f\u7528os.mkdir()\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p><strong>os.mkdir()\u65b9\u6cd5\u7528\u4e8e\u521b\u5efa\u5355\u4e2a\u76ee\u5f55\u3002<\/strong> \u5982\u679c\u76ee\u5f55\u5df2\u7ecf\u5b58\u5728\uff0c\u5c06\u5f15\u53d1FileExistsError\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u76ee\u5f55\u540d\u79f0<\/strong><\/h2>\n<p>directory = &quot;example_folder&quot;<\/p>\n<h2><strong>\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>try:<\/p>\n<p>    os.mkdir(directory)<\/p>\n<p>    print(f&quot;\u76ee\u5f55&#39;{directory}&#39;\u521b\u5efa\u6210\u529f&quot;)<\/p>\n<p>except FileExistsError:<\/p>\n<p>    print(f&quot;\u76ee\u5f55&#39;{directory}&#39;\u5df2\u7ecf\u5b58\u5728&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1.3 \u4f7f\u7528os.makedirs()\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p><strong>os.makedirs()\u65b9\u6cd5\u7528\u4e8e\u9012\u5f52\u521b\u5efa\u76ee\u5f55\u3002<\/strong> \u5982\u679c\u4e2d\u95f4\u7ea7\u76ee\u5f55\u4e0d\u5b58\u5728\uff0cos.makedirs()\u4f1a\u521b\u5efa\u6240\u6709\u5fc5\u9700\u7684\u4e2d\u95f4\u7ea7\u76ee\u5f55\u3002\u5982\u679c\u76ee\u5f55\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u4e0d\u4f1a\u5f15\u53d1\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u76ee\u5f55\u8def\u5f84<\/strong><\/h2>\n<p>directory_path = &quot;parent_folder\/child_folder&quot;<\/p>\n<h2><strong>\u9012\u5f52\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>os.makedirs(directory_path, exist_ok=True)<\/p>\n<p>print(f&quot;\u76ee\u5f55&#39;{directory_path}&#39;\u521b\u5efa\u6210\u529f&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528pathlib\u6a21\u5757\u521b\u5efa\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><h4>2.1 pathlib\u6a21\u5757\u7b80\u4ecb<\/h4>\n<\/p>\n<p><p><strong>pathlib\u6a21\u5757\u662fPython 3.4\u5f15\u5165\u7684\u6807\u51c6\u5e93\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u6587\u4ef6\u7cfb\u7edf\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\u3002<\/strong> \u4e0eos\u6a21\u5757\u76f8\u6bd4\uff0cpathlib\u66f4\u52a0\u76f4\u89c2\u548c\u6613\u7528\u3002<\/p>\n<\/p>\n<p><h4>2.2 \u4f7f\u7528Path.mkdir()\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p><strong>Path.mkdir()\u65b9\u6cd5\u7528\u4e8e\u521b\u5efa\u5355\u4e2a\u76ee\u5f55\u3002<\/strong> \u53ef\u4ee5\u901a\u8fc7\u53c2\u6570parents=True\u6765\u9012\u5f52\u521b\u5efa\u7236\u76ee\u5f55\uff0c\u901a\u8fc7exist_ok=True\u6765\u907f\u514d\u76ee\u5f55\u5df2\u5b58\u5728\u7684\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u76ee\u5f55\u8def\u5f84<\/strong><\/h2>\n<p>directory_path = Path(&quot;example_folder&quot;)<\/p>\n<h2><strong>\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>directory_path.mkdir(exist_ok=True)<\/p>\n<p>print(f&quot;\u76ee\u5f55&#39;{directory_path}&#39;\u521b\u5efa\u6210\u529f&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2.3 \u9012\u5f52\u521b\u5efa\u76ee\u5f55<\/h4>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u8bbe\u7f6eparents=True\u53c2\u6570\uff0cPath.mkdir()\u65b9\u6cd5\u53ef\u4ee5\u9012\u5f52\u521b\u5efa\u76ee\u5f55\u3002<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u76ee\u5f55\u8def\u5f84<\/strong><\/h2>\n<p>directory_path = Path(&quot;parent_folder\/child_folder&quot;)<\/p>\n<h2><strong>\u9012\u5f52\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>directory_path.mkdir(parents=True, exist_ok=True)<\/p>\n<p>print(f&quot;\u76ee\u5f55&#39;{directory_path}&#39;\u521b\u5efa\u6210\u529f&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5904\u7406\u5e38\u89c1\u95ee\u9898<\/h3>\n<\/p>\n<p><h4>3.1 \u76ee\u5f55\u5df2\u5b58\u5728\u7684\u5904\u7406<\/h4>\n<\/p>\n<p><p><strong>\u5728\u521b\u5efa\u76ee\u5f55\u65f6\uff0c\u5982\u679c\u76ee\u5f55\u5df2\u7ecf\u5b58\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528exist_ok=True\u53c2\u6570\u6765\u907f\u514d\u5f15\u53d1\u5f02\u5e38\u3002<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u76ee\u5f55\u540d\u79f0<\/strong><\/h2>\n<p>directory = &quot;example_folder&quot;<\/p>\n<h2><strong>\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>os.makedirs(directory, exist_ok=True)<\/p>\n<p>print(f&quot;\u76ee\u5f55&#39;{directory}&#39;\u5df2\u5b58\u5728\u6216\u521b\u5efa\u6210\u529f&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3.2 \u6743\u9650\u95ee\u9898<\/h4>\n<\/p>\n<p><p><strong>\u5728\u67d0\u4e9b\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u521b\u5efa\u76ee\u5f55\u53ef\u80fd\u4f1a\u9047\u5230\u6743\u9650\u95ee\u9898\u3002<\/strong> \u53ef\u4ee5\u4f7f\u7528os.chmod()\u65b9\u6cd5\u6765\u8bbe\u7f6e\u76ee\u5f55\u6743\u9650\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u76ee\u5f55\u540d\u79f0<\/strong><\/h2>\n<p>directory = &quot;example_folder&quot;<\/p>\n<h2><strong>\u521b\u5efa\u76ee\u5f55<\/strong><\/h2>\n<p>os.makedirs(directory, exist_ok=True)<\/p>\n<h2><strong>\u8bbe\u7f6e\u76ee\u5f55\u6743\u9650<\/strong><\/h2>\n<p>os.chmod(directory, 0o755)<\/p>\n<p>print(f&quot;\u76ee\u5f55&#39;{directory}&#39;\u6743\u9650\u8bbe\u7f6e\u4e3a755&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><h4>4.1 \u521b\u5efa\u591a\u7ea7\u76ee\u5f55\u7ed3\u6784<\/h4>\n<\/p>\n<p><p><strong>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u521b\u5efa\u591a\u7ea7\u76ee\u5f55\u7ed3\u6784\u662f\u5f88\u5e38\u89c1\u7684\u9700\u6c42\u3002<\/strong> \u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4e3a\u4e00\u4e2a\u9879\u76ee\u521b\u5efa\u591a\u4e2a\u5b50\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u9879\u76ee\u76ee\u5f55\u7ed3\u6784<\/strong><\/h2>\n<p>project_structure = [<\/p>\n<p>    &quot;project&quot;,<\/p>\n<p>    &quot;project\/data&quot;,<\/p>\n<p>    &quot;project\/data\/raw&quot;,<\/p>\n<p>    &quot;project\/data\/processed&quot;,<\/p>\n<p>    &quot;project\/notebooks&quot;,<\/p>\n<p>    &quot;project\/scripts&quot;,<\/p>\n<p>]<\/p>\n<h2><strong>\u521b\u5efa\u76ee\u5f55\u7ed3\u6784<\/strong><\/h2>\n<p>for directory in project_structure:<\/p>\n<p>    os.makedirs(directory, exist_ok=True)<\/p>\n<p>    print(f&quot;\u76ee\u5f55&#39;{directory}&#39;\u521b\u5efa\u6210\u529f&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4.2 \u6839\u636e\u65e5\u671f\u521b\u5efa\u76ee\u5f55<\/h4>\n<\/p>\n<p><p><strong>\u5728\u67d0\u4e9b\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u6839\u636e\u5f53\u524d\u65e5\u671f\u521b\u5efa\u76ee\u5f55\u3002<\/strong> \u4f8b\u5982\uff0c\u751f\u6210\u65e5\u5fd7\u6587\u4ef6\u7684\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>from datetime import datetime<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u65e5\u671f<\/strong><\/h2>\n<p>current_date = datetime.now().strftime(&quot;%Y-%m-%d&quot;)<\/p>\n<h2><strong>\u65e5\u5fd7\u76ee\u5f55<\/strong><\/h2>\n<p>log_directory = f&quot;logs\/{current_date}&quot;<\/p>\n<h2><strong>\u521b\u5efa\u65e5\u5fd7\u76ee\u5f55<\/strong><\/h2>\n<p>os.makedirs(log_directory, exist_ok=True)<\/p>\n<p>print(f&quot;\u65e5\u5fd7\u76ee\u5f55&#39;{log_directory}&#39;\u521b\u5efa\u6210\u529f&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u5728Python\u4e2d\u751f\u6210\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\u4e24\u79cd\uff1a\u4f7f\u7528os\u6a21\u5757\u548cpathlib\u6a21\u5757\u3002<\/strong> os\u6a21\u5757\u63d0\u4f9b\u4e86\u4f20\u7edf\u7684\u8fc7\u7a0b\u5f0f\u65b9\u6cd5\uff0c\u800cpathlib\u6a21\u5757\u63d0\u4f9b\u4e86\u66f4\u73b0\u4ee3\u548c\u9762\u5411\u5bf9\u8c61\u7684\u65b9\u5f0f\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u7075\u6d3b\u5e94\u7528\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u76f8\u4fe1\u4f60\u5df2\u7ecf\u638c\u63e1\u4e86\u5982\u4f55\u5728Python\u4e2d\u751f\u6210\u6587\u4ef6\u5939\u7684\u57fa\u672c\u65b9\u6cd5\u548c\u5b9e\u9645\u5e94\u7528\u6280\u5de7\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u5bf9\u4f60\u7684\u5de5\u4f5c\u548c\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\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\u7684\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u7684<code>mkdir()<\/code>\u51fd\u6570\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u5939\u3002\u4f60\u53ea\u9700\u63d0\u4f9b\u8981\u521b\u5efa\u7684\u6587\u4ef6\u5939\u7684\u8def\u5f84\u3002\u4f8b\u5982\uff0c<code>os.mkdir(&#39;\u65b0\u6587\u4ef6\u5939&#39;)<\/code>\u5c06\u4f1a\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201c\u65b0\u6587\u4ef6\u5939\u201d\u7684\u6587\u4ef6\u5939\u3002\u5982\u679c\u4f60\u60f3\u8981\u521b\u5efa\u591a\u5c42\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.makedirs()<\/code>\u51fd\u6570\uff0c\u8fd9\u6837\u53ef\u4ee5\u4e00\u6b21\u6027\u521b\u5efa\u591a\u4e2a\u5c42\u7ea7\u7684\u6587\u4ef6\u5939\u3002<\/p>\n<p><strong>\u5728\u521b\u5efa\u6587\u4ef6\u5939\u65f6\u5982\u4f55\u5904\u7406\u5df2\u5b58\u5728\u7684\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u5728\u521b\u5efa\u6587\u4ef6\u5939\u4e4b\u524d\uff0c\u68c0\u67e5\u8be5\u6587\u4ef6\u5939\u662f\u5426\u5df2\u7ecf\u5b58\u5728\u662f\u4e00\u4e2a\u597d\u4e60\u60ef\u3002\u53ef\u4ee5\u4f7f\u7528<code>os.path.exists()<\/code>\u51fd\u6570\u6765\u5224\u65ad\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728\u3002\u5982\u679c\u5b58\u5728\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u8df3\u8fc7\u521b\u5efa\u6216\u8005\u5220\u9664\u5df2\u6709\u7684\u6587\u4ef6\u5939\u540e\u518d\u521b\u5efa\u65b0\u7684\u3002\u4f8b\u5982\uff0c\u4ee3\u7801\u53ef\u4ee5\u662f\u8fd9\u6837\u7684\uff1a  <\/p>\n<pre><code class=\"language-python\">if not os.path.exists(&#39;\u65b0\u6587\u4ef6\u5939&#39;):\n    os.mkdir(&#39;\u65b0\u6587\u4ef6\u5939&#39;)\nelse:\n    print(&#39;\u6587\u4ef6\u5939\u5df2\u5b58\u5728&#39;)\n<\/code><\/pre>\n<p><strong>\u5982\u4f55\u5728\u7279\u5b9a\u8def\u5f84\u4e0b\u521b\u5efa\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u8981\u5728\u7279\u5b9a\u8def\u5f84\u4e0b\u521b\u5efa\u6587\u4ef6\u5939\uff0c\u53ea\u9700\u5728<code>mkdir()<\/code>\u6216<code>makedirs()<\/code>\u51fd\u6570\u4e2d\u63d0\u4f9b\u5b8c\u6574\u7684\u8def\u5f84\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60f3\u5728<code>C:\\Users\\Username\\Documents<\/code>\u8def\u5f84\u4e0b\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u8fd9\u6837\u5199\uff1a  <\/p>\n<pre><code class=\"language-python\">os.mkdir(&#39;C:\\\\Users\\\\Username\\\\Documents\\\\\u65b0\u6587\u4ef6\u5939&#39;)\n<\/code><\/pre>\n<p>\u786e\u4fdd\u8def\u5f84\u4e2d\u7684\u5206\u9694\u7b26\u6b63\u786e\u4f7f\u7528\uff0cWindows\u7cfb\u7edf\u4e2d\u901a\u5e38\u4f7f\u7528\u53cd\u659c\u6760<code>\\<\/code>\uff0c\u800c\u5728Unix\u6216Linux\u7cfb\u7edf\u4e2d\u4f7f\u7528\u6b63\u659c\u6760<code>\/<\/code>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u751f\u6210\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528os\u6a21\u5757\u3001pathlib\u6a21\u5757\u7b49\u3002 \u8fd9\u4e9b\u6a21\u5757\u63d0\u4f9b\u4e86\u7b80\u5355\u4e14\u7075 [&hellip;]","protected":false},"author":3,"featured_media":1044999,"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\/1044985"}],"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=1044985"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1044985\/revisions"}],"predecessor-version":[{"id":1045004,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1044985\/revisions\/1045004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1044999"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1044985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1044985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1044985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}