{"id":1079019,"date":"2025-01-08T12:17:03","date_gmt":"2025-01-08T04:17:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1079019.html"},"modified":"2025-01-08T12:17:05","modified_gmt":"2025-01-08T04:17:05","slug":"%e7%94%a8python%e5%86%99%e6%96%87%e4%bb%b6%e5%a6%82%e4%bd%95%e8%ae%be%e7%bd%ae%e4%bf%9d%e5%ad%98%e8%b7%af%e5%be%84-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1079019.html","title":{"rendered":"\u7528python\u5199\u6587\u4ef6\u5982\u4f55\u8bbe\u7f6e\u4fdd\u5b58\u8def\u5f84"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24182253\/f48651f5-870c-48df-802a-7f65c6cfab7a.webp\" alt=\"\u7528python\u5199\u6587\u4ef6\u5982\u4f55\u8bbe\u7f6e\u4fdd\u5b58\u8def\u5f84\" \/><\/p>\n<p><p> \u5728 Python \u4e2d\u5199\u6587\u4ef6\u5e76\u8bbe\u7f6e\u4fdd\u5b58\u8def\u5f84\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u7684 <code>open<\/code> \u51fd\u6570\u6765\u5b9e\u73b0\u3002<strong>\u4f60\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u3001\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u3001\u786e\u4fdd\u8def\u5f84\u5b58\u5728\u3001\u5904\u7406\u8def\u5f84\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26<\/strong>\u7b49\u65b9\u6cd5\u6765\u8bbe\u7f6e\u4fdd\u5b58\u8def\u5f84\u3002\u4e0b\u9762\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u7684\u4e00\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u6307\u5b9a\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u5728 <code>open<\/code> \u51fd\u6570\u4e2d\u63d0\u4f9b\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\uff0c\u53ef\u4ee5\u7cbe\u786e\u5730\u63a7\u5236\u6587\u4ef6\u7684\u4fdd\u5b58\u4f4d\u7f6e\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file_path = &quot;\/Users\/username\/Documents\/testfile.txt&quot;<\/p>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u6307\u5b9a\u4e86\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84 <code>\/Users\/username\/Documents\/testfile.txt<\/code>\uff0c\u5e76\u7528\u5199\u6a21\u5f0f\uff08<code>&quot;w&quot;<\/code>\uff09\u6253\u5f00\u6587\u4ef6\u8fdb\u884c\u5199\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84<\/h3>\n<\/p>\n<p><p>\u76f8\u5bf9\u8def\u5f84\u662f\u57fa\u4e8e\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u7684\u8def\u5f84\u3002\u5982\u679c\u4e0d\u60f3\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\uff0c\u53ef\u4ee5\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u6765\u6307\u5b9a\u6587\u4ef6\u4f4d\u7f6e\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file_path = &quot;subdirectory\/testfile.txt&quot;<\/p>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file in a subdirectory.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6587\u4ef6\u5c06\u88ab\u4fdd\u5b58\u5230\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\u7684 <code>subdirectory<\/code> \u76ee\u5f55\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u786e\u4fdd\u8def\u5f84\u5b58\u5728<\/h3>\n<\/p>\n<p><p>\u5728\u5199\u6587\u4ef6\u4e4b\u524d\uff0c\u786e\u4fdd\u8def\u5f84\u5b58\u5728\u662f\u5f88\u91cd\u8981\u7684\u3002\u5982\u679c\u8def\u5f84\u4e0d\u5b58\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>os<\/code> \u6a21\u5757\u4e2d\u7684 <code>os.makedirs<\/code> \u65b9\u6cd5\u6765\u521b\u5efa\u6240\u9700\u7684\u76ee\u5f55\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>directory = &quot;\/Users\/username\/Documents\/subdirectory&quot;<\/p>\n<p>if not os.path.exists(directory):<\/p>\n<p>    os.makedirs(directory)<\/p>\n<p>file_path = os.path.join(directory, &quot;testfile.txt&quot;)<\/p>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file in a newly created subdirectory.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u68c0\u67e5\u76ee\u5f55\u662f\u5426\u5b58\u5728\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u5219\u521b\u5efa\u5b83\uff0c\u7136\u540e\u5c06\u6587\u4ef6\u4fdd\u5b58\u5230\u8be5\u76ee\u5f55\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u8def\u5f84\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26<\/h3>\n<\/p>\n<p><p>\u5728\u6307\u5b9a\u8def\u5f84\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7279\u6b8a\u5b57\u7b26\u6216\u8005\u9700\u8981\u5904\u7406\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u8def\u5f84\u5206\u9694\u7b26\u3002\u53ef\u4ee5\u4f7f\u7528 <code>os.path<\/code> \u6a21\u5757\u4e2d\u7684 <code>os.path.join<\/code> \u65b9\u6cd5\u6765\u5904\u7406\u8fd9\u4e9b\u60c5\u51b5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>base_dir = &quot;\/Users\/username\/Documents&quot;<\/p>\n<p>sub_dir = &quot;subdirectory&quot;<\/p>\n<p>file_name = &quot;testfile.txt&quot;<\/p>\n<p>file_path = os.path.join(base_dir, sub_dir, file_name)<\/p>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file with a path constructed using os.path.join.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528 <code>os.path.join<\/code> \u65b9\u6cd5\u53ef\u4ee5\u786e\u4fdd\u8def\u5f84\u6784\u5efa\u65f6\u4f7f\u7528\u6b63\u786e\u7684\u8def\u5f84\u5206\u9694\u7b26\uff0c\u907f\u514d\u4e86\u624b\u52a8\u62fc\u63a5\u5b57\u7b26\u4e32\u65f6\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528 pathlib \u6a21\u5757<\/h3>\n<\/p>\n<p><p>Python 3.4 \u5f15\u5165\u4e86 <code>pathlib<\/code> \u6a21\u5757\uff0c\u4f7f\u5f97\u5904\u7406\u8def\u5f84\u66f4\u52a0\u65b9\u4fbf\u548c\u76f4\u89c2\u3002\u53ef\u4ee5\u4f7f\u7528 <code>pathlib<\/code> \u6a21\u5757\u6765\u8bbe\u7f6e\u4fdd\u5b58\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u5b9a\u4e49\u6587\u4ef6\u8def\u5f84<\/strong><\/h2>\n<p>file_path = Path(&quot;\/Users\/username\/Documents\/subdirectory\/testfile.txt&quot;)<\/p>\n<h2><strong>\u786e\u4fdd\u76ee\u5f55\u5b58\u5728<\/strong><\/h2>\n<p>file_path.parent.mkdir(parents=True, exist_ok=True)<\/p>\n<h2><strong>\u5199\u6587\u4ef6<\/strong><\/h2>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file using pathlib.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 <code>Path<\/code> \u5bf9\u8c61\u6765\u5b9a\u4e49\u6587\u4ef6\u8def\u5f84\uff0c\u5e76\u4f7f\u7528 <code>mkdir<\/code> \u65b9\u6cd5\u786e\u4fdd\u76ee\u5f55\u5b58\u5728\uff0c\u7136\u540e\u8fdb\u884c\u6587\u4ef6\u5199\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u6587\u4ef6\u8def\u5f84\u4e2d\u7684\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6587\u4ef6\u8def\u5f84\u53ef\u80fd\u5305\u542b\u53d8\u91cf\u3002\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u65b9\u6cd5\u6765\u5904\u7406\u8def\u5f84\u4e2d\u7684\u53d8\u91cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">username = &quot;username&quot;<\/p>\n<p>document_name = &quot;testfile&quot;<\/p>\n<p>directory = f&quot;\/Users\/{username}\/Documents\/subdirectory&quot;<\/p>\n<p>file_name = f&quot;{document_name}.txt&quot;<\/p>\n<p>file_path = os.path.join(directory, file_name)<\/p>\n<p>if not os.path.exists(directory):<\/p>\n<p>    os.makedirs(directory)<\/p>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file with a path cont<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ning variables.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\uff0c\u53ef\u4ee5\u52a8\u6001\u751f\u6210\u8def\u5f84\u5e76\u8fdb\u884c\u6587\u4ef6\u5199\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u5904\u7406\u8def\u5f84\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\u548c\u7a7a\u683c<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u8def\u5f84\u4e2d\u53ef\u80fd\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u6216\u7a7a\u683c\uff0c\u9700\u8981\u5c0f\u5fc3\u5904\u7406\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">special_directory = &quot;\/Users\/username\/Documents\/special char_dir&quot;<\/p>\n<p>file_name = &quot;test file.txt&quot;<\/p>\n<p>file_path = os.path.join(special_directory, file_name)<\/p>\n<p>if not os.path.exists(special_directory):<\/p>\n<p>    os.makedirs(special_directory)<\/p>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file with special characters and spaces in the path.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u5904\u7406\u8def\u5f84\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u5dee\u5f02<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6587\u4ef6\u8def\u5f84\u65f6\uff0c\u9700\u8981\u8003\u8651\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u5dee\u5f02\u3002\u4f8b\u5982\uff0cWindows \u4f7f\u7528\u53cd\u659c\u6760 <code><\/code> \u4f5c\u4e3a\u8def\u5f84\u5206\u9694\u7b26\uff0c\u800c Unix \u548c macOS \u4f7f\u7528\u6b63\u659c\u6760 <code>\/<\/code>\u3002\u53ef\u4ee5\u4f7f\u7528 <code>os.path<\/code> \u6a21\u5757\u4e2d\u7684 <code>os.path.sep<\/code> \u6765\u5904\u7406\u8fd9\u4e9b\u5dee\u5f02\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>base_dir = &quot;C:&quot; if os.name == &quot;nt&quot; else &quot;\/Users\/username\/Documents&quot;<\/p>\n<p>sub_dir = &quot;subdirectory&quot;<\/p>\n<p>file_name = &quot;testfile.txt&quot;<\/p>\n<p>file_path = os.path.join(base_dir, sub_dir, file_name)<\/p>\n<p>if not os.path.exists(os.path.dirname(file_path)):<\/p>\n<p>    os.makedirs(os.path.dirname(file_path))<\/p>\n<p>with open(file_path, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;This is a test file with OS-specific path handling.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u7ed3\u8bba<\/h3>\n<\/p>\n<p><p>\u5728 Python \u4e2d\u5199\u6587\u4ef6\u5e76\u8bbe\u7f6e\u4fdd\u5b58\u8def\u5f84\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\u3002<strong>\u6307\u5b9a\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u3001\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u3001\u786e\u4fdd\u8def\u5f84\u5b58\u5728\u3001\u5904\u7406\u8def\u5f84\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\u3001\u4f7f\u7528 <code>pathlib<\/code> \u6a21\u5757\u3001\u5904\u7406\u8def\u5f84\u4e2d\u7684\u53d8\u91cf\u3001\u5904\u7406\u7279\u6b8a\u5b57\u7b26\u548c\u7a7a\u683c\u3001\u5904\u7406\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u8def\u5f84\u5dee\u5f02<\/strong>\u7b49\u65b9\u6cd5\u90fd\u53ef\u4ee5\u5e2e\u52a9\u4f60\u6709\u6548\u5730\u7ba1\u7406\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84\u3002\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u5199\u64cd\u4f5c\u7684\u987a\u5229\u8fdb\u884c\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u7406\u89e3\u548c\u5e94\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5728 Python \u4e2d\u7075\u6d3b\u5730\u5904\u7406\u6587\u4ef6\u8def\u5f84\uff0c\u786e\u4fdd\u6587\u4ef6\u4fdd\u5b58\u5230\u9884\u671f\u7684\u4f4d\u7f6e\uff0c\u5e76\u907f\u514d\u5e38\u89c1\u7684\u8def\u5f84\u5904\u7406\u9519\u8bef\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6307\u5b9a\u6587\u4ef6\u7684\u4fdd\u5b58\u8def\u5f84\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728\u6587\u4ef6\u64cd\u4f5c\u65f6\u63d0\u4f9b\u5b8c\u6574\u7684\u8def\u5f84\u6765\u6307\u5b9a\u6587\u4ef6\u7684\u4fdd\u5b58\u4f4d\u7f6e\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u5199\u6210<code>open(&#39;\/path\/to\/directory\/filename.txt&#39;, &#39;w&#39;)<\/code>\uff0c\u8fd9\u6837\u6587\u4ef6\u4f1a\u88ab\u4fdd\u5b58\u5230\u60a8\u6307\u5b9a\u7684\u76ee\u5f55\u4e2d\u3002\u786e\u4fdd\u8def\u5f84\u6b63\u786e\uff0c\u5e76\u5177\u6709\u5199\u5165\u6743\u9650\uff0c\u4ee5\u907f\u514d\u9519\u8bef\u3002<\/p>\n<p><strong>Python\u652f\u6301\u54ea\u4e9b\u6587\u4ef6\u8def\u5f84\u683c\u5f0f\uff1f<\/strong><br \/>Python\u652f\u6301\u591a\u79cd\u683c\u5f0f\u7684\u6587\u4ef6\u8def\u5f84\uff0c\u5305\u62ec\u7edd\u5bf9\u8def\u5f84\u548c\u76f8\u5bf9\u8def\u5f84\u3002\u7edd\u5bf9\u8def\u5f84\u662f\u4ece\u7cfb\u7edf\u6839\u76ee\u5f55\u5f00\u59cb\u7684\u5b8c\u6574\u8def\u5f84\uff0c\u4f8b\u5982<code>C:\/Users\/YourName\/Documents\/filename.txt<\/code>\u3002\u76f8\u5bf9\u8def\u5f84\u5219\u662f\u76f8\u5bf9\u4e8e\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u7684\u8def\u5f84\uff0c\u4f8b\u5982<code>Documents\/filename.txt<\/code>\u3002\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u5904\u7406\u8def\u5f84\u95ee\u9898\uff0c\u4ee5\u786e\u4fdd\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u4fdd\u5728Python\u4e2d\u521b\u5efa\u7684\u6587\u4ef6\u8def\u5f84\u5b58\u5728\uff1f<\/strong><br \/>\u5728\u5c1d\u8bd5\u5199\u5165\u6587\u4ef6\u4e4b\u524d\uff0c\u5efa\u8bae\u4f7f\u7528<code>os.makedirs()<\/code>\u51fd\u6570\u6765\u68c0\u67e5\u5e76\u521b\u5efa\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\n\ndirectory = &#39;\/path\/to\/directory&#39;\nif not os.path.exists(directory):\n    os.makedirs(directory)\n\nwith open(os.path.join(directory, &#39;filename.txt&#39;), &#39;w&#39;) as file:\n    file.write(&#39;Hello, World!&#39;)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u786e\u4fdd\u6307\u5b9a\u7684\u76ee\u5f55\u5b58\u5728\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u5219\u4f1a\u521b\u5efa\u5b83\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u56e0\u76ee\u5f55\u4e0d\u5b58\u5728\u800c\u5bfc\u81f4\u7684\u9519\u8bef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728 Python \u4e2d\u5199\u6587\u4ef6\u5e76\u8bbe\u7f6e\u4fdd\u5b58\u8def\u5f84\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u7684 open \u51fd\u6570\u6765\u5b9e\u73b0\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84 [&hellip;]","protected":false},"author":3,"featured_media":1079025,"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\/1079019"}],"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=1079019"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1079019\/revisions"}],"predecessor-version":[{"id":1079026,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1079019\/revisions\/1079026"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1079025"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1079019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1079019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1079019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}