{"id":1148628,"date":"2025-01-13T16:39:39","date_gmt":"2025-01-13T08:39:39","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1148628.html"},"modified":"2025-01-13T16:39:42","modified_gmt":"2025-01-13T08:39:42","slug":"%e5%a6%82%e4%bd%95python%e9%87%8d%e5%91%bd%e5%90%8d%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1148628.html","title":{"rendered":"\u5982\u4f55python\u91cd\u547d\u540d\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25172351\/98e0a773-a230-489d-adc4-a007927645c1.webp\" alt=\"\u5982\u4f55python\u91cd\u547d\u540d\u6587\u4ef6\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u91cd\u547d\u540d\u6587\u4ef6\u53ef\u4ee5\u901a\u8fc7<strong>os.rename()<\/strong>\u3001<strong>shutil.move()<\/strong>\u3001\u4ee5\u53ca<strong>pathlib.Path.rename()<\/strong>\u8fd9\u51e0\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002\u8fd9\u4e09\u79cd\u65b9\u6cd5\u5404\u6709\u5176\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\uff0c\u5177\u4f53\u9009\u62e9\u54ea\u4e00\u79cd\u65b9\u6cd5\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u6765\u51b3\u5b9a\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\uff0c\u5e76\u5bf9\u5176\u4e2d\u7684<strong>os.rename()<\/strong>\u65b9\u6cd5\u8fdb\u884c\u8be6\u7ec6\u63cf\u8ff0\u3002<\/p>\n<\/p>\n<p><p><strong>os.rename()<\/strong>\u3001<strong>shutil.move()<\/strong>\u3001<strong>pathlib.Path.rename()<\/strong>\uff0c<strong>os.rename()<\/strong>\u65b9\u6cd5\u662f\u6700\u5e38\u7528\u7684\uff0c\u56e0\u4e3a\u5b83\u662fPython\u6807\u51c6\u5e93\u4e2dos\u6a21\u5757\u7684\u4e00\u90e8\u5206\uff0c\u64cd\u4f5c\u7b80\u5355\u4e14\u9002\u7528\u8303\u56f4\u5e7f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001os.rename() \u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>os.rename()\u662fPython\u6807\u51c6\u5e93\u4e2d\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u7528\u4e8e\u5c06\u6587\u4ef6\u6216\u76ee\u5f55\u4ece\u4e00\u4e2a\u8def\u5f84\u91cd\u547d\u540d\u6216\u79fb\u52a8\u5230\u53e6\u4e00\u4e2a\u8def\u5f84\u3002\u5176\u57fa\u672c\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>os.rename(src, dst)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>src<\/code>\u662f\u6e90\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8def\u5f84\uff0c<code>dst<\/code>\u662f\u76ee\u6807\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u65b0\u8def\u5f84\u6216\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h4>\u4f7f\u7528os.rename()\u8fdb\u884c\u6587\u4ef6\u91cd\u547d\u540d<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528os.rename()\u91cd\u547d\u540d\u6587\u4ef6\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u539f\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>old_name = &#39;old_filename.txt&#39;<\/p>\n<h2><strong>\u65b0\u6587\u4ef6\u540d<\/strong><\/h2>\n<p>new_name = &#39;new_filename.txt&#39;<\/p>\n<h2><strong>\u91cd\u547d\u540d\u6587\u4ef6<\/strong><\/h2>\n<p>os.rename(old_name, new_name)<\/p>\n<p>print(f&quot;\u6587\u4ef6\u5df2\u91cd\u547d\u540d\u4e3a {new_name}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b9a\u4e49\u4e86\u65e7\u6587\u4ef6\u540d\u548c\u65b0\u6587\u4ef6\u540d\uff0c\u7136\u540e\u4f7f\u7528os.rename()\u51fd\u6570\u5c06\u65e7\u6587\u4ef6\u540d\u6539\u4e3a\u65b0\u6587\u4ef6\u540d\u3002\u6267\u884c\u8fd9\u6bb5\u4ee3\u7801\u540e\uff0c\u6587\u4ef6\u5c06\u88ab\u91cd\u547d\u540d\u3002<\/p>\n<\/p>\n<p><h4>\u5904\u7406\u91cd\u547d\u540d\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef<\/h4>\n<\/p>\n<p><p>\u5728\u91cd\u547d\u540d\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u9519\u8bef\uff0c\u4f8b\u5982\u6587\u4ef6\u4e0d\u5b58\u5728\u3001\u76ee\u6807\u6587\u4ef6\u5df2\u5b58\u5728\u7b49\u3002\u4e3a\u4e86\u5904\u7406\u8fd9\u4e9b\u9519\u8bef\uff0c\u53ef\u4ee5\u4f7f\u7528try-except\u8bed\u53e5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>old_name = &#39;old_filename.txt&#39;<\/p>\n<p>new_name = &#39;new_filename.txt&#39;<\/p>\n<p>try:<\/p>\n<p>    os.rename(old_name, new_name)<\/p>\n<p>    print(f&quot;\u6587\u4ef6\u5df2\u91cd\u547d\u540d\u4e3a {new_name}&quot;)<\/p>\n<p>except FileNotFoundError:<\/p>\n<p>    print(f&quot;\u9519\u8bef: \u6587\u4ef6 {old_name} \u4e0d\u5b58\u5728&quot;)<\/p>\n<p>except FileExistsError:<\/p>\n<p>    print(f&quot;\u9519\u8bef: \u6587\u4ef6 {new_name} \u5df2\u7ecf\u5b58\u5728&quot;)<\/p>\n<p>except Exception as e:<\/p>\n<p>    print(f&quot;\u53d1\u751f\u9519\u8bef: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u5904\u7406\u91cd\u547d\u540d\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u51fa\u73b0\u7684\u5404\u79cd\u9519\u8bef\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001shutil.move() \u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>shutil.move()\u51fd\u6570\u662fPython\u6807\u51c6\u5e93shutil\u6a21\u5757\u4e2d\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u4e3b\u8981\u7528\u4e8e\u79fb\u52a8\u6587\u4ef6\u6216\u76ee\u5f55\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u4e8e\u91cd\u547d\u540d\u6587\u4ef6\u3002\u5176\u57fa\u672c\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import shutil<\/p>\n<p>shutil.move(src, dst)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>src<\/code>\u662f\u6e90\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8def\u5f84\uff0c<code>dst<\/code>\u662f\u76ee\u6807\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u65b0\u8def\u5f84\u6216\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h4>\u4f7f\u7528shutil.move()\u8fdb\u884c\u6587\u4ef6\u91cd\u547d\u540d<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528shutil.move()\u91cd\u547d\u540d\u6587\u4ef6\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import shutil<\/p>\n<p>old_name = &#39;old_filename.txt&#39;<\/p>\n<p>new_name = &#39;new_filename.txt&#39;<\/p>\n<p>shutil.move(old_name, new_name)<\/p>\n<p>print(f&quot;\u6587\u4ef6\u5df2\u91cd\u547d\u540d\u4e3a {new_name}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0eos.rename()\u7c7b\u4f3c\uff0cshutil.move()\u4e5f\u53ef\u4ee5\u5c06\u6587\u4ef6\u4ece\u4e00\u4e2a\u8def\u5f84\u79fb\u52a8\u5230\u53e6\u4e00\u4e2a\u8def\u5f84\uff0c\u5982\u679c\u76ee\u6807\u8def\u5f84\u53ea\u5305\u542b\u6587\u4ef6\u540d\uff0c\u5219\u76f8\u5f53\u4e8e\u91cd\u547d\u540d\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001pathlib.Path.rename() \u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>pathlib\u662fPython 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\u3002pathlib.Path.rename()\u662fpathlib\u6a21\u5757\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u7528\u4e8e\u91cd\u547d\u540d\u6587\u4ef6\u6216\u76ee\u5f55\u3002\u5176\u57fa\u672c\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>path = Path(src)<\/p>\n<p>path.rename(dst)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>src<\/code>\u662f\u6e90\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8def\u5f84\uff0c<code>dst<\/code>\u662f\u76ee\u6807\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u65b0\u8def\u5f84\u6216\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h4>\u4f7f\u7528pathlib.Path.rename()\u8fdb\u884c\u6587\u4ef6\u91cd\u547d\u540d<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528pathlib.Path.rename()\u91cd\u547d\u540d\u6587\u4ef6\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>old_name = Path(&#39;old_filename.txt&#39;)<\/p>\n<p>new_name = Path(&#39;new_filename.txt&#39;)<\/p>\n<p>old_name.rename(new_name)<\/p>\n<p>print(f&quot;\u6587\u4ef6\u5df2\u91cd\u547d\u540d\u4e3a {new_name}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>pathlib\u63d0\u4f9b\u4e86\u66f4\u73b0\u4ee3\u3001\u66f4\u7b80\u6d01\u7684\u6587\u4ef6\u7cfb\u7edf\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\uff0c\u56e0\u6b64\u5728Python 3.4\u53ca\u4ee5\u4e0a\u7248\u672c\u4e2d\uff0cpathlib.Path.rename()\u4e5f\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6279\u91cf\u91cd\u547d\u540d\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6709\u65f6\u9700\u8981\u6279\u91cf\u91cd\u547d\u540d\u591a\u4e2a\u6587\u4ef6\u3002\u53ef\u4ee5\u7ed3\u5408os.listdir()\u51fd\u6570\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5\u8fdb\u884c\u91cd\u547d\u540d\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u6279\u91cf\u91cd\u547d\u540d\u6587\u4ef6\u7684\u793a\u4f8b\uff1a<\/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 = &#39;path\/to\/directory&#39;<\/p>\n<h2><strong>\u65b0\u6587\u4ef6\u540d\u524d\u7f00<\/strong><\/h2>\n<p>new_prefix = &#39;new_filename_&#39;<\/p>\n<h2><strong>\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6<\/strong><\/h2>\n<p>for i, filename in enumerate(os.listdir(directory)):<\/p>\n<p>    old_path = os.path.join(directory, filename)<\/p>\n<p>    new_path = os.path.join(directory, f&quot;{new_prefix}{i}.txt&quot;)<\/p>\n<p>    try:<\/p>\n<p>        os.rename(old_path, new_path)<\/p>\n<p>        print(f&quot;\u6587\u4ef6 {filename} \u5df2\u91cd\u547d\u540d\u4e3a {new_prefix}{i}.txt&quot;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;\u91cd\u547d\u540d\u6587\u4ef6 {filename} \u65f6\u53d1\u751f\u9519\u8bef: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b9a\u4e49\u4e86\u76ee\u5f55\u8def\u5f84\u548c\u65b0\u6587\u4ef6\u540d\u524d\u7f00\uff0c\u7136\u540e\u4f7f\u7528os.listdir()\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\uff0c\u5e76\u9010\u4e00\u4f7f\u7528os.rename()\u8fdb\u884c\u91cd\u547d\u540d\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5c0f\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u51e0\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u5b9e\u73b0\u6587\u4ef6\u91cd\u547d\u540d\u64cd\u4f5c\u3002<strong>os.rename()<\/strong>\u65b9\u6cd5\u662f\u6700\u5e38\u7528\u7684\uff0c\u9002\u7528\u8303\u56f4\u5e7f\u4e14\u64cd\u4f5c\u7b80\u5355\u3002<strong>shutil.move()<\/strong>\u65b9\u6cd5\u4e0d\u4ec5\u53ef\u4ee5\u7528\u4e8e\u91cd\u547d\u540d\u6587\u4ef6\uff0c\u8fd8\u53ef\u4ee5\u7528\u4e8e\u79fb\u52a8\u6587\u4ef6\u6216\u76ee\u5f55\u3002<strong>pathlib.Path.rename()<\/strong>\u65b9\u6cd5\u5219\u63d0\u4f9b\u4e86\u66f4\u73b0\u4ee3\u7684\u6587\u4ef6\u7cfb\u7edf\u8def\u5f84\u64cd\u4f5c\u65b9\u5f0f\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u8fdb\u884c\u6587\u4ef6\u91cd\u547d\u540d\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u7ed3\u5408os.listdir()\u51fd\u6570\u5b9e\u73b0\u6279\u91cf\u91cd\u547d\u540d\u6587\u4ef6\u7684\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u91cd\u547d\u540d\u591a\u4e2a\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u7ed3\u5408\u5faa\u73af\u6765\u91cd\u547d\u540d\u591a\u4e2a\u6587\u4ef6\u3002\u9996\u5148\uff0c\u4f7f\u7528<code>os.listdir()<\/code>\u65b9\u6cd5\u5217\u51fa\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\uff0c\u7136\u540e\u4f7f\u7528<code>os.rename()<\/code>\u51fd\u6570\u5bf9\u6bcf\u4e2a\u6587\u4ef6\u8fdb\u884c\u91cd\u547d\u540d\u3002\u53ef\u4ee5\u901a\u8fc7\u5b57\u7b26\u4e32\u64cd\u4f5c\u6765\u52a8\u6001\u751f\u6210\u65b0\u7684\u6587\u4ef6\u540d\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u5728\u6587\u4ef6\u540d\u4e2d\u6dfb\u52a0\u524d\u7f00\u6216\u540e\u7f00\uff0c\u6216\u8005\u66f4\u6539\u6587\u4ef6\u6269\u5c55\u540d\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u4f7f\u7528Python\u91cd\u547d\u540d\u6587\u4ef6\u800c\u4e0d\u8986\u76d6\u73b0\u6709\u6587\u4ef6\uff1f<\/strong><br \/>\u786e\u5b9e\u53ef\u4ee5\u3002\u5728\u91cd\u547d\u540d\u6587\u4ef6\u4e4b\u524d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>os.path.exists()<\/code>\u65b9\u6cd5\u68c0\u67e5\u76ee\u6807\u6587\u4ef6\u540d\u662f\u5426\u5df2\u7ecf\u5b58\u5728\u3002\u5982\u679c\u5b58\u5728\uff0c\u53ef\u4ee5\u9009\u62e9\u6dfb\u52a0\u4e00\u4e2a\u6570\u5b57\u540e\u7f00\u6216\u5176\u4ed6\u6807\u8bc6\u7b26\u6765\u786e\u4fdd\u65b0\u6587\u4ef6\u540d\u7684\u552f\u4e00\u6027\uff0c\u4ece\u800c\u907f\u514d\u610f\u5916\u8986\u76d6\u3002<\/p>\n<p><strong>\u5728\u91cd\u547d\u540d\u6587\u4ef6\u65f6\u5982\u4f55\u5904\u7406\u6587\u4ef6\u8def\u5f84\uff1f<\/strong><br \/>\u5f53\u60a8\u91cd\u547d\u540d\u6587\u4ef6\u65f6\uff0c\u786e\u4fdd\u63d0\u4f9b\u5b8c\u6574\u7684\u6587\u4ef6\u8def\u5f84\u3002\u5982\u679c\u6587\u4ef6\u4e0d\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.path.join()<\/code>\u5c06\u76ee\u5f55\u8def\u5f84\u4e0e\u6587\u4ef6\u540d\u7ed3\u5408\u8d77\u6765\uff0c\u5f62\u6210\u4e00\u4e2a\u5b8c\u6574\u7684\u8def\u5f84\u3002\u8fd9\u5c06\u5e2e\u52a9\u60a8\u51c6\u786e\u5b9a\u4f4d\u6587\u4ef6\u5e76\u8fdb\u884c\u91cd\u547d\u540d\uff0c\u907f\u514d\u51fa\u73b0\u201c\u6587\u4ef6\u672a\u627e\u5230\u201d\u7684\u9519\u8bef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u91cd\u547d\u540d\u6587\u4ef6\u53ef\u4ee5\u901a\u8fc7os.rename()\u3001shutil.move()\u3001\u4ee5\u53capathlib.Pa [&hellip;]","protected":false},"author":3,"featured_media":1148635,"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\/1148628"}],"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=1148628"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1148628\/revisions"}],"predecessor-version":[{"id":1148637,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1148628\/revisions\/1148637"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1148635"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1148628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1148628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1148628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}