{"id":957061,"date":"2024-12-27T02:50:34","date_gmt":"2024-12-26T18:50:34","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/957061.html"},"modified":"2024-12-27T02:50:36","modified_gmt":"2024-12-26T18:50:36","slug":"python%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98%e8%b0%83%e7%94%a8%e6%a8%a1%e5%9d%97","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/957061.html","title":{"rendered":"python\u5982\u4f55\u4fdd\u5b58\u8c03\u7528\u6a21\u5757"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100507\/6c6a7fbd-d9f6-4062-bc1b-969e44ee9c4a.webp\" alt=\"python\u5982\u4f55\u4fdd\u5b58\u8c03\u7528\u6a21\u5757\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u4fdd\u5b58\u8c03\u7528\u6a21\u5757\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1aimport\u8bed\u53e5\u3001as\u5173\u952e\u5b57\u3001from&#8230;import\u8bed\u53e5\u3002<\/strong> \u5176\u4e2d\uff0cimport\u8bed\u53e5\u662f\u6700\u5e38\u7528\u7684\u65b9\u5f0f\uff0c\u5b83\u53ef\u4ee5\u5c06\u6574\u4e2a\u6a21\u5757\u5bfc\u5165\u5230\u5f53\u524d\u7684\u547d\u540d\u7a7a\u95f4\u4e2d\uff1bas\u5173\u952e\u5b57\u53ef\u4ee5\u4e3a\u6a21\u5757\u6216\u8005\u6a21\u5757\u4e2d\u7684\u67d0\u4e2a\u5bf9\u8c61\u8bbe\u7f6e\u4e00\u4e2a\u522b\u540d\uff0c\u65b9\u4fbf\u540e\u7eed\u4f7f\u7528\uff1bfrom&#8230;import\u8bed\u53e5\u5219\u7528\u4e8e\u4ece\u6a21\u5757\u4e2d\u5bfc\u5165\u7279\u5b9a\u7684\u51fd\u6570\u3001\u7c7b\u6216\u8005\u53d8\u91cf\uff0c\u907f\u514d\u5bfc\u5165\u6574\u4e2a\u6a21\u5757\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u8fd9\u4e9b\u65b9\u6cd5\u53ca\u5176\u5177\u4f53\u4f7f\u7528\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001IMPORT\u8bed\u53e5<\/p>\n<\/p>\n<p><p>import\u8bed\u53e5\u662fPython\u4e2d\u6700\u57fa\u672c\u7684\u6a21\u5757\u5bfc\u5165\u65b9\u6cd5\u3002\u901a\u8fc7import\u8bed\u53e5\uff0c\u53ef\u4ee5\u5c06\u6574\u4e2a\u6a21\u5757\u5bfc\u5165\u5230\u5f53\u524d\u7684\u547d\u540d\u7a7a\u95f4\u4e2d\uff0c\u4ece\u800c\u53ef\u4ee5\u4f7f\u7528\u6a21\u5757\u4e2d\u7684\u6240\u6709\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u57fa\u672c\u7528\u6cd5<\/p>\n<p>\u901a\u8fc7import\u8bed\u53e5\u5bfc\u5165\u6a21\u5757\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u6a21\u5757\u4e2d\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002\u4f7f\u7528\u65f6\u9700\u8981\u5728\u6a21\u5757\u540d\u79f0\u540e\u52a0\u4e0a\u201c.\u201d\uff0c\u518d\u8c03\u7528\u5177\u4f53\u7684\u51fd\u6570\u6216\u5c5e\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<h2><strong>\u4f7f\u7528math\u6a21\u5757\u4e2d\u7684sqrt\u51fd\u6570<\/strong><\/h2>\n<p>result = math.sqrt(16)<\/p>\n<p>print(result)  # \u8f93\u51fa\uff1a4.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>2\u3001\u6a21\u5757\u7684\u641c\u7d22\u8def\u5f84<\/p>\n<p>Python\u5728\u5bfc\u5165\u6a21\u5757\u65f6\uff0c\u4f1a\u6309\u7167\u4e00\u5b9a\u7684\u987a\u5e8f\u5728\u6307\u5b9a\u7684\u76ee\u5f55\u4e2d\u641c\u7d22\u6a21\u5757\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPython\u4f1a\u5728\u4ee5\u4e0b\u8def\u5f84\u4e2d\u67e5\u627e\u6a21\u5757\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u7a0b\u5e8f\u7684\u5f53\u524d\u76ee\u5f55<\/li>\n<li>Python\u7684\u6807\u51c6\u5e93\u76ee\u5f55<\/li>\n<li>Python\u8def\u5f84\uff08\u53ef\u4ee5\u901a\u8fc7sys.path\u67e5\u770b\uff09<\/li>\n<\/ul>\n<p><p>\u5982\u679c\u6a21\u5757\u4e0d\u5728\u8fd9\u4e9b\u76ee\u5f55\u4e2d\uff0cPython\u5c06\u65e0\u6cd5\u5bfc\u5165\u8be5\u6a21\u5757\uff0c\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539sys.path\u6765\u6dfb\u52a0\u65b0\u7684\u641c\u7d22\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001AS\u5173\u952e\u5b57<\/p>\n<\/p>\n<p><p>\u4f7f\u7528as\u5173\u952e\u5b57\u53ef\u4ee5\u4e3a\u6a21\u5757\u6216\u8005\u6a21\u5757\u4e2d\u7684\u67d0\u4e2a\u5bf9\u8c61\u8bbe\u7f6e\u4e00\u4e2a\u522b\u540d\uff0c\u8fd9\u5728\u6a21\u5757\u540d\u79f0\u8f83\u957f\u6216\u8005\u9700\u8981\u907f\u514d\u547d\u540d\u51b2\u7a81\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u4e3a\u6a21\u5757\u8bbe\u7f6e\u522b\u540d<\/p>\n<p>\u901a\u8fc7as\u5173\u952e\u5b57\u4e3a\u6a21\u5757\u8bbe\u7f6e\u522b\u540d\uff0c\u53ef\u4ee5\u7b80\u5316\u6a21\u5757\u7684\u8c03\u7528\uff0c\u5c24\u5176\u662f\u5728\u6a21\u5757\u540d\u79f0\u8f83\u957f\u65f6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u4f7f\u7528\u522b\u540dplt\u8c03\u7528pyplot\u6a21\u5757\u4e2d\u7684\u51fd\u6570<\/strong><\/h2>\n<p>plt.plot([1, 2, 3], [4, 5, 6])<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>2\u3001\u4e3a\u6a21\u5757\u4e2d\u7684\u5bf9\u8c61\u8bbe\u7f6e\u522b\u540d<\/p>\n<p>\u540c\u6837\u5730\uff0c\u53ef\u4ee5\u4e3a\u6a21\u5757\u4e2d\u7684\u67d0\u4e2a\u5bf9\u8c61\u8bbe\u7f6e\u522b\u540d\uff0c\u4ee5\u907f\u514d\u547d\u540d\u51b2\u7a81\u6216\u7b80\u5316\u8c03\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime as dt<\/p>\n<h2><strong>\u4f7f\u7528\u522b\u540ddt\u8c03\u7528datetime\u6a21\u5757\u4e2d\u7684datetime\u7c7b<\/strong><\/h2>\n<p>now = dt.now()<\/p>\n<p>print(now)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001FROM&#8230;IMPORT\u8bed\u53e5<\/p>\n<\/p>\n<p><p>from&#8230;import\u8bed\u53e5\u7528\u4e8e\u4ece\u6a21\u5757\u4e2d\u5bfc\u5165\u7279\u5b9a\u7684\u51fd\u6570\u3001\u7c7b\u6216\u8005\u53d8\u91cf\uff0c\u4ece\u800c\u907f\u514d\u5bfc\u5165\u6574\u4e2a\u6a21\u5757\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u51cf\u5c11\u5185\u5b58\u6d88\u8017\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6267\u884c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u5bfc\u5165\u7279\u5b9a\u51fd\u6570\u6216\u7c7b<\/p>\n<p>\u4ece\u6a21\u5757\u4e2d\u5bfc\u5165\u7279\u5b9a\u7684\u51fd\u6570\u6216\u7c7b\u540e\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\uff0c\u800c\u65e0\u9700\u518d\u52a0\u4e0a\u6a21\u5757\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from os import path<\/p>\n<h2><strong>\u76f4\u63a5\u4f7f\u7528path\u6a21\u5757\u4e2d\u7684\u65b9\u6cd5<\/strong><\/h2>\n<p>exists = path.exists(&#39;example.txt&#39;)<\/p>\n<p>print(exists)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>2\u3001\u5bfc\u5165\u591a\u4e2a\u5bf9\u8c61<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u9017\u53f7\u5206\u9694\u7684\u65b9\u5f0f\uff0c\u4ece\u6a21\u5757\u4e2d\u5bfc\u5165\u591a\u4e2a\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from math import sqrt, pi<\/p>\n<h2><strong>\u4f7f\u7528\u5bfc\u5165\u7684sqrt\u51fd\u6570\u548cpi\u5e38\u91cf<\/strong><\/h2>\n<p>result = sqrt(9) * pi<\/p>\n<p>print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528__all__\u9650\u5236\u5bfc\u5165<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u9650\u5236\u4ece\u6a21\u5757\u4e2d\u5bfc\u5165\u7684\u5bf9\u8c61\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5757\u4e2d\u5b9a\u4e49__all__\u5217\u8868\u6765\u5b9e\u73b0\u3002__all__\u5217\u8868\u5305\u542b\u4e86\u5141\u8bb8\u5bfc\u51fa\u7684\u5bf9\u8c61\u540d\u79f0\uff0c\u53ea\u6709\u5728__all__\u5217\u8868\u4e2d\u7684\u5bf9\u8c61\u624d\u80fd\u88abfrom&#8230;import *\u8bed\u53e5\u5bfc\u5165\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u5b9a\u4e49__all__\u5217\u8868<\/p>\n<p>\u5728\u6a21\u5757\u4e2d\u5b9a\u4e49__all__\u5217\u8868\uff0c\u6307\u5b9a\u5141\u8bb8\u5bfc\u51fa\u7684\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># example_module.py<\/p>\n<p>__all__ = [&#39;function1&#39;, &#39;Class1&#39;]<\/p>\n<p>def function1():<\/p>\n<p>    pass<\/p>\n<p>def function2():<\/p>\n<p>    pass<\/p>\n<p>class Class1:<\/p>\n<p>    pass<\/p>\n<p>class Class2:<\/p>\n<p>    pass<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>2\u3001\u5bfc\u5165\u9650\u5236<\/p>\n<p>\u5f53\u4f7f\u7528from example_module import *\u8bed\u53e5\u65f6\uff0c\u53ea\u80fd\u5bfc\u5165__all__\u5217\u8868\u4e2d\u7684\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from example_module import *<\/p>\n<h2><strong>\u53ef\u4ee5\u4f7f\u7528function1\u548cClass1<\/strong><\/h2>\n<p>function1()<\/p>\n<p>obj = Class1()<\/p>\n<h2><strong>\u65e0\u6cd5\u4f7f\u7528function2\u548cClass2<\/strong><\/h2>\n<h2><strong>function2()  # NameError: name &#39;function2&#39; is not defined<\/strong><\/h2>\n<h2><strong>obj2 = Class2()  # NameError: name &#39;Class2&#39; is not defined<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u52a8\u6001\u5bfc\u5165\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u9759\u6001\u5bfc\u5165\u6a21\u5757\u5916\uff0cPython\u8fd8\u5141\u8bb8\u52a8\u6001\u5bfc\u5165\u6a21\u5757\u3002\u8fd9\u5728\u67d0\u4e9b\u9700\u8981\u6839\u636e\u8fd0\u884c\u65f6\u6761\u4ef6\u5bfc\u5165\u6a21\u5757\u7684\u60c5\u51b5\u4e0b\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u4f7f\u7528importlib\u6a21\u5757<\/p>\n<p>importlib\u6a21\u5757\u63d0\u4f9b\u4e86\u52a8\u6001\u5bfc\u5165\u6a21\u5757\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u5728\u7a0b\u5e8f\u8fd0\u884c\u65f6\u6839\u636e\u9700\u8981\u5bfc\u5165\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import importlib<\/p>\n<h2><strong>\u6839\u636e\u6a21\u5757\u540d\u79f0\u52a8\u6001\u5bfc\u5165\u6a21\u5757<\/strong><\/h2>\n<p>module_name = &#39;math&#39;<\/p>\n<p>module = importlib.import_module(module_name)<\/p>\n<h2><strong>\u4f7f\u7528\u5bfc\u5165\u7684\u6a21\u5757<\/strong><\/h2>\n<p>result = module.sqrt(25)<\/p>\n<p>print(result)  # \u8f93\u51fa\uff1a5.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>2\u3001\u4f7f\u7528__import__\u51fd\u6570<\/p>\n<p>__import__\u51fd\u6570\u662fPython\u5185\u7f6e\u7684\u52a8\u6001\u5bfc\u5165\u6a21\u5757\u7684\u51fd\u6570\uff0c\u4f46\u76f8\u5bf9\u8f83\u5c11\u4f7f\u7528\u3002\u4e00\u822c\u5efa\u8bae\u4f7f\u7528importlib\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4f7f\u7528__import__\u51fd\u6570\u52a8\u6001\u5bfc\u5165\u6a21\u5757<\/p>\n<p>module_name = &#39;random&#39;<\/p>\n<p>module = __import__(module_name)<\/p>\n<h2><strong>\u4f7f\u7528\u5bfc\u5165\u7684\u6a21\u5757<\/strong><\/h2>\n<p>rand_num = module.randint(1, 10)<\/p>\n<p>print(rand_num)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u4fdd\u5b58\u8c03\u7528\u6a21\u5757\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u4e3b\u8981\u5305\u62ecimport\u8bed\u53e5\u3001as\u5173\u952e\u5b57\u3001from&#8230;import\u8bed\u53e5\u7b49\u3002\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u573a\u666f\uff0c\u53ef\u4ee5\u9009\u62e9\u9002\u5408\u7684\u65b9\u5f0f\u6765\u5bfc\u5165\u548c\u4f7f\u7528\u6a21\u5757\u3002\u7406\u89e3\u5e76\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ec4\u7ec7\u4ee3\u7801\uff0c\u8fd8\u80fd\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6548\u7387\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4fdd\u5b58\u4e00\u4e2a\u5df2\u8c03\u7528\u7684\u6a21\u5757\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u8c03\u7528\u6a21\u5757\u540e\uff0c\u5982\u679c\u4f60\u60f3\u4fdd\u5b58\u8fd9\u4e2a\u6a21\u5757\u7684\u72b6\u6001\u6216\u6570\u636e\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u5e8f\u5217\u5316\u5de5\u5177\uff0c\u6bd4\u5982<code>pickle<\/code>\u3002<code>pickle<\/code>\u53ef\u4ee5\u5c06Python\u5bf9\u8c61\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\uff0c\u4ee5\u4fbf\u540e\u7eed\u8bfb\u53d6\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fdb\u884c\u4fdd\u5b58\u548c\u52a0\u8f7d\uff1a<\/p>\n<pre><code class=\"language-python\">import pickle\n\n# \u4fdd\u5b58\u5bf9\u8c61\nwith open(&#39;module_data.pkl&#39;, &#39;wb&#39;) as f:\n    pickle.dump(your_object, f)\n\n# \u52a0\u8f7d\u5bf9\u8c61\nwith open(&#39;module_data.pkl&#39;, &#39;rb&#39;) as f:\n    your_object = pickle.load(f)\n<\/code><\/pre>\n<p><strong>\u8c03\u7528\u6a21\u5757\u540e\u5982\u4f55\u67e5\u770b\u5176\u5185\u5bb9\u548c\u5c5e\u6027\uff1f<\/strong><br \/>\u4f7f\u7528\u5185\u7f6e\u7684<code>dir()<\/code>\u51fd\u6570\u53ef\u4ee5\u67e5\u770b\u4e00\u4e2a\u6a21\u5757\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002\u6b64\u5916\uff0c<code>help()<\/code>\u51fd\u6570\u80fd\u591f\u63d0\u4f9b\u6a21\u5757\u7684\u8be6\u7ec6\u6587\u6863\uff0c\u5e2e\u52a9\u4f60\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u5b83\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">import your_module\nprint(dir(your_module))\nhelp(your_module)\n<\/code><\/pre>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u7ba1\u7406\u548c\u7ec4\u7ec7\u591a\u4e2a\u6a21\u5757\uff1f<\/strong><br \/>\u7ec4\u7ec7\u6a21\u5757\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u5305\u6765\u5b9e\u73b0\uff0c\u5305\u662f\u4e00\u79cd\u5c06\u591a\u4e2a\u6a21\u5757\u7ec4\u7ec7\u5728\u4e00\u8d77\u7684\u65b9\u5f0f\u3002\u53ef\u4ee5\u901a\u8fc7\u5728\u4e00\u4e2a\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a<code>__init__.py<\/code>\u6587\u4ef6\uff0c\u4f7f\u5176\u6210\u4e3a\u4e00\u4e2a\u5305\u3002\u8fd9\u6837\uff0c\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528\u70b9\u53f7\uff08.\uff09\u8bed\u6cd5\u5bfc\u5165\u6a21\u5757\uff0c\u5982<code>from your_package import your_module<\/code>\u3002\u8fd9\u79cd\u7ed3\u6784\u4fbf\u4e8e\u7ef4\u62a4\u548c\u5206\u53d1\u4ee3\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4fdd\u5b58\u8c03\u7528\u6a21\u5757\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1aimport\u8bed\u53e5\u3001as\u5173\u952e\u5b57\u3001from&#8230;import\u8bed [&hellip;]","protected":false},"author":3,"featured_media":957063,"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\/957061"}],"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=957061"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/957061\/revisions"}],"predecessor-version":[{"id":957066,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/957061\/revisions\/957066"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/957063"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=957061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=957061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=957061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}