{"id":1030140,"date":"2024-12-31T11:14:33","date_gmt":"2024-12-31T03:14:33","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1030140.html"},"modified":"2024-12-31T11:14:36","modified_gmt":"2024-12-31T03:14:36","slug":"%e5%a6%82%e4%bd%95%e8%b0%83%e7%94%a8%e8%87%aa%e5%b7%b1%e5%86%99%e7%9a%84python%e6%96%87%e4%bb%b6%e8%b7%af%e5%be%84","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1030140.html","title":{"rendered":"\u5982\u4f55\u8c03\u7528\u81ea\u5df1\u5199\u7684python\u6587\u4ef6\u8def\u5f84"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/5de368d8-a83e-4bbb-8ffb-f7141ca91f06.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u8c03\u7528\u81ea\u5df1\u5199\u7684python\u6587\u4ef6\u8def\u5f84\" \/><\/p>\n<p><p> <strong>\u8c03\u7528\u81ea\u5df1\u5199\u7684Python\u6587\u4ef6\u8def\u5f84<\/strong>\u662f\u6307\u5728Python\u7a0b\u5e8f\u4e2d\u5f15\u7528\u6216\u5bfc\u5165\u5176\u4ed6Python\u6587\u4ef6\uff0c\u4ee5\u4fbf\u4f7f\u7528\u5176\u4e2d\u5b9a\u4e49\u7684\u51fd\u6570\u3001\u7c7b\u6216\u53d8\u91cf\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u3001\u4fee\u6539sys.path\u3001\u4f7f\u7528importlib\u7b49\u3002<strong>\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u6765\u5bfc\u5165\u6a21\u5757\u3001\u53ef\u4ee5\u901a\u8fc7sys.path.append()\u65b9\u6cd5\u5c06\u6a21\u5757\u8def\u5f84\u6dfb\u52a0\u5230Python\u641c\u7d22\u8def\u5f84\u4e2d\u3001\u4f7f\u7528importlib.util\u6a21\u5757\u6765\u52a8\u6001\u5bfc\u5165\u6a21\u5757<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u6765\u5bfc\u5165\u6a21\u5757\u662f\u6700\u5e38\u89c1\u4e14\u7b80\u5355\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u76f8\u5bf9\u8def\u5f84\u662f\u57fa\u4e8e\u5f53\u524d\u6587\u4ef6\u4f4d\u7f6e\u7684\u76f8\u5bf9\u4f4d\u7f6e\uff0c\u800c\u7edd\u5bf9\u8def\u5f84\u662f\u4ece\u6839\u76ee\u5f55\u5f00\u59cb\u7684\u5b8c\u6574\u8def\u5f84\u3002\u901a\u8fc7import\u8bed\u53e5\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u5bfc\u5165\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u662f\u5bfc\u5165\u6a21\u5757\u7684\u57fa\u7840\u65b9\u6cd5\u3002\u76f8\u5bf9\u8def\u5f84\u4f9d\u8d56\u4e8e\u5f53\u524d\u6587\u4ef6\u7684\u4f4d\u7f6e\uff0c\u800c\u7edd\u5bf9\u8def\u5f84\u662f\u4ece\u6587\u4ef6\u7cfb\u7edf\u7684\u6839\u76ee\u5f55\u5f00\u59cb\u7684\u5b8c\u6574\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\u76f8\u5bf9\u8def\u5f84\u5bfc\u5165<\/li>\n<\/ol>\n<p><p>\u76f8\u5bf9\u8def\u5f84\u5bfc\u5165\u6a21\u5757\u901a\u5e38\u7528\u4e8e\u9879\u76ee\u76ee\u5f55\u7ed3\u6784\u6bd4\u8f83\u6e05\u6670\u7684\u60c5\u51b5\u3002\u5047\u8bbe\u9879\u76ee\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code>project\/<\/p>\n<p>    m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n.py<\/p>\n<p>    module\/<\/p>\n<p>        my_module.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728<code>main.py<\/code>\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u5bfc\u5165<code>my_module.py<\/code>\u4e2d\u7684\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from module import my_module<\/p>\n<p>my_module.my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u7edd\u5bf9\u8def\u5f84\u5bfc\u5165<\/li>\n<\/ol>\n<p><p>\u7edd\u5bf9\u8def\u5f84\u5bfc\u5165\u6a21\u5757\u9002\u7528\u4e8e\u9700\u8981\u660e\u786e\u6307\u5b9a\u6587\u4ef6\u4f4d\u7f6e\u7684\u60c5\u51b5\u3002\u5047\u8bbe<code>my_module.py<\/code>\u7684\u7edd\u5bf9\u8def\u5f84\u662f<code>\/path\/to\/project\/module\/my_module.py<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\u5bfc\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>sys.path.append(&#39;\/path\/to\/project\/module&#39;)<\/p>\n<p>import my_module<\/p>\n<p>my_module.my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528sys.path.append()\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u52a8\u6001\u5730\u5c06\u6a21\u5757\u8def\u5f84\u6dfb\u52a0\u5230Python\u7684\u641c\u7d22\u8def\u5f84\u4e2d\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7<code>sys.path.append()<\/code>\u65b9\u6cd5\u5b9e\u73b0\u3002\u8be5\u65b9\u6cd5\u5c06\u6307\u5b9a\u7684\u8def\u5f84\u6dfb\u52a0\u5230<code>sys.path<\/code>\u5217\u8868\u4e2d\uff0c\u4f7fPython\u80fd\u591f\u627e\u5230\u5e76\u5bfc\u5165\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>sys.path.append(&#39;\/path\/to\/project\/module&#39;)<\/p>\n<p>import my_module<\/p>\n<p>my_module.my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u9700\u8981\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u6dfb\u52a0\u6a21\u5757\u8def\u5f84\u7684\u60c5\u51b5\uff0c\u4f46\u8981\u6ce8\u610f\u8def\u5f84\u7684\u6b63\u786e\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528importlib.util\u6a21\u5757<\/p>\n<\/p>\n<p><p><code>importlib.util<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u52a8\u6001\u5bfc\u5165\u529f\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528<code>importlib.util.spec_from_file_location<\/code>\u51fd\u6570\u52a8\u6001\u5bfc\u5165\u6307\u5b9a\u8def\u5f84\u7684\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import importlib.util<\/p>\n<p>module_name = &#39;my_module&#39;<\/p>\n<p>file_path = &#39;\/path\/to\/project\/module\/my_module.py&#39;<\/p>\n<p>spec = importlib.util.spec_from_file_location(module_name, file_path)<\/p>\n<p>my_module = importlib.util.module_from_spec(spec)<\/p>\n<p>spec.loader.exec_module(my_module)<\/p>\n<p>my_module.my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u9700\u8981\u5728\u8fd0\u884c\u65f6\u7075\u6d3b\u5bfc\u5165\u6a21\u5757\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u907f\u514d\u4fee\u6539<code>sys.path<\/code>\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528\u5305\u7ed3\u6784\u5bfc\u5165\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u5728\u5927\u578b\u9879\u76ee\u4e2d\uff0c\u901a\u5e38\u4f1a\u4f7f\u7528\u5305\u7ed3\u6784\u6765\u7ec4\u7ec7\u6a21\u5757\u3002\u5305\u662f\u5305\u542b\u4e00\u4e2a\u7279\u6b8a\u6587\u4ef6<code>__init__.py<\/code>\u7684\u76ee\u5f55\uff0c<code>__init__.py<\/code>\u6587\u4ef6\u53ef\u4ee5\u662f\u7a7a\u7684\uff0c\u4f46\u5b83\u7684\u5b58\u5728\u4f7f\u5f97\u8be5\u76ee\u5f55\u88abPython\u89e3\u91ca\u5668\u89c6\u4e3a\u4e00\u4e2a\u5305\u3002<\/p>\n<\/p>\n<p><p>\u5047\u8bbe\u9879\u76ee\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code>project\/<\/p>\n<p>    main.py<\/p>\n<p>    package\/<\/p>\n<p>        __init__.py<\/p>\n<p>        my_module.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728<code>main.py<\/code>\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5305\u7ed3\u6784\u5bfc\u5165<code>my_module.py<\/code>\u4e2d\u7684\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from package import my_module<\/p>\n<p>my_module.my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5305\u7ed3\u6784\u4f7f\u5f97\u9879\u76ee\u7ec4\u7ec7\u66f4\u52a0\u6e05\u6670\uff0c\u4fbf\u4e8e\u6a21\u5757\u7684\u7ba1\u7406\u548c\u5bfc\u5165\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u6a21\u5757\u5bfc\u5165\u7684\u5e38\u89c1\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\uff0c\u6a21\u5757\u5bfc\u5165\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6a21\u5757\u8def\u5f84\u95ee\u9898<\/li>\n<\/ol>\n<p><p>\u786e\u4fdd\u6a21\u5757\u8def\u5f84\u6b63\u786e\uff0c\u907f\u514d\u62fc\u5199\u9519\u8bef\u6216\u8def\u5f84\u4e0d\u4e00\u81f4\u7684\u95ee\u9898\u3002\u53ef\u4ee5\u4f7f\u7528<code>os.path<\/code>\u6a21\u5757\u83b7\u53d6\u7edd\u5bf9\u8def\u5f84\uff0c\u907f\u514d\u624b\u52a8\u62fc\u63a5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import sys<\/p>\n<p>module_path = os.path.abspath(os.path.join(os.path.dirname(__file__), &#39;module&#39;))<\/p>\n<p>sys.path.append(module_path)<\/p>\n<p>import my_module<\/p>\n<p>my_module.my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5faa\u73af\u5bfc\u5165\u95ee\u9898<\/li>\n<\/ol>\n<p><p>\u5faa\u73af\u5bfc\u5165\u662f\u6307\u4e24\u4e2a\u6216\u591a\u4e2a\u6a21\u5757\u76f8\u4e92\u5bfc\u5165\uff0c\u53ef\u80fd\u5bfc\u81f4\u5bfc\u5165\u5931\u8d25\u6216\u4ee3\u7801\u6267\u884c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u91cd\u6784\u4ee3\u7801\u3001\u4f7f\u7528\u5ef6\u8fdf\u5bfc\u5165\u7b49\u65b9\u6cd5\u89e3\u51b3\u5faa\u73af\u5bfc\u5165\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># module_a.py<\/p>\n<p>import module_b<\/p>\n<p>def function_a():<\/p>\n<p>    pass<\/p>\n<h2><strong>module_b.py<\/strong><\/h2>\n<p>import module_a<\/p>\n<p>def function_b():<\/p>\n<p>    module_a.function_a()<\/p>\n<h2><strong>\u5ef6\u8fdf\u5bfc\u5165<\/strong><\/h2>\n<p>def function_b():<\/p>\n<p>    import module_a<\/p>\n<p>    module_a.function_a()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u73af\u5883\u95ee\u9898<\/li>\n<\/ol>\n<p><p>\u5728\u4e0d\u540c\u7684\u5f00\u53d1\u73af\u5883\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u6a21\u5757\u5bfc\u5165\u5931\u8d25\u7684\u95ee\u9898\u3002\u786e\u4fdd\u5728\u6b63\u786e\u7684Python\u73af\u5883\u4e2d\u8fd0\u884c\u4ee3\u7801\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\u7ba1\u7406\u4f9d\u8d56\u5173\u7cfb\uff0c\u907f\u514d\u73af\u5883\u51b2\u7a81\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\"># \u521b\u5efa\u865a\u62df\u73af\u5883<\/p>\n<p>python -m venv myenv<\/p>\n<h2><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong><\/h2>\n<p>source myenv\/bin\/activate  # Linux\/macOS<\/p>\n<p>myenv\\Scripts\\activate  # Windows<\/p>\n<h2><strong>\u5b89\u88c5\u4f9d\u8d56<\/strong><\/h2>\n<p>pip install -r requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u8c03\u7528\u81ea\u5df1\u5199\u7684Python\u6587\u4ef6\u8def\u5f84\u662f\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u5e38\u89c1\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u3001sys.path.append()\u65b9\u6cd5\u3001importlib.util\u6a21\u5757\u7b49\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\u6a21\u5757\u7684\u5bfc\u5165\u3002\u6839\u636e\u9879\u76ee\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u786e\u4fdd\u6a21\u5757\u8def\u5f84\u6b63\u786e\uff0c\u907f\u514d\u5e38\u89c1\u7684\u5bfc\u5165\u95ee\u9898\u3002\u901a\u8fc7\u5408\u7406\u7ec4\u7ec7\u9879\u76ee\u76ee\u5f55\u7ed3\u6784\u548c\u4f7f\u7528\u5305\u7ed3\u6784\uff0c\u53ef\u4ee5\u4f7f\u6a21\u5757\u7ba1\u7406\u66f4\u52a0\u6e05\u6670\uff0c\u63d0\u5347\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6b63\u786e\u5f15\u7528\u81ea\u5df1\u7684\u6587\u4ef6\u8def\u5f84\uff1f<\/strong><br \/>\u5728Python\u4e2d\u5f15\u7528\u81ea\u5df1\u7684\u6587\u4ef6\u8def\u5f84\u53ef\u4ee5\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u6216\u76f8\u5bf9\u8def\u5f84\u3002\u7edd\u5bf9\u8def\u5f84\u662f\u6587\u4ef6\u5728\u6587\u4ef6\u7cfb\u7edf\u4e2d\u7684\u5b8c\u6574\u8def\u5f84\uff0c\u800c\u76f8\u5bf9\u8def\u5f84\u5219\u662f\u76f8\u5bf9\u4e8e\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u7684\u8def\u5f84\u3002\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u4e2d\u7684<code>os.path<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7ba1\u7406\u8fd9\u4e9b\u8def\u5f84\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<code>os.getcwd()<\/code>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff0c\u5e76\u4f7f\u7528<code>os.path.join()<\/code>\u6765\u6784\u5efa\u8def\u5f84\uff0c\u786e\u4fdd\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u90fd\u80fd\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u5904\u7406Python\u6587\u4ef6\u8def\u5f84\uff1f<\/strong><br \/>\u5728Windows\u3001macOS\u548cLinux\u7b49\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u6587\u4ef6\u8def\u5f84\u7684\u4e66\u5199\u65b9\u5f0f\u6709\u6240\u4e0d\u540c\u3002\u5728Windows\u4e2d\uff0c\u8def\u5f84\u4f7f\u7528\u53cd\u659c\u6760\uff08\\\uff09\uff0c\u800c\u5728Linux\u548cmacOS\u4e2d\uff0c\u8def\u5f84\u4f7f\u7528\u6b63\u659c\u6760\uff08\/\uff09\u3002\u4e3a\u4e86\u907f\u514d\u8def\u5f84\u95ee\u9898\uff0c\u5efa\u8bae\u4f7f\u7528<code>os.path<\/code>\u6a21\u5757\u7684\u76f8\u5173\u51fd\u6570\u6765\u5904\u7406\u8def\u5f84\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u4ee3\u7801\u5728\u6240\u6709\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u90fd\u80fd\u987a\u5229\u8fd0\u884c\u3002<\/p>\n<p><strong>\u5982\u679c\u6211\u7684Python\u6587\u4ef6\u4e0d\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u5982\u4f55\u8c03\u7528\u5b83\uff1f<\/strong><br \/>\u5982\u679c\u4f60\u7684Python\u6587\u4ef6\u4e0d\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u6765\u8c03\u7528\u5b83\u3002\u53ea\u9700\u5728\u4ee3\u7801\u4e2d\u63d0\u4f9b\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u5373\u53ef\u3002\u4f8b\u5982\uff0c<code>python \/path\/to\/your_file.py<\/code>\u3002\u53e6\u5916\uff0c\u4f60\u4e5f\u53ef\u4ee5\u901a\u8fc7<code>sys.path.append(&#39;\/path\/to\/your_module_directory&#39;)<\/code>\u5c06\u6587\u4ef6\u6240\u5728\u76ee\u5f55\u6dfb\u52a0\u5230Python\u7684\u6a21\u5757\u641c\u7d22\u8def\u5f84\u4e2d\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u6587\u4ef6\u4e2d\u7684\u51fd\u6570\u6216\u7c7b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8c03\u7528\u81ea\u5df1\u5199\u7684Python\u6587\u4ef6\u8def\u5f84\u662f\u6307\u5728Python\u7a0b\u5e8f\u4e2d\u5f15\u7528\u6216\u5bfc\u5165\u5176\u4ed6Python\u6587\u4ef6\uff0c\u4ee5\u4fbf\u4f7f\u7528\u5176\u4e2d\u5b9a\u4e49\u7684\u51fd\u6570 [&hellip;]","protected":false},"author":3,"featured_media":1030148,"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\/1030140"}],"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=1030140"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1030140\/revisions"}],"predecessor-version":[{"id":1030150,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1030140\/revisions\/1030150"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1030148"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1030140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1030140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1030140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}