{"id":1010995,"date":"2024-12-27T11:26:04","date_gmt":"2024-12-27T03:26:04","guid":{"rendered":""},"modified":"2024-12-27T11:26:06","modified_gmt":"2024-12-27T03:26:06","slug":"python%e5%a6%82%e4%bd%95%e7%9c%8b%e8%b5%84%e6%ba%90%e4%bd%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1010995.html","title":{"rendered":"python\u5982\u4f55\u770b\u8d44\u6e90\u4f4d\u7f6e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085318\/8650d158-006a-4274-9821-fd593e50aacb.webp\" alt=\"python\u5982\u4f55\u770b\u8d44\u6e90\u4f4d\u7f6e\" \/><\/p>\n<p><p> <strong>Python\u67e5\u770b\u8d44\u6e90\u4f4d\u7f6e\u7684\u5e38\u7528\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u83b7\u53d6\u6587\u4ef6\u8def\u5f84\u3001\u5229\u7528<code>sys<\/code>\u6a21\u5757\u67e5\u770b\u6a21\u5757\u641c\u7d22\u8def\u5f84\u3001\u5e94\u7528<code>pkg_resources<\/code>\u4ece\u5305\u4e2d\u5b9a\u4f4d\u8d44\u6e90\u3002<\/strong>\u5176\u4e2d\uff0c<code>os<\/code>\u6a21\u5757\u662f\u6700\u5e38\u7528\u7684\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u8bbf\u95ee\u64cd\u4f5c\u7cfb\u7edf\u529f\u80fd\u7684\u4fbf\u6377\u65b9\u6cd5\u3002<code>sys<\/code>\u6a21\u5757\u5219\u53ef\u4ee5\u5e2e\u52a9\u4f60\u4e86\u89e3Python\u89e3\u91ca\u5668\u67e5\u627e\u6a21\u5757\u7684\u8def\u5f84\uff0c\u800c<code>pkg_resources<\/code>\u6a21\u5757\u5219\u9002\u7528\u4e8e\u9700\u8981\u4ece\u5305\u4e2d\u52a8\u6001\u83b7\u53d6\u8d44\u6e90\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><p>\u4e0b\u9762\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4ee5\u53ca\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528OS\u6a21\u5757\u83b7\u53d6\u6587\u4ef6\u8def\u5f84<\/h3>\n<\/p>\n<p><p><code>os<\/code>\u6a21\u5757\u662fPython\u4e2d\u5904\u7406\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u6807\u51c6\u6a21\u5757\uff0c\u80fd\u591f\u5e2e\u52a9\u6211\u4eec\u8bbf\u95ee\u64cd\u4f5c\u7cfb\u7edf\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h4>1. \u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>os.getcwd()<\/code>\u53ef\u4ee5\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u7684\u8def\u5f84\uff0c\u8fd9\u5728\u9700\u8981\u83b7\u53d6\u76f8\u5bf9\u8def\u5f84\u7684\u60c5\u51b5\u4e0b\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>current_directory = os.getcwd()<\/p>\n<p>print(f&quot;\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1a{current_directory}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u62fc\u63a5\u8def\u5f84<\/h4>\n<\/p>\n<p><p><code>os.path.join()<\/code>\u662f\u4e00\u4e2a\u975e\u5e38\u5b9e\u7528\u7684\u51fd\u6570\uff0c\u7528\u4e8e\u62fc\u63a5\u6587\u4ef6\u8def\u5f84\u3002\u5728\u5904\u7406\u8de8\u5e73\u53f0\u6587\u4ef6\u8def\u5f84\u65f6\u5c24\u5176\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u80fd\u81ea\u52a8\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u7279\u5b9a\u7684\u8def\u5f84\u5206\u9694\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file_path = os.path.join(current_directory, &#39;data&#39;, &#39;file.txt&#39;)<\/p>\n<p>print(f&quot;\u6587\u4ef6\u8def\u5f84\uff1a{file_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u68c0\u67e5\u6587\u4ef6\u548c\u76ee\u5f55\u662f\u5426\u5b58\u5728<\/h4>\n<\/p>\n<p><p>\u901a\u8fc7<code>os.path.exists()<\/code>\u53ef\u4ee5\u68c0\u67e5\u8def\u5f84\u662f\u5426\u5b58\u5728\uff0c<code>os.path.isfile()<\/code>\u548c<code>os.path.isdir()<\/code>\u5219\u5206\u522b\u7528\u4e8e\u68c0\u67e5\u8def\u5f84\u662f\u5426\u4e3a\u6587\u4ef6\u6216\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if os.path.exists(file_path):<\/p>\n<p>    if os.path.isfile(file_path):<\/p>\n<p>        print(&quot;\u6587\u4ef6\u5b58\u5728\u3002&quot;)<\/p>\n<p>    elif os.path.isdir(file_path):<\/p>\n<p>        print(&quot;\u8fd9\u662f\u4e00\u4e2a\u76ee\u5f55\u3002&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u8def\u5f84\u4e0d\u5b58\u5728\u3002&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u5229\u7528SYS\u6a21\u5757\u67e5\u770b\u6a21\u5757\u641c\u7d22\u8def\u5f84<\/h3>\n<\/p>\n<p><p><code>sys<\/code>\u6a21\u5757\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u4e86\u89e3Python\u89e3\u91ca\u5668\u662f\u5982\u4f55\u67e5\u627e\u6a21\u5757\u7684\u3002<\/p>\n<\/p>\n<p><h4>1. \u67e5\u770b\u6a21\u5757\u641c\u7d22\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>sys.path<\/code>\u53ef\u4ee5\u67e5\u770b\u5f53\u524dPython\u89e3\u91ca\u5668\u7684\u6a21\u5757\u641c\u7d22\u8def\u5f84\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>for path in sys.path:<\/p>\n<p>    print(f&quot;\u6a21\u5757\u641c\u7d22\u8def\u5f84\uff1a{path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u52a8\u6001\u6dfb\u52a0\u6a21\u5757\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\u4f60\u53ef\u80fd\u9700\u8981\u5728\u8fd0\u884c\u65f6\u6dfb\u52a0\u65b0\u7684\u6a21\u5757\u8def\u5f84\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sys.path.append()<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">new_path = &#39;\/path\/to\/your\/module&#39;<\/p>\n<p>sys.path.append(new_path)<\/p>\n<p>print(f&quot;\u65b0\u6a21\u5757\u8def\u5f84\u5df2\u6dfb\u52a0\uff1a{new_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5e94\u7528PKG_RESOURCES\u4ece\u5305\u4e2d\u5b9a\u4f4d\u8d44\u6e90<\/h3>\n<\/p>\n<p><p><code>pkg_resources<\/code>\u6a21\u5757\u662f<code>setuptools<\/code>\u7684\u4e00\u90e8\u5206\uff0c\u901a\u5e38\u7528\u4e8e\u4ecePython\u5305\u4e2d\u83b7\u53d6\u8d44\u6e90\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>1. \u83b7\u53d6\u8d44\u6e90\u6587\u4ef6\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u901a\u8fc7<code>pkg_resources<\/code>\u53ef\u4ee5\u83b7\u53d6\u5305\u5185\u8d44\u6e90\u7684\u8def\u5f84\uff0c\u786e\u4fdd\u8d44\u6e90\u968f\u5305\u4e00\u8d77\u5206\u53d1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pkg_resources<\/p>\n<p>resource_path = pkg_resources.resource_filename(&#39;your_package&#39;, &#39;data\/resource.txt&#39;)<\/p>\n<p>print(f&quot;\u8d44\u6e90\u8def\u5f84\uff1a{resource_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u68c0\u67e5\u8d44\u6e90\u662f\u5426\u5b58\u5728<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>pkg_resources.resource_exists()<\/code>\u53ef\u4ee5\u68c0\u67e5\u8d44\u6e90\u5728\u5305\u5185\u662f\u5426\u5b58\u5728\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if pkg_resources.resource_exists(&#39;your_package&#39;, &#39;data\/resource.txt&#39;):<\/p>\n<p>    print(&quot;\u8d44\u6e90\u5b58\u5728\u3002&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u8d44\u6e90\u4e0d\u5b58\u5728\u3002&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u548c\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u9700\u6c42\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u5bf9\u4e8e\u7b80\u5355\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u64cd\u4f5c<\/strong>\uff0c<code>os<\/code>\u6a21\u5757\u8db3\u591f\u80dc\u4efb\u3002\u5b83\u7684\u51fd\u6570\u6613\u4e8e\u4f7f\u7528\u4e14\u8de8\u5e73\u53f0\u517c\u5bb9\u3002<\/li>\n<li><strong>\u5982\u679c\u9700\u8981\u4e86\u89e3\u6a21\u5757\u5bfc\u5165\u7684\u8def\u5f84<\/strong>\uff0c\u6216\u8005\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u4fee\u6539\u6a21\u5757\u8def\u5f84\uff0c<code>sys<\/code>\u6a21\u5757\u662f\u4e00\u4e2a\u7406\u60f3\u7684\u9009\u62e9\u3002<\/li>\n<li><strong>\u5f53\u9700\u8981\u4ecePython\u5305\u4e2d\u52a8\u6001\u83b7\u53d6\u8d44\u6e90\u6587\u4ef6\u65f6<\/strong>\uff0c<code>pkg_resources<\/code>\u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u7279\u522b\u9002\u5408\u9700\u8981\u517c\u5bb9\u4e0d\u540c\u73af\u5883\u7684\u5e94\u7528\u3002<\/li>\n<\/ul>\n<p><h3>\u4e94\u3001\u6700\u4f73\u5b9e\u8df5\u548c\u6ce8\u610f\u4e8b\u9879<\/h3>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8def\u5f84\u5904\u7406\u7684\u8de8\u5e73\u53f0\u6027<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>os.path<\/code>\u6a21\u5757\u4e2d\u7684\u65b9\u6cd5\u5904\u7406\u8def\u5f84\uff0c\u53ef\u4ee5\u786e\u4fdd\u5728Windows\u3001Linux\u548cmacOS\u7b49\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4ee3\u7801\u90fd\u80fd\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u9879\u76ee\u4e2d\u5c3d\u91cf\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\uff0c\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u56e0\u4e3a\u9879\u76ee\u8def\u5f84\u53d8\u5316\u800c\u5bfc\u81f4\u7684\u8def\u5f84\u95ee\u9898\u3002\u901a\u8fc7<code>os.path.abspath()<\/code>\u53ef\u4ee5\u5c06\u76f8\u5bf9\u8def\u5f84\u8f6c\u6362\u4e3a\u7edd\u5bf9\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8d44\u6e90\u6587\u4ef6\u7684\u7ba1\u7406<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Python\u5305\u65f6\uff0c\u4f7f\u7528<code>pkg_resources<\/code>\u786e\u4fdd\u8d44\u6e90\u6587\u4ef6\u7684\u6b63\u786e\u6253\u5305\u548c\u5206\u53d1\u662f\u4e2a\u597d\u4e60\u60ef\u3002\u4e3a\u6b64\uff0c\u53ef\u4ee5\u5728<code>setup.py<\/code>\u4e2d\u901a\u8fc7<code>package_data<\/code>\u6307\u5b9a\u9700\u8981\u5305\u542b\u7684\u8d44\u6e90\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u73af\u5883\u7684\u9694\u79bb<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08\u5982<code>venv<\/code>\u6216<code>virtualenv<\/code>\uff09\u53ef\u4ee5\u6709\u6548\u5730\u7ba1\u7406\u548c\u9694\u79bb\u4f9d\u8d56\u5305\uff0c\u907f\u514d\u5305\u7248\u672c\u51b2\u7a81\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5f02\u5e38\u5904\u7406<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u6587\u4ef6\u64cd\u4f5c\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u6587\u4ef6\u4e0d\u5b58\u5728\u6216\u6743\u9650\u4e0d\u8db3\u7684\u95ee\u9898\uff0c\u4f7f\u7528<code>try-except<\/code>\u5757\u53ef\u4ee5\u6355\u83b7\u8fd9\u4e9b\u5f02\u5e38\u5e76\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u4e0e\u5b9e\u8df5\uff0cPython\u5f00\u53d1\u8005\u53ef\u4ee5\u9ad8\u6548\u5730\u7ba1\u7406\u548c\u5b9a\u4f4d\u8d44\u6e90\u4f4d\u7f6e\uff0c\u4ece\u800c\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u548c\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u67e5\u770b\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os.path.abspath()<\/code>\u51fd\u6570\u6765\u83b7\u53d6\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u3002\u53ea\u9700\u63d0\u4f9b\u6587\u4ef6\u7684\u76f8\u5bf9\u8def\u5f84\u4f5c\u4e3a\u53c2\u6570\uff0c\u8be5\u51fd\u6570\u5c06\u8fd4\u56de\u8be5\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\nabsolute_path = os.path.abspath(&quot;your_file.txt&quot;)\nprint(absolute_path)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u5c31\u80fd\u8f7b\u677e\u83b7\u53d6\u6307\u5b9a\u6587\u4ef6\u7684\u5b8c\u6574\u4f4d\u7f6e\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u67e5\u627e\u6a21\u5757\u7684\u5b89\u88c5\u4f4d\u7f6e\uff1f<\/strong><br \/>\u8981\u67e5\u770b\u5df2\u5b89\u88c5\u6a21\u5757\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u4f7f\u7528<code>module.__file__<\/code>\u5c5e\u6027\u3002\u9996\u5148\u9700\u8981\u5bfc\u5165\u8be5\u6a21\u5757\uff0c\u7136\u540e\u8bbf\u95ee\u5176<code>__file__<\/code>\u5c5e\u6027\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">import numpy\nprint(numpy.__file__)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u8fd4\u56de\u8be5\u6a21\u5757\u7684\u5b89\u88c5\u4f4d\u7f6e\uff0c\u5e2e\u52a9\u7528\u6237\u4e86\u89e3\u5176\u8d44\u6e90\u4f4d\u7f6e\u3002<\/p>\n<p><strong>\u5982\u4f55\u67e5\u770bPython\u5e93\u7684\u4f9d\u8d56\u5173\u7cfb\u548c\u8d44\u6e90\u4f4d\u7f6e\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>pip show<\/code>\u547d\u4ee4\u67e5\u770b\u7279\u5b9a\u5e93\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u5b89\u88c5\u4f4d\u7f6e\u548c\u4f9d\u8d56\u5173\u7cfb\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\uff1a  <\/p>\n<pre><code>pip show package_name\n<\/code><\/pre>\n<p>\u66ff\u6362<code>package_name<\/code>\u4e3a\u6240\u9700\u5e93\u7684\u540d\u79f0\uff0c\u8fd9\u6837\u5c31\u80fd\u83b7\u5f97\u5173\u4e8e\u5e93\u7684\u5b89\u88c5\u8def\u5f84\u53ca\u5176\u4f9d\u8d56\u7684\u6240\u6709\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u67e5\u770b\u8d44\u6e90\u4f4d\u7f6e\u7684\u5e38\u7528\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528os\u6a21\u5757\u83b7\u53d6\u6587\u4ef6\u8def\u5f84\u3001\u5229\u7528sys\u6a21\u5757\u67e5\u770b\u6a21\u5757\u641c\u7d22\u8def\u5f84\u3001\u5e94\u7528pkg_ [&hellip;]","protected":false},"author":3,"featured_media":1011003,"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\/1010995"}],"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=1010995"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1010995\/revisions"}],"predecessor-version":[{"id":1011005,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1010995\/revisions\/1011005"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1011003"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1010995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1010995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1010995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}