{"id":1010870,"date":"2024-12-27T11:25:01","date_gmt":"2024-12-27T03:25:01","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1010870.html"},"modified":"2024-12-27T11:25:04","modified_gmt":"2024-12-27T03:25:04","slug":"python%e5%a6%82%e4%bd%95%e6%8c%87%e5%ae%9a%e7%94%b5%e8%84%91%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1010870.html","title":{"rendered":"python\u5982\u4f55\u6307\u5b9a\u7535\u8111\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085226\/9740b7c3-1b40-4126-83aa-899299d06f7b.webp\" alt=\"python\u5982\u4f55\u6307\u5b9a\u7535\u8111\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u6307\u5b9a\u7535\u8111\u6587\u4ef6\u7684\u65b9\u5f0f\u5305\u62ec\uff1a\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u3001\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u3001\u5904\u7406\u6587\u4ef6\u8def\u5f84\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\u3001\u4f7f\u7528\u8def\u5f84\u5e93os\u548cpathlib\u3002\u6700\u4e3a\u63a8\u8350\u7684\u65b9\u6cd5\u662f\u4f7f\u7528pathlib\u5e93\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u66f4\u76f4\u89c2\u548c\u73b0\u4ee3\u5316\u7684\u63a5\u53e3\u3002<\/strong> \u4f8b\u5982\uff0cpathlib\u5e93\u5141\u8bb8\u60a8\u4ee5\u5bf9\u8c61\u65b9\u5f0f\u5904\u7406\u6587\u4ef6\u8def\u5f84\uff0c\u652f\u6301\u8de8\u5e73\u53f0\u4f7f\u7528\u5e76\u4e14\u80fd\u6709\u6548\u5730\u5904\u7406\u8def\u5f84\u7684\u5404\u79cd\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u7edd\u5bf9\u8def\u5f84\u4e0e\u76f8\u5bf9\u8def\u5f84<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6587\u4ef6\u65f6\uff0c\u9996\u5148\u9700\u8981\u7406\u89e3\u7edd\u5bf9\u8def\u5f84\u548c\u76f8\u5bf9\u8def\u5f84\u7684\u533a\u522b\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u7edd\u5bf9\u8def\u5f84<\/strong><\/li>\n<\/ol>\n<p><p>\u7edd\u5bf9\u8def\u5f84\u662f\u4ece\u6839\u76ee\u5f55\u5f00\u59cb\u7684\u5b8c\u6574\u8def\u5f84\u3002\u65e0\u8bba\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u5728\u54ea\u91cc\uff0c\u7edd\u5bf9\u8def\u5f84\u59cb\u7ec8\u6307\u5411\u540c\u4e00\u4e2a\u6587\u4ef6\u3002\u4f8b\u5982\uff1a<code>C:\\Users\\Username\\Documents\\file.txt<\/code>\u5728Windows\u4e0a\uff0c\u6216<code>\/home\/username\/documents\/file.txt<\/code>\u5728Linux\u4e0a\u3002<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u53ef\u4ee5\u8fd9\u6837\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file_path = r&#39;C:\\Users\\Username\\Documents\\file.txt&#39;<\/p>\n<p>with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6ce8\u610f\u5728Windows\u7cfb\u7edf\u4e0a\uff0c\u8def\u5f84\u4e2d\u7684\u53cd\u659c\u6760\u9700\u8981\u4f7f\u7528\u53cc\u53cd\u659c\u6760\u6216\u8005\u5728\u5b57\u7b26\u4e32\u524d\u52a0\u4e0a<code>r<\/code>\u6765\u6807\u8bb0\u4e3a\u539f\u59cb\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u76f8\u5bf9\u8def\u5f84<\/strong><\/li>\n<\/ol>\n<p><p>\u76f8\u5bf9\u8def\u5f84\u662f\u76f8\u5bf9\u4e8e\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u7684\u8def\u5f84\u3002\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u53ef\u4ee5\u4f7f\u4ee3\u7801\u66f4\u5177\u53ef\u79fb\u690d\u6027\u3002\u4f8b\u5982\uff0c\u5728\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u6709\u4e00\u4e2a\u6587\u4ef6\u5939<code>data<\/code>\uff0c\u5176\u4e2d\u6709\u4e2a\u6587\u4ef6<code>data.txt<\/code>\uff0c\u76f8\u5bf9\u8def\u5f84\u4e3a<code>data\/data.txt<\/code>\u3002<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u53ef\u4ee5\u8fd9\u6837\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file_path = &#39;data\/data.txt&#39;<\/p>\n<p>with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u5904\u7406\u6587\u4ef6\u8def\u5f84\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26<\/p>\n<\/p>\n<p><p>\u6587\u4ef6\u8def\u5f84\u4e2d\u53ef\u80fd\u5305\u542b\u7279\u6b8a\u5b57\u7b26\uff0c\u8fd9\u4e9b\u5b57\u7b26\u9700\u8981\u7279\u522b\u5904\u7406\u3002\u4f8b\u5982\uff0c\u53cd\u659c\u6760<code><\/code>\u662f\u8f6c\u4e49\u5b57\u7b26\uff0c\u901a\u5e38\u9700\u8981\u4f7f\u7528\u53cc\u53cd\u659c\u6760<code>\\\\<\/code>\u6216\u8005\u539f\u59cb\u5b57\u7b26\u4e32\u6807\u8bb0<code>r&#39;&#39;<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4f7f\u7528\u53cc\u53cd\u659c\u6760<\/p>\n<p>file_path = &#39;C:\\\\Users\\\\Username\\\\Documents\\\\file.txt&#39;<\/p>\n<h2><strong>\u4f7f\u7528\u539f\u59cb\u5b57\u7b26\u4e32<\/strong><\/h2>\n<p>file_path = r&#39;C:\\Users\\Username\\Documents\\file.txt&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528os\u548cpathlib\u5e93<\/p>\n<\/p>\n<ol>\n<li><strong>os\u6a21\u5757<\/strong><\/li>\n<\/ol>\n<p><p>os\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e9b\u51fd\u6570\uff0c\u7528\u4e8e\u5904\u7406\u6587\u4ef6\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<h2><strong>\u62fc\u63a5\u8def\u5f84<\/strong><\/h2>\n<p>file_path = os.path.join(current_directory, &#39;data&#39;, &#39;file.txt&#39;)<\/p>\n<h2><strong>\u68c0\u67e5\u6587\u4ef6\u662f\u5426\u5b58\u5728<\/strong><\/h2>\n<p>if os.path.exists(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>pathlib\u6a21\u5757<\/strong><\/li>\n<\/ol>\n<p><p>pathlib\u6a21\u5757\u662fPython 3.4\u5f15\u5165\u7684\uff0c\u63d0\u4f9b\u4e86\u4e00\u79cd\u9762\u5411\u5bf9\u8c61\u7684\u6587\u4ef6\u8def\u5f84\u5904\u7406\u65b9\u5f0f\uff0c\u63a8\u8350\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u521b\u5efa\u8def\u5f84\u5bf9\u8c61<\/strong><\/h2>\n<p>file_path = Path(&#39;data&#39;) \/ &#39;file.txt&#39;<\/p>\n<h2><strong>\u68c0\u67e5\u6587\u4ef6\u662f\u5426\u5b58\u5728<\/strong><\/h2>\n<p>if file_path.exists():<\/p>\n<p>    with file_path.open(&#39;r&#39;) as file:<\/p>\n<p>        content = file.read()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>pathlib\u7684\u4f18\u52bf\u5728\u4e8e\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u66f4\u52a0\u76f4\u89c2\u548c\u6613\u4e8e\u4f7f\u7528\u7684\u63a5\u53e3\uff0c\u5c24\u5176\u662f\u5728\u5904\u7406\u590d\u6742\u7684\u8def\u5f84\u64cd\u4f5c\u65f6\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u56db\u3001\u8de8\u5e73\u53f0\u8def\u5f84\u5904\u7406<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8de8\u5e73\u53f0\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u9700\u8981\u8003\u8651\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u8def\u5f84\u5206\u9694\u7b26\u5dee\u5f02\u3002os.path\u548cpathlib\u6a21\u5757\u90fd\u53ef\u4ee5\u5e2e\u52a9\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528os\u6a21\u5757<\/strong><\/li>\n<\/ol>\n<p><p>os.path\u6a21\u5757\u4f1a\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u81ea\u52a8\u9009\u62e9\u5408\u9002\u7684\u8def\u5f84\u5206\u9694\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u62fc\u63a5\u8def\u5f84<\/strong><\/h2>\n<p>file_path = os.path.join(&#39;data&#39;, &#39;file.txt&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528pathlib\u6a21\u5757<\/strong><\/li>\n<\/ol>\n<p><p>pathlib\u4e5f\u4f1a\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u81ea\u52a8\u5904\u7406\u8def\u5f84\u5206\u9694\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u521b\u5efa\u8def\u5f84\u5bf9\u8c61<\/strong><\/h2>\n<p>file_path = Path(&#39;data&#39;) \/ &#39;file.txt&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u8def\u5f84\u7684\u5176\u4ed6\u64cd\u4f5c<\/p>\n<\/p>\n<p><p>\u5904\u7406\u6587\u4ef6\u8def\u5f84\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u6267\u884c\u4e00\u4e9b\u5176\u4ed6\u64cd\u4f5c\uff0c\u5982\u83b7\u53d6\u6587\u4ef6\u540d\u3001\u6587\u4ef6\u6269\u5c55\u540d\u3001\u7236\u76ee\u5f55\u7b49\u3002\u8fd9\u4e9b\u64cd\u4f5c\u53ef\u4ee5\u901a\u8fc7os.path\u548cpathlib\u6a21\u5757\u8f7b\u677e\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528os.path\u6a21\u5757<\/strong><\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>file_path = &#39;C:\\\\Users\\\\Username\\\\Documents\\\\file.txt&#39;<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>file_name = os.path.basename(file_path)<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u6269\u5c55\u540d<\/strong><\/h2>\n<p>file_extension = os.path.splitext(file_path)[1]<\/p>\n<h2><strong>\u83b7\u53d6\u7236\u76ee\u5f55<\/strong><\/h2>\n<p>parent_directory = os.path.dirname(file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528pathlib\u6a21\u5757<\/strong><\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>file_path = Path(&#39;C:\/Users\/Username\/Documents\/file.txt&#39;)<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>file_name = file_path.name<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u4ef6\u6269\u5c55\u540d<\/strong><\/h2>\n<p>file_extension = file_path.suffix<\/p>\n<h2><strong>\u83b7\u53d6\u7236\u76ee\u5f55<\/strong><\/h2>\n<p>parent_directory = file_path.parent<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u6307\u5b9a\u548c\u5904\u7406\u6587\u4ef6\u8def\u5f84\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u9009\u62e9\u9002\u5408\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<strong>\u4f7f\u7528pathlib\u6a21\u5757\u662f\u5904\u7406\u6587\u4ef6\u8def\u5f84\u7684\u63a8\u8350\u65b9\u5f0f<\/strong>\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u76f4\u89c2\u7684\u3001\u8de8\u5e73\u53f0\u7684\u63a5\u53e3\uff0c\u6709\u52a9\u4e8e\u7b80\u5316\u8def\u5f84\u64cd\u4f5c\u3002\u65e0\u8bba\u662f\u5904\u7406\u7b80\u5355\u7684\u8def\u5f84\u62fc\u63a5\u8fd8\u662f\u590d\u6742\u7684\u8def\u5f84\u89e3\u6790\uff0cpathlib\u90fd\u80fd\u63d0\u4f9b\u6709\u6548\u7684\u89e3\u51b3\u65b9\u6848\u3002\u901a\u8fc7\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u53ef\u4ee5\u4f7f\u6587\u4ef6\u64cd\u4f5c\u66f4\u52a0\u9ad8\u6548\u548c\u5b89\u5168\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6253\u5f00\u7279\u5b9a\u8def\u5f84\u7684\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u6765\u6253\u5f00\u7279\u5b9a\u8def\u5f84\u7684\u6587\u4ef6\u3002\u53ea\u9700\u63d0\u4f9b\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u4f5c\u4e3a\u5b57\u7b26\u4e32\u53c2\u6570\u3002\u4f8b\u5982\uff0c<code>open(&#39;C:\/Users\/Username\/Documents\/example.txt&#39;, &#39;r&#39;)<\/code>\u5c06\u6253\u5f00\u6307\u5b9a\u8def\u5f84\u7684\u6587\u672c\u6587\u4ef6\u3002\u786e\u4fdd\u8def\u5f84\u683c\u5f0f\u6b63\u786e\uff0c\u4f7f\u7528\u6b63\u659c\u6760\u6216\u53cc\u53cd\u659c\u6760\u4ee5\u907f\u514d\u8f6c\u4e49\u5b57\u7b26\u7684\u95ee\u9898\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u7684\u5185\u5bb9\uff1f<\/strong><br \/>\u8981\u8bfb\u53d6\u7279\u5b9a\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u53ef\u4ee5\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u914d\u5408<code>read()<\/code>\u6216<code>readlines()<\/code>\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>with open(&#39;C:\/path\/to\/your\/file.txt&#39;, &#39;r&#39;) as file:<\/code>\u7ed3\u6784\uff0c\u53ef\u4ee5\u5b89\u5168\u5730\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u5e76\u786e\u4fdd\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\u6587\u4ef6\u3002<code>file.read()<\/code>\u5c06\u8fd4\u56de\u6587\u4ef6\u7684\u5168\u90e8\u5185\u5bb9\uff0c\u800c<code>file.readlines()<\/code>\u5219\u4f1a\u8fd4\u56de\u6587\u4ef6\u4e2d\u6bcf\u4e00\u884c\u7684\u5217\u8868\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u6587\u4ef6\u8def\u5f84\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\uff1f<\/strong><br \/>\u4e3a\u4e86\u786e\u4fdd\u4ee3\u7801\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u65f6\u7684\u517c\u5bb9\u6027\uff0c\u5efa\u8bae\u4f7f\u7528<code>os.path<\/code>\u6a21\u5757\u3002\u901a\u8fc7<code>os.path.join()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u81ea\u52a8\u5904\u7406\u6587\u4ef6\u8def\u5f84\u7684\u5206\u9694\u7b26\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>os.path.join(&#39;C:&#39;, &#39;Users&#39;, &#39;Username&#39;, &#39;Documents&#39;, &#39;example.txt&#39;)<\/code>\u53ef\u4ee5\u751f\u6210\u9002\u5408\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7684\u6587\u4ef6\u8def\u5f84\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u907f\u514d\u786c\u7f16\u7801\u8def\u5f84\u4e2d\u7684\u5206\u9694\u7b26\uff0c\u4ece\u800c\u589e\u5f3a\u4ee3\u7801\u7684\u53ef\u79fb\u690d\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u6307\u5b9a\u7535\u8111\u6587\u4ef6\u7684\u65b9\u5f0f\u5305\u62ec\uff1a\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u3001\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u3001\u5904\u7406\u6587\u4ef6\u8def\u5f84\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\u3001\u4f7f\u7528\u8def\u5f84\u5e93os\u548c [&hellip;]","protected":false},"author":3,"featured_media":1010878,"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\/1010870"}],"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=1010870"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1010870\/revisions"}],"predecessor-version":[{"id":1010882,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1010870\/revisions\/1010882"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1010878"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1010870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1010870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1010870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}