{"id":922397,"date":"2024-12-26T14:30:31","date_gmt":"2024-12-26T06:30:31","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/922397.html"},"modified":"2024-12-26T14:30:33","modified_gmt":"2024-12-26T06:30:33","slug":"python%e5%a6%82%e4%bd%95%e5%88%9b%e5%bb%ba%e5%8c%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/922397.html","title":{"rendered":"python\u5982\u4f55\u521b\u5efa\u5305"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210923\/0397db8e-7b8f-48a7-a36c-f66367f6858f.webp\" alt=\"python\u5982\u4f55\u521b\u5efa\u5305\" \/><\/p>\n<p><p> <strong>\u521b\u5efaPython\u5305\u7684\u57fa\u672c\u6b65\u9aa4\u4e3a\uff1a\u521b\u5efa\u4e00\u4e2a\u5305\u542b<code>__init__.py<\/code>\u6587\u4ef6\u7684\u76ee\u5f55\u3001\u5c06\u6a21\u5757\u6587\u4ef6\u653e\u5165\u8be5\u76ee\u5f55\u4e2d\u3001\u914d\u7f6e<code>setup.py<\/code>\u6587\u4ef6\u8fdb\u884c\u6253\u5305\u3002<\/strong>\u521b\u5efa<code>__init__.py<\/code>\u6587\u4ef6\u662f\u7528\u4e8e\u6807\u8bc6\u8be5\u76ee\u5f55\u4e3a\u5305\u7684\u4e00\u90e8\u5206\uff0c\u901a\u8fc7<code>setup.py<\/code>\u6587\u4ef6\u53ef\u4ee5\u5c06\u5305\u53d1\u5e03\u5230PyPI\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecdPython\u5305\u7684\u521b\u5efa\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u521b\u5efa\u5305\u7684\u57fa\u672c\u7ed3\u6784<\/p>\n<\/p>\n<p><p>\u5728\u521b\u5efaPython\u5305\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u4e86\u89e3\u5305\u7684\u57fa\u672c\u7ed3\u6784\u3002\u4e00\u4e2aPython\u5305\u901a\u5e38\u7531\u4e00\u4e2a\u76ee\u5f55\u7ec4\u6210\uff0c\u8be5\u76ee\u5f55\u5305\u542b\u591a\u4e2a\u6a21\u5757\u6587\u4ef6\u548c\u4e00\u4e2a<code>__init__.py<\/code>\u6587\u4ef6\u3002<code>__init__.py<\/code>\u6587\u4ef6\u53ef\u4ee5\u662f\u7a7a\u7684\uff0c\u4f46\u5b83\u7684\u5b58\u5728\u8868\u660e\u8be5\u76ee\u5f55\u662f\u4e00\u4e2a\u5305\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5305\u76ee\u5f55\u7ed3\u6784<\/strong><\/p>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u4f5c\u4e3a\u5305\u7684\u6839\u76ee\u5f55\u3002\u5728\u8be5\u76ee\u5f55\u4e0b\uff0c\u521b\u5efa\u4e00\u4e2a<code>__init__.py<\/code>\u6587\u4ef6\u4ee5\u53ca\u5176\u4ed6\u6a21\u5757\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u7b80\u5355\u7684\u5305\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code>mypackage\/<\/p>\n<p>    __init__.py<\/p>\n<p>    module1.py<\/p>\n<p>    module2.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u7ed3\u6784\u4e2d\uff0c<code>mypackage<\/code>\u662f\u5305\u540d\uff0c<code>module1.py<\/code>\u548c<code>module2.py<\/code>\u662f\u5305\u4e2d\u7684\u6a21\u5757\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u6a21\u5757\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u6a21\u5757\u6587\u4ef6\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u5728<code>module1.py<\/code>\u4e2d\uff0c\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e9b\u51fd\u6570\u6216\u7c7b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># module1.py<\/p>\n<p>def greet(name):<\/p>\n<p>    return f&quot;Hello, {name}!&quot;<\/p>\n<p>class Greeter:<\/p>\n<p>    def __init__(self, name):<\/p>\n<p>        self.name = name<\/p>\n<p>    def greet(self):<\/p>\n<p>        return f&quot;Hello, {self.name}!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728<code>module2.py<\/code>\u4e2d\u53ef\u4ee5\u7f16\u5199\u5176\u4ed6\u529f\u80fd\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># module2.py<\/p>\n<p>def farewell(name):<\/p>\n<p>    return f&quot;Goodbye, {name}!&quot;<\/p>\n<p>class Fareweller:<\/p>\n<p>    def __init__(self, name):<\/p>\n<p>        self.name = name<\/p>\n<p>    def farewell(self):<\/p>\n<p>        return f&quot;Goodbye, {self.name}!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u914d\u7f6e<code>setup.py<\/code>\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u80fd\u591f\u5206\u53d1\u548c\u5b89\u88c5\u5305\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\u3002<code>setup.py<\/code>\u6587\u4ef6\u7528\u4e8e\u5b9a\u4e49\u5305\u7684\u4fe1\u606f\u548c\u4f9d\u8d56\u9879\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa<code>setup.py<\/code><\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5305\u7684\u6839\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a<code>setup.py<\/code>\u6587\u4ef6\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684<code>setup.py<\/code>\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># setup.py<\/p>\n<p>from setuptools import setup, find_packages<\/p>\n<p>setup(<\/p>\n<p>    name=&#39;mypackage&#39;,<\/p>\n<p>    version=&#39;0.1&#39;,<\/p>\n<p>    packages=find_packages(),<\/p>\n<p>    install_requires=[<\/p>\n<p>        # \u5217\u51fa\u5305\u7684\u4f9d\u8d56\u9879<\/p>\n<p>    ],<\/p>\n<p>    author=&#39;Your Name&#39;,<\/p>\n<p>    author_em<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>l=&#39;your.email@example.com&#39;,<\/p>\n<p>    description=&#39;A simple example package&#39;,<\/p>\n<p>    classifiers=[<\/p>\n<p>        &#39;Programming Language :: Python :: 3&#39;,<\/p>\n<p>        &#39;License :: OSI Approved :: MIT License&#39;,<\/p>\n<p>        &#39;Operating System :: OS Independent&#39;,<\/p>\n<p>    ],<\/p>\n<p>    python_requires=&#39;&gt;=3.6&#39;,<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u6587\u4ef6\u4f7f\u7528<code>setuptools<\/code>\u5e93\u6765\u914d\u7f6e\u5305\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u540d\u79f0\u3001\u7248\u672c\u3001\u4f5c\u8005\u3001\u4f9d\u8d56\u9879\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u5305\u7684\u4f9d\u8d56\u9879<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u5305\u4f9d\u8d56\u4e8e\u5176\u4ed6\u5e93\uff0c\u53ef\u4ee5\u5728<code>install_requires<\/code>\u4e2d\u5217\u51fa\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5305\u4f9d\u8d56\u4e8e<code>requests<\/code>\u5e93\uff0c\u53ef\u4ee5\u8fd9\u6837\u6dfb\u52a0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">install_requires=[<\/p>\n<p>    &#39;requests&gt;=2.25.1&#39;,<\/p>\n<p>],<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u521b\u5efa<code>__init__.py<\/code>\u6587\u4ef6<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6807\u8bc6\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u7a7a\u7684<code>__init__.py<\/code>\u6587\u4ef6\u3002\u8fd9\u662f\u4e3a\u4e86\u6807\u8bc6\u8be5\u76ee\u5f55\u662f\u4e00\u4e2a\u5305\u3002\u8be5\u6587\u4ef6\u53ef\u4ee5\u4e3a\u7a7a\uff0c\u4f46\u53ef\u4ee5\u5728\u5176\u4e2d\u5b9a\u4e49\u5305\u7684\u516c\u5171\u63a5\u53e3\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u53ef\u4ee5\u5728<code>__init__.py<\/code>\u4e2d\u5bfc\u5165\u6a21\u5757\u4e2d\u7684\u67d0\u4e9b\u529f\u80fd\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># __init__.py<\/p>\n<p>from .module1 import greet, Greeter<\/p>\n<p>from .module2 import farewell, Fareweller<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u6837\u505a\uff0c\u53ef\u4ee5\u5728\u5305\u5916\u90e8\u76f4\u63a5\u4f7f\u7528\u8fd9\u4e9b\u529f\u80fd\uff0c\u800c\u4e0d\u5fc5\u6307\u5b9a\u6a21\u5757\u540d\u79f0\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u6253\u5305\u548c\u53d1\u5e03<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5305\u7684\u6839\u76ee\u5f55\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6253\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py sdist bdist_wheel<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a<code>dist<\/code>\u76ee\u5f55\uff0c\u5176\u4e2d\u5305\u542b\u751f\u6210\u7684\u5305\u6587\u4ef6\uff08<code>.tar.gz<\/code>\u548c<code>.whl<\/code>\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53d1\u5e03\u5230PyPI<\/strong><\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>twine<\/code>\u5c06\u5305\u53d1\u5e03\u5230PyPI\u3002\u9996\u5148\uff0c\u786e\u4fdd\u5df2\u5b89\u88c5<code>twine<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install twine<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5305\u4e0a\u4f20\u5230PyPI\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">twine upload dist\/*<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6309\u7167\u63d0\u793a\u8f93\u5165PyPI\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u5373\u53ef\u5b8c\u6210\u53d1\u5e03\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u6d4b\u8bd5\u548c\u4f7f\u7528\u5305<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7<code>pip<\/code>\u5b89\u88c5\u521a\u521a\u521b\u5efa\u7684\u5305\u3002\u5728\u5305\u7684\u6839\u76ee\u5f55\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install .<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u540e\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u4f7f\u7528\u8be5\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from mypackage import greet, farewell<\/p>\n<p>print(greet(&quot;World&quot;))<\/p>\n<p>print(farewell(&quot;World&quot;))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>Hello, World!<\/p>\n<p>Goodbye, World!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u6700\u4f73\u5b9e\u8df5<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7248\u672c\u63a7\u5236<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u5305\u65f6\uff0c\u4f7f\u7528\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff08\u5982Git\uff09\u6765\u7ba1\u7406\u4ee3\u7801\u66f4\u6539\u3002\u8fd9\u6709\u52a9\u4e8e\u8ddf\u8e2a\u4fee\u6539\u5386\u53f2\u5e76\u534f\u4f5c\u5f00\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6587\u6863\u7f16\u5199<\/strong><\/p>\n<\/p>\n<p><p>\u4e3a\u5305\u7f16\u5199\u8be6\u7ec6\u7684\u6587\u6863\uff0c\u5305\u62ec\u4f7f\u7528\u8bf4\u660e\u3001API\u6587\u6863\u548c\u793a\u4f8b\u4ee3\u7801\u3002\u53ef\u4ee5\u4f7f\u7528<code>Sphinx<\/code>\u7b49\u5de5\u5177\u751f\u6210\u6587\u6863\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6d4b\u8bd5<\/strong><\/p>\n<\/p>\n<p><p>\u4e3a\u5305\u7f16\u5199\u5355\u5143\u6d4b\u8bd5\uff0c\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u548c\u7a33\u5b9a\u6027\u3002\u53ef\u4ee5\u4f7f\u7528<code>unittest<\/code>\u6216<code>pytest<\/code>\u7b49\u6846\u67b6\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6301\u7eed\u96c6\u6210<\/strong><\/p>\n<\/p>\n<p><p>\u914d\u7f6e\u6301\u7eed\u96c6\u6210\u7cfb\u7edf\uff08\u5982Travis CI\u6216GitHub Actions\uff09\uff0c\u81ea\u52a8\u8fd0\u884c\u6d4b\u8bd5\u5e76\u68c0\u67e5\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u60a8\u53ef\u4ee5\u6210\u529f\u521b\u5efa\u3001\u53d1\u5e03\u548c\u7ef4\u62a4\u4e00\u4e2aPython\u5305\u3002\u5e0c\u671b\u8fd9\u4e9b\u4fe1\u606f\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\uff01<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u4e00\u4e2a\u5305\uff1f<\/strong><br \/>\u8981\u521b\u5efa\u4e00\u4e2aPython\u5305\uff0c\u60a8\u9700\u8981\u5728\u9879\u76ee\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u5e76\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\u653e\u7f6e\u4e00\u4e2a\u540d\u4e3a<code>__init__.py<\/code>\u7684\u6587\u4ef6\u3002\u8fd9\u4e2a\u6587\u4ef6\u53ef\u4ee5\u662f\u7a7a\u7684\uff0c\u6216\u8005\u5305\u542b\u4e00\u4e9b\u521d\u59cb\u5316\u4ee3\u7801\u3002\u5305\u7684\u7ed3\u6784\u901a\u5e38\u662f\u8fd9\u6837\u7684\uff1a  <\/p>\n<pre><code>my_package\/\n    __init__.py\n    module1.py\n    module2.py\n<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>my_package<\/code>\u5c31\u662f\u60a8\u7684\u5305\u540d\uff0c\u800c<code>module1.py<\/code>\u548c<code>module2.py<\/code>\u662f\u5305\u4e2d\u7684\u6a21\u5757\u3002\u8fd9\u6837\uff0c\u60a8\u5c31\u53ef\u4ee5\u901a\u8fc7<code>import my_package.module1<\/code>\u6765\u5bfc\u5165\u6a21\u5757\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u5305\u4e2d\u7ec4\u7ec7\u6a21\u5757\u4ee5\u63d0\u9ad8\u53ef\u8bfb\u6027\uff1f<\/strong><br \/>\u6a21\u5757\u7684\u7ec4\u7ec7\u53ef\u4ee5\u901a\u8fc7\u903b\u8f91\u5206\u7ec4\u548c\u547d\u540d\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u6839\u636e\u529f\u80fd\u5c06\u76f8\u5173\u6a21\u5757\u653e\u5728\u540c\u4e00\u4e2a\u5305\u4e2d\uff0c\u5e76\u4f7f\u7528\u6e05\u6670\u7684\u547d\u540d\u6765\u8bf4\u660e\u5b83\u4eec\u7684\u7528\u9014\u3002\u6b64\u5916\uff0c\u9002\u5f53\u7684\u6587\u6863\u5b57\u7b26\u4e32\u548c\u6ce8\u91ca\u4e5f\u662f\u63d0\u9ad8\u53ef\u8bfb\u6027\u7684\u5173\u952e\u3002\u60a8\u53ef\u4ee5\u521b\u5efa\u5b50\u5305\u6765\u8fdb\u4e00\u6b65\u7ec4\u7ec7\u60a8\u7684\u4ee3\u7801\uff0c\u7ed3\u6784\u53ef\u4ee5\u662f\uff1a  <\/p>\n<pre><code>my_package\/\n    __init__.py\n    sub_package\/\n        __init__.py\n        sub_module.py\n<\/code><\/pre>\n<p>\u8fd9\u6837\u7684\u7ed3\u6784\u4f7f\u5f97\u4ee3\u7801\u7684\u7ba1\u7406\u548c\u4f7f\u7528\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u5305\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\u6216\u6a21\u5757\uff1f<\/strong><br \/>\u5728\u60a8\u7684\u5305\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\uff0c\u60a8\u9700\u8981\u786e\u4fdd\u8fd9\u4e9b\u5e93\u5df2\u7ecf\u5b89\u88c5\u5728\u60a8\u7684Python\u73af\u5883\u4e2d\u3002\u53ef\u4ee5\u4f7f\u7528<code>pip install library_name<\/code>\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\u3002\u5728\u60a8\u7684\u6a21\u5757\u4e2d\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528<code>import library_name<\/code>\u6765\u5bfc\u5165\u5916\u90e8\u5e93\u3002\u786e\u4fdd\u5728<code>__init__.py<\/code>\u6587\u4ef6\u4e2d\u9002\u5f53\u5730\u5bfc\u5165\u5fc5\u8981\u7684\u6a21\u5757\uff0c\u4ee5\u4fbf\u5728\u5305\u5916\u90e8\u4e5f\u80fd\u65b9\u4fbf\u5730\u8bbf\u95ee\u5b83\u4eec\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u521b\u5efaPython\u5305\u7684\u57fa\u672c\u6b65\u9aa4\u4e3a\uff1a\u521b\u5efa\u4e00\u4e2a\u5305\u542b__init__.py\u6587\u4ef6\u7684\u76ee\u5f55\u3001\u5c06\u6a21\u5757\u6587\u4ef6\u653e\u5165\u8be5\u76ee\u5f55\u4e2d\u3001\u914d\u7f6ese [&hellip;]","protected":false},"author":3,"featured_media":922401,"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\/922397"}],"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=922397"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/922397\/revisions"}],"predecessor-version":[{"id":922404,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/922397\/revisions\/922404"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/922401"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=922397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=922397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=922397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}