{"id":1124310,"date":"2025-01-08T19:40:11","date_gmt":"2025-01-08T11:40:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1124310.html"},"modified":"2025-01-08T19:40:16","modified_gmt":"2025-01-08T11:40:16","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8python%e4%b8%ad%e6%89%93%e5%bc%80%e6%a8%a1%e5%9d%97%e6%96%87%e4%bb%b6%e6%89%a9%e5%b1%95%e5%90%8d-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1124310.html","title":{"rendered":"\u5982\u4f55\u5728python\u4e2d\u6253\u5f00\u6a21\u5757\u6587\u4ef6\u6269\u5c55\u540d"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085414\/0df3c809-ed25-4069-bd65-dfe1d6bde0d4.webp\" alt=\"\u5982\u4f55\u5728python\u4e2d\u6253\u5f00\u6a21\u5757\u6587\u4ef6\u6269\u5c55\u540d\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u6253\u5f00\u6a21\u5757\u6587\u4ef6\u6269\u5c55\u540d<\/strong>\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\u6765\u52a0\u8f7d\u548c\u4f7f\u7528\u6a21\u5757\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528<code>import<\/code>\u8bed\u53e5\u3001<code>__import__()<\/code>\u51fd\u6570\u4ee5\u53ca\u52a8\u6001\u52a0\u8f7d\u6a21\u5757\u7684\u65b9\u6cd5\u3002<strong>import\u8bed\u53e5\u3001<strong>import<\/strong>()\u51fd\u6570\u3001\u52a8\u6001\u52a0\u8f7d\u6a21\u5757<\/strong>\u662f\u5176\u4e2d\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u8ba8\u8bba\u5176\u4e2d\u7684\u6bcf\u4e00\u79cd\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u5177\u4f53\u7684\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001import\u8bed\u53e5<\/h3>\n<\/p>\n<p><p><code>import<\/code>\u8bed\u53e5\u662fPython\u4e2d\u6700\u5e38\u7528\u7684\u52a0\u8f7d\u6a21\u5757\u7684\u65b9\u6cd5\u3002\u5b83\u5141\u8bb8\u6211\u4eec\u5728\u4ee3\u7801\u4e2d\u76f4\u63a5\u4f7f\u7528\u6a21\u5757\u4e2d\u7684\u51fd\u6570\u3001\u7c7b\u548c\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import sys<\/p>\n<h2><strong>\u4f7f\u7528os\u6a21\u5757\u4e2d\u7684\u51fd\u6570<\/strong><\/h2>\n<p>print(os.getcwd())<\/p>\n<h2><strong>\u4f7f\u7528sys\u6a21\u5757\u4e2d\u7684\u53d8\u91cf<\/strong><\/h2>\n<p>print(sys.version)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1\u3001\u5355\u4e2a\u6a21\u5757\u7684\u5bfc\u5165<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>import<\/code>\u8bed\u53e5\u53ef\u4ee5\u5bfc\u5165\u5355\u4e2a\u6a21\u5757\u3002\u5bfc\u5165\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6a21\u5757\u540d\u79f0\u8bbf\u95ee\u6a21\u5757\u5185\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<h2><strong>\u8bbf\u95eemath\u6a21\u5757\u4e2d\u7684pi\u5e38\u91cf<\/strong><\/h2>\n<p>print(math.pi)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4ece\u6a21\u5757\u4e2d\u5bfc\u5165\u7279\u5b9a\u7684\u5c5e\u6027\u6216\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u53ea\u9700\u8981\u4f7f\u7528\u6a21\u5757\u4e2d\u7684\u67d0\u4e2a\u7279\u5b9a\u5c5e\u6027\u6216\u65b9\u6cd5\uff0c\u53ef\u4ee5\u4f7f\u7528<code>from ... import ...<\/code>\u8bed\u53e5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from math import sqrt, pi<\/p>\n<h2><strong>\u76f4\u63a5\u4f7f\u7528sqrt\u51fd\u6570\u548cpi\u5e38\u91cf<\/strong><\/h2>\n<p>print(sqrt(16))<\/p>\n<p>print(pi)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u5bfc\u5165\u6a21\u5757\u5e76\u8bbe\u7f6e\u522b\u540d<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u7b80\u5316\u4ee3\u7801\u6216\u907f\u514d\u547d\u540d\u51b2\u7a81\uff0c\u53ef\u4ee5\u4e3a\u6a21\u5757\u8bbe\u7f6e\u522b\u540d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u4f7f\u7528np\u4f5c\u4e3anumpy\u6a21\u5757\u7684\u522b\u540d<\/strong><\/h2>\n<p>array = np.array([1, 2, 3])<\/p>\n<p>print(array)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001<strong>import<\/strong>()\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>__import__()<\/code>\u51fd\u6570\u662fPython\u5185\u7f6e\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u7528\u4e8e\u52a8\u6001\u5bfc\u5165\u6a21\u5757\u3002\u5b83\u5728\u9700\u8981\u6839\u636e\u7528\u6237\u8f93\u5165\u6216\u5176\u4ed6\u52a8\u6001\u6761\u4ef6\u5bfc\u5165\u6a21\u5757\u65f6\u7279\u522b\u6709\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">module_name = &#39;math&#39;<\/p>\n<p>math_module = __import__(module_name)<\/p>\n<h2><strong>\u4f7f\u7528\u52a8\u6001\u5bfc\u5165\u7684\u6a21\u5757<\/strong><\/h2>\n<p>print(math_module.sqrt(16))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p><code>__import__()<\/code>\u51fd\u6570\u63a5\u53d7\u6a21\u5757\u540d\u79f0\u4f5c\u4e3a\u5b57\u7b26\u4e32\u53c2\u6570\uff0c\u5e76\u8fd4\u56de\u6a21\u5757\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">module_name = &#39;os&#39;<\/p>\n<p>os_module = __import__(module_name)<\/p>\n<h2><strong>\u4f7f\u7528os\u6a21\u5757\u4e2d\u7684\u51fd\u6570<\/strong><\/h2>\n<p>print(os_module.getcwd())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u52a8\u6001\u5bfc\u5165\u6a21\u5757\u4e2d\u7684\u7279\u5b9a\u5c5e\u6027\u6216\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>getattr()<\/code>\u51fd\u6570\u4ece\u52a8\u6001\u5bfc\u5165\u7684\u6a21\u5757\u4e2d\u83b7\u53d6\u7279\u5b9a\u7684\u5c5e\u6027\u6216\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">module_name = &#39;math&#39;<\/p>\n<p>math_module = __import__(module_name)<\/p>\n<h2><strong>\u4f7f\u7528getattr\u51fd\u6570\u83b7\u53d6sqrt\u51fd\u6570<\/strong><\/h2>\n<p>sqrt_function = getattr(math_module, &#39;sqrt&#39;)<\/p>\n<p>print(sqrt_function(25))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u52a8\u6001\u52a0\u8f7d\u6a21\u5757<\/h3>\n<\/p>\n<p><p>\u52a8\u6001\u52a0\u8f7d\u6a21\u5757\u662f\u6307\u5728\u7a0b\u5e8f\u8fd0\u884c\u65f6\u6839\u636e\u9700\u8981\u52a0\u8f7d\u6a21\u5757\uff0c\u800c\u4e0d\u662f\u5728\u7a0b\u5e8f\u5f00\u59cb\u65f6\u5168\u90e8\u52a0\u8f7d\u3002\u8fd9\u5bf9\u4e8e\u9700\u8981\u6839\u636e\u6761\u4ef6\u52a0\u8f7d\u4e0d\u540c\u6a21\u5757\u7684\u5e94\u7528\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528<code>importlib<\/code>\u6a21\u5757<\/h4>\n<\/p>\n<p><p><code>importlib<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u63a5\u53e3\u6765\u52a8\u6001\u52a0\u8f7d\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import importlib<\/p>\n<p>module_name = &#39;math&#39;<\/p>\n<p>math_module = importlib.import_module(module_name)<\/p>\n<h2><strong>\u4f7f\u7528\u52a8\u6001\u52a0\u8f7d\u7684math\u6a21\u5757<\/strong><\/h2>\n<p>print(math_module.pi)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4ece\u52a8\u6001\u52a0\u8f7d\u7684\u6a21\u5757\u4e2d\u5bfc\u5165\u7279\u5b9a\u5c5e\u6027\u6216\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>importlib<\/code>\u6a21\u5757\u7684<code>import_module()<\/code>\u51fd\u6570\u4ece\u52a8\u6001\u52a0\u8f7d\u7684\u6a21\u5757\u4e2d\u5bfc\u5165\u7279\u5b9a\u5c5e\u6027\u6216\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import importlib<\/p>\n<p>module_name = &#39;math&#39;<\/p>\n<p>math_module = importlib.import_module(module_name)<\/p>\n<h2><strong>\u76f4\u63a5\u4f7f\u7528\u52a8\u6001\u52a0\u8f7d\u7684\u6a21\u5757\u4e2d\u7684\u5c5e\u6027<\/strong><\/h2>\n<p>print(math_module.e)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u6a21\u5757\u672a\u627e\u5230<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5bfc\u5165\u7684\u6a21\u5757\u4e0d\u5b58\u5728\uff0cPython\u4f1a\u629b\u51fa<code>ModuleNotFoundError<\/code>\u5f02\u5e38\u3002\u786e\u4fdd\u6a21\u5757\u540d\u79f0\u6b63\u786e\uff0c\u5e76\u4e14\u6a21\u5757\u5df2\u7ecf\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    import non_existent_module<\/p>\n<p>except ModuleNotFoundError:<\/p>\n<p>    print(&quot;\u6a21\u5757\u672a\u627e\u5230\uff0c\u8bf7\u786e\u4fdd\u6a21\u5757\u540d\u79f0\u6b63\u786e\u5e76\u5df2\u5b89\u88c5\u3002&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6a21\u5757\u8def\u5f84\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u6a21\u5757\u4e0d\u5728Python\u7684\u9ed8\u8ba4\u641c\u7d22\u8def\u5f84\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sys.path<\/code>\u6dfb\u52a0\u6a21\u5757\u7684\u641c\u7d22\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>sys.path.append(&#39;\/path\/to\/module&#39;)<\/p>\n<p>import custom_module<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u5faa\u73af\u5bfc\u5165\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5faa\u73af\u5bfc\u5165\u662f\u6307\u4e24\u4e2a\u6216\u591a\u4e2a\u6a21\u5757\u76f8\u4e92\u5bfc\u5165\u5bf9\u65b9\uff0c\u53ef\u80fd\u5bfc\u81f4\u65e0\u9650\u5faa\u73af\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u91cd\u65b0\u8bbe\u8ba1\u6a21\u5757\u7684\u5bfc\u5165\u7ed3\u6784\uff0c\u907f\u514d\u5faa\u73af\u5bfc\u5165\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># module_a.py<\/p>\n<p>import module_b<\/p>\n<p>def func_a():<\/p>\n<p>    module_b.func_b()<\/p>\n<h2><strong>module_b.py<\/strong><\/h2>\n<p>import module_a<\/p>\n<p>def func_b():<\/p>\n<p>    module_a.func_a()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u6253\u5f00\u548c\u4f7f\u7528\u6a21\u5757\u6587\u4ef6\u6269\u5c55\u540d\uff0c\u5305\u62ec<code>import<\/code>\u8bed\u53e5\u3001<code>__import__()<\/code>\u51fd\u6570\u4ee5\u53ca\u52a8\u6001\u52a0\u8f7d\u6a21\u5757\u7684\u65b9\u6cd5\u3002<strong>import\u8bed\u53e5<\/strong>\u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u9002\u7528\u4e8e\u7edd\u5927\u591a\u6570\u60c5\u51b5\uff1b<strong><strong>import<\/strong>()\u51fd\u6570<\/strong>\u9002\u7528\u4e8e\u9700\u8981\u52a8\u6001\u5bfc\u5165\u6a21\u5757\u7684\u573a\u666f\uff1b<strong>\u52a8\u6001\u52a0\u8f7d\u6a21\u5757<\/strong>\u5219\u66f4\u52a0\u7075\u6d3b\uff0c\u9002\u7528\u4e8e\u66f4\u590d\u6742\u7684\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u7ef4\u62a4\u6027\u3002\u540c\u65f6\uff0c\u6ce8\u610f\u5904\u7406\u5e38\u89c1\u95ee\u9898\uff0c\u5982\u6a21\u5757\u672a\u627e\u5230\u3001\u6a21\u5757\u8def\u5f84\u95ee\u9898\u548c\u5faa\u73af\u5bfc\u5165\u95ee\u9898\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\u5982\u4f55\u6709\u6548\u5730\u7ba1\u7406\u548c\u6253\u5f00\u4e0d\u540c\u7684\u6a21\u5757\u6587\u4ef6\u6269\u5c55\u540d\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u6a21\u5757\u901a\u5e38\u4f7f\u7528\u201c.py\u201d\u6269\u5c55\u540d\u3002\u7136\u800c\uff0cPython\u8fd8\u652f\u6301\u5176\u4ed6\u4e00\u4e9b\u6269\u5c55\u540d\uff0c\u4f8b\u5982\u201c.pyc\u201d\u548c\u201c.pyo\u201d\uff0c\u7528\u4e8e\u7f16\u8bd1\u5b57\u8282\u7801\u3002\u5982\u679c\u4f60\u60f3\u6253\u5f00\u8fd9\u4e9b\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5185\u7f6e<code>import<\/code>\u8bed\u53e5\u6216<code>importlib<\/code>\u6a21\u5757\u3002\u5bf9\u4e8e\u201c.py\u201d\u6587\u4ef6\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728\u547d\u4ee4\u884c\u6216IDE\u4e2d\u8fd0\u884c\uff0c\u800c\u5bf9\u4e8e\u5b57\u8282\u7801\u6587\u4ef6\uff0c\u5219\u9700\u8981\u786e\u4fdd\u5b83\u4eec\u4e0e\u76f8\u5e94\u7684\u6e90\u6587\u4ef6\u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u6a21\u5757\u6587\u4ef6\uff1f<\/strong><br \/>Python\u6a21\u5757\u6587\u4ef6\u53ef\u4ee5\u6709\u591a\u79cd\u5f62\u5f0f\uff0c\u5305\u62ec\u6807\u51c6\u7684Python\u6e90\u6587\u4ef6\u548c\u5b57\u8282\u7801\u6587\u4ef6\u3002\u4f7f\u7528<code>import<\/code>\u8bed\u53e5\u53ef\u4ee5\u8f7b\u677e\u5730\u5bfc\u5165\u548c\u4f7f\u7528\u8fd9\u4e9b\u6a21\u5757\u3002\u5982\u679c\u4f60\u9700\u8981\u67e5\u770b\u6e90\u4ee3\u7801\uff0c\u76f4\u63a5\u6253\u5f00\u201c.py\u201d\u6587\u4ef6\u5373\u53ef\uff1b\u800c\u5bf9\u4e8e\u201c.pyc\u201d\u6216\u201c.pyo\u201d\u6587\u4ef6\uff0c\u4f7f\u7528<code>py_compile<\/code>\u6a21\u5757\u53ef\u4ee5\u5e2e\u52a9\u4f60\u91cd\u65b0\u7f16\u8bd1\u6e90\u6587\u4ef6\u5e76\u751f\u6210\u5b57\u8282\u7801\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u63a8\u8350\u7684\u5de5\u5177\u6216IDE\u6765\u5904\u7406Python\u6a21\u5757\u6587\u4ef6\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u6709\u8bb8\u591a\u5de5\u5177\u548cIDE\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7ba1\u7406\u548c\u6253\u5f00Python\u6a21\u5757\u6587\u4ef6\u3002\u4f8b\u5982\uff0cPyCharm\u3001Visual Studio Code\u548cJupyter Notebook\u90fd\u662f\u6d41\u884c\u7684\u9009\u62e9\u3002\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u4e86\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u5b8c\u6210\u3001\u8c03\u8bd5\u529f\u80fd\u4ee5\u53ca\u5bf9\u4e0d\u540c\u6a21\u5757\u6587\u4ef6\u6269\u5c55\u540d\u7684\u652f\u6301\uff0c\u4f7f\u5f97\u7f16\u5199\u548c\u7ba1\u7406Python\u4ee3\u7801\u53d8\u5f97\u66f4\u52a0\u9ad8\u6548\u548c\u4fbf\u5229\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u6253\u5f00\u6a21\u5757\u6587\u4ef6\u6269\u5c55\u540d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\u6765\u52a0\u8f7d\u548c\u4f7f\u7528\u6a21\u5757\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528import\u8bed\u53e5\u3001__ [&hellip;]","protected":false},"author":3,"featured_media":1124326,"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\/1124310"}],"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=1124310"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1124310\/revisions"}],"predecessor-version":[{"id":1124327,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1124310\/revisions\/1124327"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1124326"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1124310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1124310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1124310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}