{"id":1121979,"date":"2025-01-08T19:15:43","date_gmt":"2025-01-08T11:15:43","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1121979.html"},"modified":"2025-01-08T19:15:45","modified_gmt":"2025-01-08T11:15:45","slug":"python%e6%89%93%e5%bc%80%e5%90%8e%e5%a6%82%e4%bd%95%e6%96%b0%e5%bb%ba%e6%96%87%e4%bb%b6%e5%a4%b9","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1121979.html","title":{"rendered":"python\u6253\u5f00\u540e\u5982\u4f55\u65b0\u5efa\u6587\u4ef6\u5939"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084026\/cb89bb5e-9fa9-49cd-9821-e1d3119815e3.webp\" alt=\"python\u6253\u5f00\u540e\u5982\u4f55\u65b0\u5efa\u6587\u4ef6\u5939\" \/><\/p>\n<p><p> <strong>Python \u6253\u5f00\u540e\u5982\u4f55\u65b0\u5efa\u6587\u4ef6\u5939\uff1a<\/strong><\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528 os \u6a21\u5757\u3001\u4f7f\u7528 pathlib \u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u5728 Python \u4e2d\u65b0\u5efa\u6587\u4ef6\u5939\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u5176\u4e2d\u4f7f\u7528 os \u6a21\u5757\u548c pathlib \u6a21\u5757\u662f\u6700\u5e38\u89c1\u7684\u4e24\u79cd\u65b9\u5f0f\u3002os \u6a21\u5757\u63d0\u4f9b\u4e86\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5173\u7684\u63a5\u53e3\uff0c\u800c pathlib \u6a21\u5757\u5219\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u6587\u4ef6\u7cfb\u7edf\u8def\u5f84\u64cd\u4f5c\u3002<strong>\u4f7f\u7528 os \u6a21\u5757<\/strong>\u662f\u6700\u4f20\u7edf\u7684\u65b9\u6cd5\uff0c\u5e76\u4e14\u5728\u5904\u7406\u8de8\u5e73\u53f0\u95ee\u9898\u65f6\u8868\u73b0\u51fa\u8272\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e24\u4e2a\u6a21\u5757\u6765\u65b0\u5efa\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528 os \u6a21\u5757<\/h3>\n<\/p>\n<p><p>os \u6a21\u5757\u662f Python \u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u63d0\u4f9b\u4e86\u591a\u79cd\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u4ea4\u4e92\u7684\u529f\u80fd\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528 os \u6a21\u5757\u65b0\u5efa\u6587\u4ef6\u5939\u7684\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def create_directory(path):<\/p>\n<p>    if not os.path.exists(path):<\/p>\n<p>        os.makedirs(path)<\/p>\n<p>        print(f&quot;Directory {path} created successfully&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(f&quot;Directory {path} already exists&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1\u3001\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728<\/h4>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u6587\u4ef6\u5939\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u68c0\u67e5\u8be5\u6587\u4ef6\u5939\u662f\u5426\u5df2\u7ecf\u5b58\u5728\u3002os.path.exists() \u51fd\u6570\u53ef\u4ee5\u7528\u6765\u68c0\u67e5\u67d0\u4e2a\u8def\u5f84\u662f\u5426\u5b58\u5728\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u91cd\u590d\u521b\u5efa\u6587\u4ef6\u5939\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u62a5\u9519\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u521b\u5efa\u6587\u4ef6\u5939<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u8def\u5f84\u4e0d\u5b58\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528 os.makedirs() \u51fd\u6570\u6765\u521b\u5efa\u6587\u4ef6\u5939\u3002\u8fd9\u4e2a\u51fd\u6570\u4e0d\u4ec5\u53ef\u4ee5\u521b\u5efa\u5355\u5c42\u6587\u4ef6\u5939\uff0c\u8fd8\u53ef\u4ee5\u521b\u5efa\u591a\u5c42\u6587\u4ef6\u5939\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8def\u5f84\u4e2d\u5305\u542b\u4e0d\u5b58\u5728\u7684\u7236\u6587\u4ef6\u5939\uff0cos.makedirs() \u4f1a\u81ea\u52a8\u521b\u5efa\u6240\u6709\u5fc5\u9700\u7684\u7236\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">path = &quot;new_folder\/sub_folder&quot;<\/p>\n<p>create_directory(path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0cos.makedirs() \u5c06\u521b\u5efa\u540d\u4e3a &quot;new_folder&quot; \u7684\u7236\u6587\u4ef6\u5939\u548c\u540d\u4e3a &quot;sub_folder&quot; \u7684\u5b50\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528 pathlib \u6a21\u5757<\/h3>\n<\/p>\n<p><p>pathlib \u6a21\u5757\u662f Python 3.4 \u5f15\u5165\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u6587\u4ef6\u7cfb\u7edf\u8def\u5f84\u64cd\u4f5c\u3002\u76f8\u6bd4 os \u6a21\u5757\uff0cpathlib \u66f4\u52a0\u73b0\u4ee3\u5316\u548c\u76f4\u89c2\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>def create_directory(path):<\/p>\n<p>    dir_path = Path(path)<\/p>\n<p>    if not dir_path.exists():<\/p>\n<p>        dir_path.mkdir(parents=True)<\/p>\n<p>        print(f&quot;Directory {path} created successfully&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(f&quot;Directory {path} already exists&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1\u3001\u521b\u5efa Path \u5bf9\u8c61<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a Path \u5bf9\u8c61\u6765\u8868\u793a\u6587\u4ef6\u5939\u8def\u5f84\u3002Path \u662f pathlib \u6a21\u5757\u7684\u6838\u5fc3\u7c7b\uff0c\u4ee3\u8868\u6587\u4ef6\u7cfb\u7edf\u4e2d\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728<\/h4>\n<\/p>\n<p><p>\u4e0e os \u6a21\u5757\u7c7b\u4f3c\uff0c\u53ef\u4ee5\u4f7f\u7528 Path \u5bf9\u8c61\u7684 exists() \u65b9\u6cd5\u6765\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5df2\u7ecf\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u521b\u5efa\u6587\u4ef6\u5939<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u6587\u4ef6\u5939\u4e0d\u5b58\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528 Path \u5bf9\u8c61\u7684 mkdir() \u65b9\u6cd5\u6765\u521b\u5efa\u6587\u4ef6\u5939\u3002\u4e0e os.makedirs() \u7c7b\u4f3c\uff0cmkdir() \u65b9\u6cd5\u4e5f\u652f\u6301\u521b\u5efa\u591a\u5c42\u6587\u4ef6\u5939\uff0c\u53c2\u6570 parents=True \u8868\u793a\u81ea\u52a8\u521b\u5efa\u7236\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">path = &quot;new_folder\/sub_folder&quot;<\/p>\n<p>create_directory(path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0cPath \u5bf9\u8c61\u8868\u793a\u6587\u4ef6\u5939\u8def\u5f84\uff0cmkdir() \u65b9\u6cd5\u5c06\u521b\u5efa\u6240\u6709\u5fc5\u8981\u7684\u7236\u6587\u4ef6\u5939\u548c\u5b50\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u6bd4\u8f83 os \u6a21\u5757\u548c pathlib \u6a21\u5757<\/h3>\n<\/p>\n<p><h4>1\u3001\u6613\u7528\u6027<\/h4>\n<\/p>\n<p><p>pathlib \u6a21\u5757\u63d0\u4f9b\u4e86\u66f4\u76f4\u89c2\u548c\u6613\u7528\u7684\u63a5\u53e3\uff0c\u5c24\u5176\u662f\u5bf9\u4e8e\u590d\u6742\u8def\u5f84\u64cd\u4f5c\uff0cpathlib \u7684\u9762\u5411\u5bf9\u8c61\u8bbe\u8ba1\u4f7f\u4ee3\u7801\u66f4\u7b80\u6d01\u548c\u53ef\u8bfb\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u517c\u5bb9\u6027<\/h4>\n<\/p>\n<p><p>os \u6a21\u5757\u662f Python \u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u517c\u5bb9\u6027\u975e\u5e38\u597d\uff0c\u9002\u7528\u4e8e\u6240\u6709 Python \u7248\u672c\u3002\u800c pathlib \u6a21\u5757\u662f Python 3.4 \u5f15\u5165\u7684\uff0c\u53ea\u9002\u7528\u4e8e Python 3.4 \u53ca\u4ee5\u4e0a\u7248\u672c\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u529f\u80fd<\/h4>\n<\/p>\n<p><p>\u4e24\u8005\u5728\u529f\u80fd\u4e0a\u5927\u81f4\u76f8\u540c\uff0c\u90fd\u53ef\u4ee5\u7528\u4e8e\u521b\u5efa\u6587\u4ef6\u5939\u3001\u68c0\u67e5\u8def\u5f84\u7b49\u64cd\u4f5c\u3002\u4e0d\u8fc7\uff0cpathlib \u7684\u529f\u80fd\u66f4\u4e30\u5bcc\uff0c\u4f8b\u5982\u8fd8\u63d0\u4f9b\u4e86\u8def\u5f84\u7684\u6a21\u5f0f\u5339\u914d\u3001\u8def\u5f84\u7684\u7ec4\u5408\u548c\u62c6\u5206\u7b49\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u6ce8\u610f\u4e8b\u9879<\/h3>\n<\/p>\n<p><h4>1\u3001\u8def\u5f84\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027<\/h4>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6587\u4ef6\u8def\u5f84\u65f6\uff0c\u5c24\u5176\u662f\u6d89\u53ca\u8de8\u5e73\u53f0\u64cd\u4f5c\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u8def\u5f84\u5206\u9694\u7b26\u7684\u517c\u5bb9\u6027\u3002os.path \u548c pathlib \u90fd\u63d0\u4f9b\u4e86\u8de8\u5e73\u53f0\u7684\u8def\u5f84\u64cd\u4f5c\u65b9\u6cd5\uff0c\u5efa\u8bae\u5c3d\u91cf\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u800c\u4e0d\u662f\u624b\u52a8\u62fc\u63a5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5f02\u5e38\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u6587\u4ef6\u5939\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\u60c5\u51b5\uff0c\u4f8b\u5982\u6743\u9650\u4e0d\u8db3\u3001\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\u7b49\u3002\u5efa\u8bae\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u6dfb\u52a0\u5f02\u5e38\u5904\u7406\u4ee3\u7801\uff0c\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def create_directory(path):<\/p>\n<p>    try:<\/p>\n<p>        if not os.path.exists(path):<\/p>\n<p>            os.makedirs(path)<\/p>\n<p>            print(f&quot;Directory {path} created successfully&quot;)<\/p>\n<p>        else:<\/p>\n<p>            print(f&quot;Directory {path} already exists&quot;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;F<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led to create directory {path}: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>def create_directory(path):<\/p>\n<p>    dir_path = Path(path)<\/p>\n<p>    try:<\/p>\n<p>        if not dir_path.exists():<\/p>\n<p>            dir_path.mkdir(parents=True)<\/p>\n<p>            print(f&quot;Directory {path} created successfully&quot;)<\/p>\n<p>        else:<\/p>\n<p>            print(f&quot;Directory {path} already exists&quot;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;Failed to create directory {path}: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728 Python \u4e2d\uff0c\u65b0\u5efa\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u5176\u4e2d\u4f7f\u7528 os \u6a21\u5757\u548c pathlib \u6a21\u5757\u662f\u6700\u5e38\u89c1\u7684\u4e24\u79cd\u65b9\u5f0f\u3002<strong>os \u6a21\u5757\u63d0\u4f9b\u4e86\u4f20\u7edf\u7684\u64cd\u4f5c\u7cfb\u7edf\u63a5\u53e3\uff0c\u9002\u7528\u4e8e\u6240\u6709 Python \u7248\u672c\uff0c\u800c pathlib \u6a21\u5757\u63d0\u4f9b\u4e86\u73b0\u4ee3\u5316\u7684\u9762\u5411\u5bf9\u8c61\u63a5\u53e3\uff0c\u9002\u7528\u4e8e Python 3.4 \u53ca\u4ee5\u4e0a\u7248\u672c<\/strong>\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u5f0f\uff0c\u540c\u65f6\u6ce8\u610f\u8def\u5f84\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\u548c\u5f02\u5e38\u5904\u7406\u3002<\/p>\n<\/p>\n<p><p>\u65b0\u5efa\u6587\u4ef6\u5939\u662f\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\u4e2d\u7684\u57fa\u7840\u4efb\u52a1\u4e4b\u4e00\uff0c\u638c\u63e1\u8fd9\u4e24\u79cd\u65b9\u6cd5\u5c06\u4e3a\u540e\u7eed\u7684\u6587\u4ef6\u64cd\u4f5c\u6253\u4e0b\u575a\u5b9e\u7684\u57fa\u7840\u3002\u65e0\u8bba\u662f\u5904\u7406\u7b80\u5355\u7684\u6587\u4ef6\u5939\u521b\u5efa\u4efb\u52a1\uff0c\u8fd8\u662f\u6d89\u53ca\u590d\u6742\u7684\u8def\u5f84\u64cd\u4f5c\uff0cos \u6a21\u5757\u548c pathlib \u6a21\u5757\u90fd\u80fd\u63d0\u4f9b\u5f3a\u5927\u7684\u652f\u6301\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\u4e2d\u7684<code>mkdir()<\/code>\u6216<code>makedirs()<\/code>\u51fd\u6570\u6765\u521b\u5efa\u65b0\u7684\u6587\u4ef6\u5939\u3002<code>mkdir()<\/code>\u7528\u4e8e\u521b\u5efa\u5355\u4e00\u76ee\u5f55\uff0c\u800c<code>makedirs()<\/code>\u53ef\u4ee5\u521b\u5efa\u591a\u5c42\u7ea7\u7684\u76ee\u5f55\u7ed3\u6784\u3002\u5982\u679c\u6587\u4ef6\u5939\u5df2\u7ecf\u5b58\u5728\uff0c\u4f7f\u7528\u8fd9\u4e24\u4e2a\u51fd\u6570\u5c06\u4f1a\u629b\u51fa\u5f02\u5e38\uff0c\u56e0\u6b64\u9700\u8981\u5728\u521b\u5efa\u4e4b\u524d\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728\u3002<\/p>\n<p><strong>\u521b\u5efa\u6587\u4ef6\u5939\u65f6\u53ef\u4ee5\u6307\u5b9a\u6743\u9650\u5417\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u4f7f\u7528<code>mkdir()<\/code>\u548c<code>makedirs()<\/code>\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>mode<\/code>\u53c2\u6570\u6307\u5b9a\u6587\u4ef6\u5939\u7684\u6743\u9650\u3002\u8fd9\u4e2a\u53c2\u6570\u63a5\u53d7\u516b\u8fdb\u5236\u6570\u5b57\uff0c\u5982<code>0o755<\/code>\uff0c\u8868\u793a\u8bfb\u3001\u5199\u3001\u6267\u884c\u6743\u9650\u3002\u786e\u4fdd\u4f60\u6709\u8db3\u591f\u7684\u6743\u9650\u6765\u8bbe\u7f6e\u8fd9\u4e9b\u9009\u9879\u3002<\/p>\n<p><strong>\u5982\u4f55\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5df2\u6210\u529f\u521b\u5efa\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>os.path.exists()<\/code>\u51fd\u6570\u6765\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5df2\u7ecf\u5b58\u5728\u3002\u521b\u5efa\u6587\u4ef6\u5939\u540e\uff0c\u8c03\u7528\u6b64\u51fd\u6570\u4ee5\u786e\u8ba4\u64cd\u4f5c\u662f\u5426\u6210\u529f\u3002\u5982\u679c\u8fd4\u56de<code>True<\/code>\uff0c\u5219\u8868\u793a\u6587\u4ef6\u5939\u5b58\u5728\uff1b\u5982\u679c\u8fd4\u56de<code>False<\/code>\uff0c\u5219\u9700\u8981\u91cd\u65b0\u68c0\u67e5\u4ee3\u7801\u6216\u8def\u5f84\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python \u6253\u5f00\u540e\u5982\u4f55\u65b0\u5efa\u6587\u4ef6\u5939\uff1a \u4f7f\u7528 os \u6a21\u5757\u3001\u4f7f\u7528 pathlib \u6a21\u5757 \u5728 Python \u4e2d\u65b0\u5efa\u6587 [&hellip;]","protected":false},"author":3,"featured_media":1121987,"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\/1121979"}],"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=1121979"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1121979\/revisions"}],"predecessor-version":[{"id":1121988,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1121979\/revisions\/1121988"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1121987"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1121979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1121979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1121979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}