{"id":1114322,"date":"2025-01-08T17:56:06","date_gmt":"2025-01-08T09:56:06","guid":{"rendered":""},"modified":"2025-01-08T17:56:09","modified_gmt":"2025-01-08T09:56:09","slug":"python%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%ad%e7%9b%ae%e5%bd%95%e6%9c%89%e6%b2%a1%e6%9c%89%e8%bf%99%e4%b8%aa%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1114322.html","title":{"rendered":"python\u5982\u4f55\u5224\u65ad\u76ee\u5f55\u6709\u6ca1\u6709\u8fd9\u4e2a\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25075545\/9136b887-2e64-4e71-b609-76fef677db4f.webp\" alt=\"python\u5982\u4f55\u5224\u65ad\u76ee\u5f55\u6709\u6ca1\u6709\u8fd9\u4e2a\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>Python\u5224\u65ad\u76ee\u5f55\u662f\u5426\u5305\u542b\u7279\u5b9a\u6587\u4ef6\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528os\u6a21\u5757\u3001\u4f7f\u7528pathlib\u6a21\u5757\u3001\u4f7f\u7528glob\u6a21\u5757\u3002<\/strong> \u5728\u8fd9\u4e09\u79cd\u65b9\u6cd5\u4e2d\uff0c\u4f7f\u7528os\u6a21\u5757\u548cpathlib\u6a21\u5757\u662f\u6700\u5e38\u89c1\u7684\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e09\u79cd\u65b9\u6cd5\uff0c\u5e76\u4e3e\u4f8b\u8bf4\u660e\u5982\u4f55\u4f7f\u7528\u5b83\u4eec\u6765\u5224\u65ad\u76ee\u5f55\u4e2d\u662f\u5426\u5305\u542b\u67d0\u4e2a\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528os\u6a21\u5757<\/h3>\n<\/p>\n<p><p>os\u6a21\u5757\u662fPython\u6807\u51c6\u5e93\u4e2d\u7528\u4e8e\u8fdb\u884c\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u529f\u80fd\u7684\u63a5\u53e3\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528os\u6a21\u5757\u4e2d\u7684\u51fd\u6570\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><h4>1\u3001os.path.isfile()<\/h4>\n<\/p>\n<p><p>os.path.isfile()\u51fd\u6570\u7528\u4e8e\u5224\u65ad\u8def\u5f84\u662f\u5426\u4e3a\u6587\u4ef6\u3002\u6211\u4eec\u53ef\u4ee5\u7ed3\u5408os.path.join()\u51fd\u6570\u6765\u6784\u5efa\u6587\u4ef6\u8def\u5f84\uff0c\u7136\u540e\u4f7f\u7528os.path.isfile()\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def file_exists(directory, filename):<\/p>\n<p>    filepath = os.path.join(directory, filename)<\/p>\n<p>    return os.path.isfile(filepath)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>directory = &#39;\/path\/to\/directory&#39;<\/p>\n<p>filename = &#39;example.txt&#39;<\/p>\n<p>if file_exists(directory, filename):<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; exists in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; does not exist in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u4f7f\u7528os.path.join()\u5c06\u76ee\u5f55\u8def\u5f84\u548c\u6587\u4ef6\u540d\u62fc\u63a5\u6210\u6587\u4ef6\u8def\u5f84\uff0c\u7136\u540e\u4f7f\u7528os.path.isfile()\u5224\u65ad\u8be5\u8def\u5f84\u662f\u5426\u4e3a\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2\u3001os.listdir()<\/h4>\n<\/p>\n<p><p>os.listdir()\u51fd\u6570\u7528\u4e8e\u5217\u51fa\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\u3002\u6211\u4eec\u53ef\u4ee5\u904d\u5386\u8fd9\u4e2a\u5217\u8868\u6765\u68c0\u67e5\u662f\u5426\u5305\u542b\u7279\u5b9a\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def file_exists(directory, filename):<\/p>\n<p>    return filename in os.listdir(directory)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>directory = &#39;\/path\/to\/directory&#39;<\/p>\n<p>filename = &#39;example.txt&#39;<\/p>\n<p>if file_exists(directory, filename):<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; exists in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; does not exist in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528os.listdir()\u83b7\u53d6\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\uff0c\u7136\u540e\u68c0\u67e5\u6587\u4ef6\u540d\u662f\u5426\u5728\u8fd9\u4e2a\u5217\u8868\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528pathlib\u6a21\u5757<\/h3>\n<\/p>\n<p><p>pathlib\u6a21\u5757\u662fPython 3.4\u5f15\u5165\u7684\u65b0\u6a21\u5757\uff0c\u7528\u4e8e\u9762\u5411\u5bf9\u8c61\u5730\u5904\u7406\u6587\u4ef6\u548c\u76ee\u5f55\u8def\u5f84\u3002\u76f8\u6bd4\u4e8eos\u6a21\u5757\uff0cpathlib\u6a21\u5757\u7684\u4ee3\u7801\u66f4\u52a0\u76f4\u89c2\u548c\u7b80\u6d01\u3002<\/p>\n<\/p>\n<p><h4>1\u3001Path.exists()<\/h4>\n<\/p>\n<p><p>pathlib.Path.exists()\u65b9\u6cd5\u7528\u4e8e\u68c0\u67e5\u8def\u5f84\u662f\u5426\u5b58\u5728\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>def file_exists(directory, filename):<\/p>\n<p>    filepath = Path(directory) \/ filename<\/p>\n<p>    return filepath.exists()<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>directory = &#39;\/path\/to\/directory&#39;<\/p>\n<p>filename = &#39;example.txt&#39;<\/p>\n<p>if file_exists(directory, filename):<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; exists in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; does not exist in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528pathlib.Path()\u521b\u5efa\u4e00\u4e2a\u8868\u793a\u76ee\u5f55\u7684Path\u5bf9\u8c61\uff0c\u7136\u540e\u4f7f\u7528\/\u8fd0\u7b97\u7b26\u5c06\u6587\u4ef6\u540d\u62fc\u63a5\u6210\u6587\u4ef6\u8def\u5f84\uff0c\u6700\u540e\u4f7f\u7528Path.exists()\u65b9\u6cd5\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><h4>2\u3001Path.is_file()<\/h4>\n<\/p>\n<p><p>pathlib.Path.is_file()\u65b9\u6cd5\u7528\u4e8e\u68c0\u67e5\u8def\u5f84\u662f\u5426\u4e3a\u6587\u4ef6\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u5e76\u4e14\u662f\u4e00\u4e2a\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>def file_exists(directory, filename):<\/p>\n<p>    filepath = Path(directory) \/ filename<\/p>\n<p>    return filepath.is_file()<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>directory = &#39;\/path\/to\/directory&#39;<\/p>\n<p>filename = &#39;example.txt&#39;<\/p>\n<p>if file_exists(directory, filename):<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; exists in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; does not exist in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528pathlib.Path.is_file()\u65b9\u6cd5\u5224\u65ad\u6587\u4ef6\u8def\u5f84\u662f\u5426\u4e3a\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528glob\u6a21\u5757<\/h3>\n<\/p>\n<p><p>glob\u6a21\u5757\u7528\u4e8e\u67e5\u627e\u7b26\u5408\u7279\u5b9a\u6a21\u5f0f\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528glob.glob()\u51fd\u6570\u6765\u67e5\u627e\u7279\u5b9a\u6587\u4ef6\uff0c\u5e76\u5224\u65ad\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><h4>1\u3001glob.glob()<\/h4>\n<\/p>\n<p><p>glob.glob()\u51fd\u6570\u7528\u4e8e\u67e5\u627e\u7b26\u5408\u7279\u5b9a\u6a21\u5f0f\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u67e5\u627e\u7279\u5b9a\u6587\u4ef6\uff0c\u5e76\u5224\u65ad\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import glob<\/p>\n<p>import os<\/p>\n<p>def file_exists(directory, filename):<\/p>\n<p>    pattern = os.path.join(directory, filename)<\/p>\n<p>    return bool(glob.glob(pattern))<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>directory = &#39;\/path\/to\/directory&#39;<\/p>\n<p>filename = &#39;example.txt&#39;<\/p>\n<p>if file_exists(directory, filename):<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; exists in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;The file &#39;{filename}&#39; does not exist in the directory &#39;{directory}&#39;.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528os.path.join()\u6784\u5efa\u6587\u4ef6\u8def\u5f84\u6a21\u5f0f\uff0c\u7136\u540e\u4f7f\u7528glob.glob()\u67e5\u627e\u7b26\u5408\u8be5\u6a21\u5f0f\u7684\u6587\u4ef6\uff0c\u5e76\u5224\u65ad\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u5224\u65ad\u76ee\u5f55\u4e2d\u662f\u5426\u5305\u542b\u7279\u5b9a\u6587\u4ef6\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528os\u6a21\u5757\u3001pathlib\u6a21\u5757\u548cglob\u6a21\u5757\u3002<\/strong> \u5176\u4e2d\uff0cos\u6a21\u5757\u548cpathlib\u6a21\u5757\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u3002os\u6a21\u5757\u63d0\u4f9b\u4e86os.path.isfile()\u548cos.listdir()\u51fd\u6570\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\uff0c\u800cpathlib\u6a21\u5757\u63d0\u4f9b\u4e86Path.exists()\u548cPath.is_file()\u65b9\u6cd5\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002glob\u6a21\u5757\u63d0\u4f9b\u4e86glob.glob()\u51fd\u6570\u6765\u67e5\u627e\u7b26\u5408\u7279\u5b9a\u6a21\u5f0f\u7684\u6587\u4ef6\uff0c\u5e76\u5224\u65ad\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c\u5982\u679c\u9700\u8981\u5904\u7406\u590d\u6742\u7684\u6587\u4ef6\u8def\u5f84\u64cd\u4f5c\uff0c\u53ef\u4ee5\u9009\u62e9pathlib\u6a21\u5757\uff1b\u5982\u679c\u9700\u8981\u67e5\u627e\u7b26\u5408\u7279\u5b9a\u6a21\u5f0f\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u9009\u62e9glob\u6a21\u5757\u3002\u5e0c\u671b\u672c\u6587\u4ecb\u7ecd\u7684\u5185\u5bb9\u5bf9\u60a8\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\u68c0\u67e5\u7279\u5b9a\u76ee\u5f55\u4e0b\u662f\u5426\u5b58\u5728\u67d0\u4e2a\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u4e2d\u7684<code>path<\/code>\u5b50\u6a21\u5757\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.path.isfile()<\/code>\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u63a5\u53d7\u4e00\u4e2a\u6587\u4ef6\u8def\u5f84\u4f5c\u4e3a\u53c2\u6570\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u5e03\u5c14\u503c\uff0c\u6307\u793a\u8be5\u8def\u5f84\u662f\u5426\u662f\u4e00\u4e2a\u5b58\u5728\u7684\u6587\u4ef6\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">import os\n\nfile_path = &#39;your_directory\/your_file.txt&#39;\nif os.path.isfile(file_path):\n    print(&quot;\u6587\u4ef6\u5b58\u5728&quot;)\nelse:\n    print(&quot;\u6587\u4ef6\u4e0d\u5b58\u5728&quot;)\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528Python\u68c0\u67e5\u6587\u4ef6\u5b58\u5728\u7684\u6700\u4f73\u5b9e\u8df5\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u786e\u4fdd\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u800c\u975e\u76f8\u5bf9\u8def\u5f84\u6765\u68c0\u67e5\u6587\u4ef6\u7684\u5b58\u5728\u6027\uff0c\u53ef\u4ee5\u51cf\u5c11\u8def\u5f84\u89e3\u6790\u4e2d\u7684\u9519\u8bef\u3002\u6b64\u5916\uff0c\u5904\u7406\u6587\u4ef6\u8def\u5f84\u65f6\uff0c\u4f7f\u7528<code>os.path.join()<\/code>\u53ef\u4ee5\u907f\u514d\u56e0\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u8def\u5f84\u5206\u9694\u7b26\u800c\u5f15\u8d77\u7684\u95ee\u9898\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">import os\n\ndirectory = &#39;your_directory&#39;\nfilename = &#39;your_file.txt&#39;\nfile_path = os.path.join(directory, filename)\n\nif os.path.isfile(file_path):\n    print(&quot;\u6587\u4ef6\u5b58\u5728&quot;)\nelse:\n    print(&quot;\u6587\u4ef6\u4e0d\u5b58\u5728&quot;)\n<\/code><\/pre>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5904\u7406\u6587\u4ef6\u4e0d\u5b58\u5728\u7684\u5f02\u5e38\u60c5\u51b5\uff1f<\/strong><br \/>\u5728\u6587\u4ef6\u64cd\u4f5c\u4e2d\uff0c\u6355\u83b7\u5f02\u5e38\u662f\u5f88\u91cd\u8981\u7684\u3002\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u5757\u6765\u5904\u7406\u53ef\u80fd\u51fa\u73b0\u7684<code>FileNotFoundError<\/code>\u5f02\u5e38\u3002\u5728\u68c0\u67e5\u6587\u4ef6\u5b58\u5728\u6027\u4e4b\u540e\uff0c\u82e5\u9700\u8981\u8fdb\u4e00\u6b65\u64cd\u4f5c\u8be5\u6587\u4ef6\uff0c\u53ef\u4ee5\u901a\u8fc7\u6355\u83b7\u5f02\u5e38\u6765\u786e\u4fdd\u4ee3\u7801\u7684\u5065\u58ee\u6027\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<pre><code class=\"language-python\">import os\n\nfile_path = &#39;your_directory\/your_file.txt&#39;\n\ntry:\n    if os.path.isfile(file_path):\n        with open(file_path, &#39;r&#39;) as file:\n            # \u8fdb\u884c\u6587\u4ef6\u8bfb\u53d6\u64cd\u4f5c\n            content = file.read()\n    else:\n        print(&quot;\u6587\u4ef6\u4e0d\u5b58\u5728&quot;)\nexcept FileNotFoundError:\n    print(&quot;\u6587\u4ef6\u672a\u627e\u5230\uff0c\u65e0\u6cd5\u8fdb\u884c\u64cd\u4f5c&quot;)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"Python\u5224\u65ad\u76ee\u5f55\u662f\u5426\u5305\u542b\u7279\u5b9a\u6587\u4ef6\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528os\u6a21\u5757\u3001\u4f7f\u7528pathlib\u6a21\u5757\u3001\u4f7f\u7528glob\u6a21\u5757\u3002 \u5728\u8fd9\u4e09 [&hellip;]","protected":false},"author":3,"featured_media":1114331,"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\/1114322"}],"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=1114322"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1114322\/revisions"}],"predecessor-version":[{"id":1114335,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1114322\/revisions\/1114335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1114331"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1114322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1114322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1114322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}