{"id":1051815,"date":"2024-12-31T14:19:27","date_gmt":"2024-12-31T06:19:27","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1051815.html"},"modified":"2024-12-31T14:19:30","modified_gmt":"2024-12-31T06:19:30","slug":"python%e5%a6%82%e4%bd%95%e6%90%ad%e5%bb%ba%e5%a4%9a%e4%b8%aa%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1051815.html","title":{"rendered":"python\u5982\u4f55\u642d\u5efa\u591a\u4e2a\u5f00\u53d1\u73af\u5883\u53d8\u91cf"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/41933ef9-9bd0-4226-aae5-0c19cd0d0d65.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u642d\u5efa\u591a\u4e2a\u5f00\u53d1\u73af\u5883\u53d8\u91cf\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u642d\u5efa\u591a\u4e2a\u5f00\u53d1\u73af\u5883\u53d8\u91cf\u7684\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u865a\u62df\u73af\u5883\u3001conda\u73af\u5883\u7ba1\u7406\u5de5\u5177\u3001Docker\u5bb9\u5668\u7b49\u3002<\/strong><\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08virtualenv\uff09<\/strong>\uff1a\u865a\u62df\u73af\u5883\u5141\u8bb8\u4f60\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u521b\u5efa\u9694\u79bb\u7684Python\u73af\u5883\uff0c\u4f7f\u6bcf\u4e2a\u9879\u76ee\u53ef\u4ee5\u6709\u72ec\u7acb\u7684\u5e93\u548c\u4f9d\u8d56\u3002<\/li>\n<li><strong>\u4f7f\u7528Conda\u73af\u5883\u7ba1\u7406\u5de5\u5177<\/strong>\uff1aConda\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u5305\u7ba1\u7406\u7cfb\u7edf\u548c\u73af\u5883\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u521b\u5efa\u548c\u7ba1\u7406\u72ec\u7acb\u7684\u73af\u5883\u3002<\/li>\n<li><strong>\u4f7f\u7528Docker\u5bb9\u5668<\/strong>\uff1aDocker\u5141\u8bb8\u4f60\u5c06\u5e94\u7528\u53ca\u5176\u4f9d\u8d56\u6253\u5305\u5230\u4e00\u4e2a\u5bb9\u5668\u4e2d\uff0c\u4f7f\u5176\u53ef\u4ee5\u5728\u4efb\u4f55\u73af\u5883\u4e2d\u4e00\u81f4\u8fd0\u884c\u3002<\/li>\n<\/ol>\n<p><p>\u4e0b\u9762\u6211\u4eec\u8be6\u7ec6\u63cf\u8ff0\u5176\u4e2d\u7684<strong>\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08virtualenv\uff09<\/strong>\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p><strong>\u865a\u62df\u73af\u5883\uff08virtualenv\uff09<\/strong>\u662f\u4e00\u4e2a\u521b\u5efa\u548c\u7ba1\u7406\u72ec\u7acb\u7684Python\u73af\u5883\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u89e3\u51b3\u4f9d\u8d56\u51b2\u7a81\u7684\u95ee\u9898\u3002\u5b83\u5141\u8bb8\u4f60\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u521b\u5efa\u591a\u4e2a\u9694\u79bb\u7684Python\u73af\u5883\uff0c\u6bcf\u4e2a\u73af\u5883\u6709\u72ec\u7acb\u7684\u5e93\u548c\u4f9d\u8d56\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08virtualenv\uff09<\/h3>\n<\/p>\n<p><h4>\u5b89\u88c5virtualenv<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5virtualenv\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u901a\u8fc7pip\u5b89\u88c5virtualenv\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install virtualenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u521b\u5efa\u865a\u62df\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">virtualenv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\uff0c<code>myenv<\/code>\u662f\u865a\u62df\u73af\u5883\u7684\u540d\u79f0\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u66f4\u6539\u3002<\/p>\n<\/p>\n<p><h4>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u7684\u547d\u4ee4\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\u3002<\/p>\n<p>\u5728Windows\u4e0a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">myenv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Unix\u6216MacOS\u4e0a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u540e\uff0c\u4f60\u7684\u547d\u4ee4\u63d0\u793a\u7b26\u4f1a\u53d1\u751f\u53d8\u5316\uff0c\u663e\u793a\u5f53\u524d\u6d3b\u8dc3\u7684\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<p><h4>\u5b89\u88c5\u4f9d\u8d56<\/h4>\n<\/p>\n<p><p>\u5728\u865a\u62df\u73af\u5883\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6240\u6709\u7684\u5e93\u548c\u4f9d\u8d56\u5c06\u88ab\u5b89\u88c5\u5230\u865a\u62df\u73af\u5883\u4e2d\uff0c\u800c\u4e0d\u4f1a\u5f71\u54cd\u5168\u5c40\u7684Python\u73af\u5883\u3002<\/p>\n<\/p>\n<p><h4>\u9000\u51fa\u865a\u62df\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u5f53\u4f60\u5b8c\u6210\u5f00\u53d1\u5de5\u4f5c\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9000\u51fa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528Conda\u73af\u5883\u7ba1\u7406\u5de5\u5177<\/h3>\n<\/p>\n<p><h4>\u5b89\u88c5Conda<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Anaconda\u6216Miniconda\u3002Anaconda\u662f\u4e00\u4e2a\u5305\u542b\u4e86\u5927\u91cf\u79d1\u5b66\u8ba1\u7b97\u5e93\u7684Python\u53d1\u884c\u7248\uff0c\u800cMiniconda\u53ea\u5305\u542b\u6700\u5c0f\u7684\u5b89\u88c5\u5305\u53caConda\u3002<\/p>\n<\/p>\n<p><h4>\u521b\u5efaConda\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Conda\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda create --name myenv python=3.8<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\uff0c<code>myenv<\/code>\u662f\u73af\u5883\u7684\u540d\u79f0\uff0c<code>python=3.8<\/code>\u6307\u5b9a\u4e86Python\u7684\u7248\u672c\u3002<\/p>\n<\/p>\n<p><h4>\u6fc0\u6d3bConda\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u6fc0\u6d3bConda\u73af\u5883\u7684\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda activate myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u5b89\u88c5\u4f9d\u8d56<\/h4>\n<\/p>\n<p><p>\u5728Conda\u73af\u5883\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda install numpy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6240\u6709\u7684\u5e93\u548c\u4f9d\u8d56\u5c06\u88ab\u5b89\u88c5\u5230Conda\u73af\u5883\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>\u9000\u51faConda\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u5f53\u4f60\u5b8c\u6210\u5f00\u53d1\u5de5\u4f5c\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9000\u51faConda\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528Docker\u5bb9\u5668<\/h3>\n<\/p>\n<p><h4>\u5b89\u88c5Docker<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5728\u4f60\u7684\u673a\u5668\u4e0a\u5b89\u88c5Docker\u3002\u4f60\u53ef\u4ee5\u4eceDocker\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5Docker\u3002<\/p>\n<\/p>\n<p><h4>\u521b\u5efaDockerfile<\/h4>\n<\/p>\n<p><p>\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2aDockerfile\u6765\u5b9a\u4e49\u4f60\u7684Python\u73af\u5883\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8bDockerfile\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-Dockerfile\">FROM python:3.8<\/p>\n<p>WORKDIR \/app<\/p>\n<p>COPY requirements.txt requirements.txt<\/p>\n<p>RUN pip install -r requirements.txt<\/p>\n<p>COPY . .<\/p>\n<p>CMD [&quot;python&quot;, &quot;app.py&quot;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2aDockerfile\u5b9a\u4e49\u4e86\u4e00\u4e2a\u57fa\u4e8ePython 3.8\u7684Docker\u955c\u50cf\uff0c\u5b89\u88c5\u4e86requirements.txt\u4e2d\u7684\u4f9d\u8d56\uff0c\u5e76\u8fd0\u884capp.py\u3002<\/p>\n<\/p>\n<p><h4>\u6784\u5efaDocker\u955c\u50cf<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6784\u5efaDocker\u955c\u50cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">docker build -t my-python-app .<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\uff0c<code>my-python-app<\/code>\u662f\u955c\u50cf\u7684\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h4>\u8fd0\u884cDocker\u5bb9\u5668<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884cDocker\u5bb9\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">docker run -it my-python-app<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5728\u9694\u79bb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u4f60\u7684Python\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u63a2\u8ba8\u4e86\u5728Python\u4e2d\u642d\u5efa\u591a\u4e2a\u5f00\u53d1\u73af\u5883\u53d8\u91cf\u7684\u4e3b\u8981\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u865a\u62df\u73af\u5883\u3001Conda\u73af\u5883\u7ba1\u7406\u5de5\u5177\u548cDocker\u5bb9\u5668\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u52bf\u548c\u5e94\u7528\u573a\u666f\u3002<strong>\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08virtualenv\uff09<\/strong>\u662f\u4e00\u4e2a\u7b80\u5355\u4e14\u5e7f\u6cdb\u4f7f\u7528\u7684\u65b9\u6cd5\uff0c\u5b83\u5141\u8bb8\u4f60\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u521b\u5efa\u9694\u79bb\u7684Python\u73af\u5883\uff0c\u4f7f\u6bcf\u4e2a\u9879\u76ee\u53ef\u4ee5\u6709\u72ec\u7acb\u7684\u5e93\u548c\u4f9d\u8d56\u3002\u800c<strong>\u4f7f\u7528Conda\u73af\u5883\u7ba1\u7406\u5de5\u5177<\/strong>\u5219\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u529f\u80fd\u548c\u66f4\u597d\u7684\u5305\u7ba1\u7406\u80fd\u529b\u3002<strong>\u4f7f\u7528Docker\u5bb9\u5668<\/strong>\u5219\u662f\u4e00\u4e2a\u5f3a\u5927\u4e14\u7075\u6d3b\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u9002\u7528\u4e8e\u9700\u8981\u5728\u4e0d\u540c\u73af\u5883\u4e2d\u4e00\u81f4\u8fd0\u884c\u5e94\u7528\u7684\u573a\u666f\u3002\u6839\u636e\u4f60\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7ba1\u7406Python\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2a\u5f00\u53d1\u73af\u5883\u53d8\u91cf\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2a\u5f00\u53d1\u73af\u5883\u53d8\u91cf\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u865a\u62df\u73af\u5883\u5de5\u5177\u6765\u5b9e\u73b0\uff0c\u5982venv\u6216virtualenv\u3002\u8fd9\u4e9b\u5de5\u5177\u5141\u8bb8\u4f60\u4e3a\u4e0d\u540c\u7684\u9879\u76ee\u521b\u5efa\u72ec\u7acb\u7684\u73af\u5883\uff0c\u6bcf\u4e2a\u73af\u5883\u53ef\u4ee5\u6709\u81ea\u5df1\u72ec\u7acb\u7684\u5e93\u548c\u4f9d\u8d56\u3002\u4f7f\u7528\u547d\u4ee4<code>python -m venv myenv<\/code>\u521b\u5efa\u4e00\u4e2a\u65b0\u73af\u5883\uff0c\u63a5\u7740\u7528<code>source myenv\/bin\/activate<\/code>\u6fc0\u6d3b\u5b83\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5207\u6362\u4e0d\u540c\u7684\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u9879\u76ee\u4e2d\u8bbe\u7f6e\u7279\u5b9a\u7684\u73af\u5883\u53d8\u91cf\uff1f<\/strong><br \/>\u8bbe\u7f6e\u7279\u5b9a\u7684\u73af\u5883\u53d8\u91cf\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u5728\u9879\u76ee\u7684\u542f\u52a8\u811a\u672c\u4e2d\u4f7f\u7528<code>os.environ<\/code>\u6765\u5b8c\u6210\u3002\u4f60\u53ef\u4ee5\u5728Python\u4ee3\u7801\u4e2d\u76f4\u63a5\u8bbe\u7f6e\uff0c\u4f8b\u5982\uff1a<code>import os<\/code>\u548c<code>os.environ[&#39;MY_VARIABLE&#39;] = &#39;value&#39;<\/code>\u3002\u6b64\u5916\uff0c\u4f7f\u7528<code>.env<\/code>\u6587\u4ef6\u548c<code>python-dotenv<\/code>\u5e93\u4e5f\u662f\u4e00\u79cd\u6d41\u884c\u7684\u65b9\u6cd5\uff0c\u8fd9\u6837\u53ef\u4ee5\u5c06\u73af\u5883\u53d8\u91cf\u5b58\u50a8\u5728\u6587\u4ef6\u4e2d\uff0c\u65b9\u4fbf\u7ba1\u7406\u548c\u52a0\u8f7d\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u591a\u4e2aPython\u73af\u5883\u4e4b\u95f4\u7684\u4f9d\u8d56\u51b2\u7a81\uff1f<\/strong><br \/>\u4f9d\u8d56\u51b2\u7a81\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u865a\u62df\u73af\u5883\u6765\u6709\u6548\u89e3\u51b3\u3002\u6bcf\u4e2a\u865a\u62df\u73af\u5883\u90fd\u6709\u81ea\u5df1\u7684\u4f9d\u8d56\u5e93\uff0c\u4e92\u4e0d\u5e72\u6270\u3002\u5728\u7ba1\u7406\u4f9d\u8d56\u65f6\uff0c\u4f7f\u7528<code>pip freeze &gt; requirements.txt<\/code>\u5bfc\u51fa\u73af\u5883\u7684\u4f9d\u8d56\u5217\u8868\uff0c\u5e76\u5728\u65b0\u73af\u5883\u4e2d\u4f7f\u7528<code>pip install -r requirements.txt<\/code>\u8fdb\u884c\u5b89\u88c5\uff0c\u786e\u4fdd\u9879\u76ee\u7684\u4f9d\u8d56\u4e00\u81f4\u6027\u3002\u6b64\u5916\uff0c\u8003\u8651\u4f7f\u7528<code>pipenv<\/code>\u6216<code>poetry<\/code>\u7b49\u5de5\u5177\uff0c\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u4f9d\u8d56\u7ba1\u7406\u548c\u73af\u5883\u9694\u79bb\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u642d\u5efa\u591a\u4e2a\u5f00\u53d1\u73af\u5883\u53d8\u91cf\u7684\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u865a\u62df\u73af\u5883\u3001conda\u73af\u5883\u7ba1\u7406\u5de5\u5177\u3001Docker\u5bb9\u5668\u7b49\u3002 [&hellip;]","protected":false},"author":3,"featured_media":1051826,"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\/1051815"}],"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=1051815"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1051815\/revisions"}],"predecessor-version":[{"id":1051830,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1051815\/revisions\/1051830"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1051826"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1051815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1051815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1051815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}