{"id":928828,"date":"2024-12-26T16:43:40","date_gmt":"2024-12-26T08:43:40","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/928828.html"},"modified":"2024-12-26T16:43:42","modified_gmt":"2024-12-26T08:43:42","slug":"python%e5%a6%82%e4%bd%95%e6%b7%bb%e5%8a%a0sdk","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/928828.html","title":{"rendered":"python\u5982\u4f55\u6dfb\u52a0SDK"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25064322\/7e2d178e-c912-4877-a31b-558fb0096779.webp\" alt=\"python\u5982\u4f55\u6dfb\u52a0SDK\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u6dfb\u52a0SDK\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528pip\u5b89\u88c5\u3001\u624b\u52a8\u4e0b\u8f7d\u548c\u914d\u7f6e\u3001\u96c6\u6210\u5230\u9879\u76ee\u73af\u5883\u4e2d<\/strong>\u3002\u5176\u4e2d\uff0c<strong>\u4f7f\u7528pip\u5b89\u88c5<\/strong>\u662f\u6700\u5e38\u89c1\u548c\u7b80\u4fbf\u7684\u65b9\u6cd5\u3002\u901a\u8fc7pip\u53ef\u4ee5\u76f4\u63a5\u4ecePython\u7684\u5305\u7ba1\u7406\u5668PyPI\u4e2d\u83b7\u53d6\u5e76\u5b89\u88c5SDK\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u8f93\u5165<code>pip install &lt;SDK\u540d\u79f0&gt;<\/code>\u5373\u53ef\u5b8c\u6210\u5b89\u88c5\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4ee5\u53ca\u5982\u4f55\u5728\u4e0d\u540c\u7684\u5f00\u53d1\u73af\u5883\u4e2d\u6b63\u786e\u914d\u7f6e\u548c\u4f7f\u7528SDK\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001PIP\u5b89\u88c5SDK<\/p>\n<\/p>\n<p><p>PIP\u662fPython\u7684\u5305\u7ba1\u7406\u5668\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u8f7b\u677e\u5730\u4e0b\u8f7d\u548c\u5b89\u88c5Python\u5e93\u548cSDK\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5PIP<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5b89\u88c5SDK\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u5df2\u7ecf\u5b89\u88c5\u4e86PIP\u3002\u5927\u591a\u6570Python\u53d1\u884c\u7248\u9ed8\u8ba4\u90fd\u5df2\u5305\u542bPIP\uff0c\u4f46\u5982\u679c\u6ca1\u6709\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m ensurepip --upgrade<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528PIP\u5b89\u88c5SDK<\/strong><\/li>\n<\/ol>\n<p><p>\u4e00\u65e6PIP\u5b89\u88c5\u5b8c\u6210\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7PIP\u6765\u5b89\u88c5SDK\u3002\u4f8b\u5982\uff0c\u8981\u5b89\u88c5AWS SDK for Python (Boto3)\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install boto3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>PIP\u4f1a\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\uff0c\u5e76\u5c06SDK\u5b89\u88c5\u5230\u4f60\u7684Python\u73af\u5883\u4e2d\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u5347\u7ea7\u548c\u5378\u8f7dSDK<\/strong><\/li>\n<\/ol>\n<p><p>\u540c\u6837\uff0cPIP\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5347\u7ea7\u548c\u5378\u8f7d\u5df2\u7ecf\u5b89\u88c5\u7684SDK\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u53ef\u4ee5\u5347\u7ea7SDK\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install &lt;SDK\u540d\u79f0&gt; --upgrade<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u82e5\u8981\u5378\u8f7dSDK\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip uninstall &lt;SDK\u540d\u79f0&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u624b\u52a8\u4e0b\u8f7d\u548c\u914d\u7f6eSDK<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0cSDK\u53ef\u80fd\u4e0d\u5728PyPI\u4e2d\uff0c\u6216\u8005\u4f60\u9700\u8981\u7279\u5b9a\u7248\u672c\uff0c\u8fd9\u65f6\u53ef\u4ee5\u624b\u52a8\u4e0b\u8f7d\u548c\u914d\u7f6e\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4e0b\u8f7dSDK<\/strong><\/li>\n<\/ol>\n<p><p>\u8bbf\u95eeSDK\u7684\u5b98\u65b9\u7f51\u7ad9\u6216\u5176GitHub\u4ed3\u5e93\uff0c\u4e0b\u8f7d\u4f60\u9700\u8981\u7684SDK\u7248\u672c\u3002\u901a\u5e38\uff0c\u8fd9\u4e9b\u7f51\u7ad9\u4f1a\u63d0\u4f9b\u538b\u7f29\u5305\uff08\u5982.zip\u6216.tar.gz\uff09\u683c\u5f0f\u7684\u4e0b\u8f7d\u9009\u9879\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u89e3\u538b\u548c\u5b89\u88c5<\/strong><\/li>\n<\/ol>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u5c06\u538b\u7f29\u5305\u89e3\u538b\u5230\u672c\u5730\u76ee\u5f55\u3002\u8fdb\u5165\u89e3\u538b\u540e\u7684\u76ee\u5f55\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py install<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4f1a\u5c06SDK\u5b89\u88c5\u5230\u4f60\u7684Python\u73af\u5883\u4e2d\uff0c\u4f9b\u4f60\u7684\u9879\u76ee\u4f7f\u7528\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/li>\n<\/ol>\n<p><p>\u4e00\u4e9bSDK\u53ef\u80fd\u9700\u8981\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u4f8b\u5982\uff0cAWS SDK\u9700\u8981\u8bbe\u7f6eAWS\u8bbf\u95ee\u5bc6\u94a5\u548c\u79d8\u5bc6\u5bc6\u94a5\u3002\u53ef\u4ee5\u5728\u64cd\u4f5c\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e2d\u6dfb\u52a0\u8fd9\u4e9b\u53d8\u91cf\uff0c\u6216\u8005\u5728\u4ee3\u7801\u4e2d\u901a\u8fc7<code>os.environ<\/code>\u6765\u8bbe\u7f6e\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u96c6\u6210\u5230\u9879\u76ee\u73af\u5883\u4e2d<\/p>\n<\/p>\n<p><p>\u65e0\u8bba\u901a\u8fc7\u4f55\u79cd\u65b9\u5f0f\u5b89\u88c5SDK\uff0c\u6b63\u786e\u96c6\u6210\u5230\u4f60\u7684\u9879\u76ee\u4e2d\u662f\u5173\u952e\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u865a\u62df\u73af\u5883<\/strong><\/li>\n<\/ol>\n<p><p>\u5efa\u8bae\u4e3a\u6bcf\u4e2aPython\u9879\u76ee\u4f7f\u7528\u865a\u62df\u73af\u5883\uff0c\u4ee5\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u4f9d\u8d56\u51b2\u7a81\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u548c\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m venv myenv<\/p>\n<p>source myenv\/bin\/activate  # On Windows use `myenv\\Scripts\\activate`<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u6fc0\u6d3b\u7684\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5SDK\uff0c\u8fd9\u6837SDK\u7684\u5b89\u88c5\u53ea\u4f1a\u5f71\u54cd\u5f53\u524d\u9879\u76ee\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5bfc\u5165\u548c\u4f7f\u7528SDK<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u9879\u76ee\u7684Python\u6587\u4ef6\u4e2d\uff0c\u901a\u8fc7<code>import<\/code>\u8bed\u53e5\u5bfc\u5165SDK\u3002\u4f8b\u5982\uff0c\u5bfc\u5165Boto3\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import boto3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528SDK\u63d0\u4f9b\u7684\u529f\u80fd\u548c\u65b9\u6cd5\u6765\u8fdb\u884c\u5f00\u53d1\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u7ba1\u7406\u4f9d\u8d56<\/strong><\/li>\n<\/ol>\n<p><p>\u5efa\u8bae\u5c06\u9879\u76ee\u7684\u4f9d\u8d56\u9879\u8bb0\u5f55\u5728<code>requirements.txt<\/code>\u4e2d\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u53ef\u4ee5\u751f\u6210\u6b64\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip freeze &gt; requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\uff0c\u5176\u4ed6\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528<code>pip install -r requirements.txt<\/code>\u6765\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u6240\u6709\u4f9d\u8d56\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u5e38\u89c1SDK\u53ca\u5176\u96c6\u6210<\/p>\n<\/p>\n<p><p>\u4e0d\u540c\u7684SDK\u53ef\u80fd\u6709\u4e0d\u540c\u7684\u96c6\u6210\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684Python SDK\u53ca\u5176\u96c6\u6210\u8bf4\u660e\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>AWS SDK (Boto3)<\/strong><\/li>\n<\/ol>\n<p><p>AWS SDK for Python\uff0c\u901a\u5e38\u79f0\u4e3aBoto3\uff0c\u662f\u7528\u4e8e\u4e0eAWS\u670d\u52a1\u8fdb\u884c\u4ea4\u4e92\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u4f7f\u7528PIP\u5b89\u88c5<\/strong>\uff1a<code>pip install boto3<\/code><\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u51ed\u8bc1<\/strong>\uff1a\u4f7f\u7528AWS CLI\u914d\u7f6e\u51ed\u8bc1\uff0c\u6216\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528<code>boto3.Session<\/code>\u663e\u5f0f\u8bbe\u7f6e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u793a\u4f8b<\/strong>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import boto3<\/p>\n<h2><strong>\u521b\u5efaS3\u5ba2\u6237\u7aef<\/strong><\/h2>\n<p>s3 = boto3.client(&#39;s3&#39;)<\/p>\n<h2><strong>\u5217\u51fa\u6240\u6709S3\u6876<\/strong><\/h2>\n<p>response = s3.list_buckets()<\/p>\n<p>for bucket in response[&#39;Buckets&#39;]:<\/p>\n<p>    print(bucket[&#39;Name&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<ol start=\"2\">\n<li><strong>Google Cloud SDK<\/strong><\/li>\n<\/ol>\n<p><p>Google Cloud SDK\u7528\u4e8e\u4e0eGoogle Cloud\u670d\u52a1\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u5b89\u88c5<\/strong>\uff1aGoogle\u5efa\u8bae\u4f7f\u7528\u5176\u5b89\u88c5\u811a\u672c\u6765\u5b89\u88c5SDK\u3002<\/li>\n<li><strong>\u914d\u7f6e<\/strong>\uff1a\u4f7f\u7528<code>gcloud init<\/code>\u547d\u4ee4\u6765\u914d\u7f6e\u9879\u76ee\u548c\u8ba4\u8bc1\u3002<\/li>\n<li><strong>\u4f7f\u7528<\/strong>\uff1a\u901a\u8fc7<code>google.cloud<\/code>\u5e93\u5728Python\u4e2d\u4f7f\u7528\u670d\u52a1\u3002<\/li>\n<\/ul>\n<ol start=\"3\">\n<li><strong>Azure SDK<\/strong><\/li>\n<\/ol>\n<p><p>Azure SDK\u5141\u8bb8\u5f00\u53d1\u8005\u4e0eAzure\u670d\u52a1\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5<\/strong>\uff1a\u4f7f\u7528PIP\u5b89\u88c5Azure SDK\u7ec4\u4ef6\uff0c\u5982<code>pip install azure-storage-blob<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e<\/strong>\uff1a\u901a\u5e38\u9700\u8981Azure\u8d26\u6237\u4fe1\u606f\u548c\u8fde\u63a5\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u793a\u4f8b<\/strong>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from azure.storage.blob import BlobServiceClient<\/p>\n<h2><strong>\u8fde\u63a5\u5230Blob\u670d\u52a1<\/strong><\/h2>\n<p>blob_service_client = BlobServiceClient.from_connection_string(&quot;&lt;connection_string&gt;&quot;)<\/p>\n<h2><strong>\u5217\u51fa\u6240\u6709\u5bb9\u5668<\/strong><\/h2>\n<p>cont<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ners = blob_service_client.list_containers()<\/p>\n<p>for container in containers:<\/p>\n<p>    print(container.name)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u4e94\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528SDK\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u5982\u4f9d\u8d56\u51b2\u7a81\u3001\u7248\u672c\u4e0d\u517c\u5bb9\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f9d\u8d56\u51b2\u7a81<\/strong><\/li>\n<\/ol>\n<p><p>\u4f9d\u8d56\u51b2\u7a81\u901a\u5e38\u662f\u7531\u4e8e\u591a\u4e2a\u5e93\u9700\u8981\u4e0d\u540c\u7248\u672c\u7684\u540c\u4e00\u4f9d\u8d56\u9879\u3002\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5<code>requirements.txt<\/code>\u6587\u4ef6\u5e76\u4f7f\u7528\u865a\u62df\u73af\u5883\u6765\u89e3\u51b3\u6b64\u95ee\u9898\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u7248\u672c\u4e0d\u517c\u5bb9<\/strong><\/li>\n<\/ol>\n<p><p>\u67d0\u4e9bSDK\u7684\u65b0\u7248\u672c\u53ef\u80fd\u4f1a\u5f15\u5165\u4e0d\u517c\u5bb9\u7684\u66f4\u6539\u3002\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9aSDK\u7684\u7248\u672c\u53f7\u6765\u907f\u514d\u6b64\u95ee\u9898\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install &lt;SDK\u540d\u79f0&gt;==&lt;\u7248\u672c\u53f7&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u7f51\u7edc\u95ee\u9898<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5b89\u88c5SDK\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7f51\u7edc\u95ee\u9898\u5bfc\u81f4\u4e0b\u8f7d\u5931\u8d25\u3002\u53ef\u4ee5\u5c1d\u8bd5\u66f4\u6362\u7f51\u7edc\u73af\u5883\uff0c\u6216\u4f7f\u7528\u4ee3\u7406\u6765\u89e3\u51b3\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u548c\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5728Python\u9879\u76ee\u4e2d\u6210\u529f\u6dfb\u52a0\u548c\u4f7f\u7528\u5404\u79cdSDK\u3002\u8fd9\u4e0d\u4ec5\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387\uff0c\u8fd8\u80fd\u8ba9\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u83b7\u5f97\u66f4\u5f3a\u5927\u7684\u529f\u80fd\u548c\u66f4\u5e7f\u6cdb\u7684\u670d\u52a1\u96c6\u6210\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u52a9\u4f60\u987a\u5229\u5730\u5728Python\u4e2d\u6dfb\u52a0\u548c\u4f7f\u7528SDK\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u9879\u76ee\u4e2d\u96c6\u6210\u7b2c\u4e09\u65b9SDK\uff1f<\/strong><br \/>\u5728Python\u9879\u76ee\u4e2d\u96c6\u6210\u7b2c\u4e09\u65b9SDK\u901a\u5e38\u6d89\u53ca\u51e0\u4e2a\u6b65\u9aa4\u3002\u9996\u5148\uff0c\u786e\u8ba4SDK\u7684\u6587\u6863\uff0c\u4ee5\u4e86\u89e3\u5982\u4f55\u5b89\u88c5\u548c\u914d\u7f6e\u3002\u5927\u591a\u6570SDK\u53ef\u4ee5\u901a\u8fc7Python\u7684\u5305\u7ba1\u7406\u5de5\u5177\u5982pip\u8fdb\u884c\u5b89\u88c5\uff0c\u60a8\u53ea\u9700\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>pip install sdk-name<\/code>\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u5bfc\u5165\u8be5SDK\uff0c\u5e76\u6309\u7167\u6587\u6863\u63d0\u4f9b\u7684\u793a\u4f8b\u4ee3\u7801\u8fdb\u884c\u8c03\u7528\uff0c\u786e\u4fdd\u60a8\u5df2\u8bbe\u7f6e\u597d\u6240\u9700\u7684API\u5bc6\u94a5\u6216\u5176\u4ed6\u8ba4\u8bc1\u4fe1\u606f\u3002<\/p>\n<p><strong>SDK\u4e0ePython\u5e93\u6709\u4ec0\u4e48\u533a\u522b\uff1f<\/strong><br \/>SDK\uff08\u8f6f\u4ef6\u5f00\u53d1\u5de5\u5177\u5305\uff09\u901a\u5e38\u5305\u542b\u591a\u79cd\u5de5\u5177\u548c\u5e93\uff0c\u7528\u4e8e\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u7279\u5b9a\u5e73\u53f0\u6216\u670d\u52a1\u4e0a\u6784\u5efa\u5e94\u7528\u3002\u800cPython\u5e93\u5219\u662f\u4e00\u4e9b\u53ef\u91cd\u7528\u7684\u4ee3\u7801\u6a21\u5757\uff0c\u901a\u5e38\u4e13\u6ce8\u4e8e\u7279\u5b9a\u7684\u529f\u80fd\u6216\u4efb\u52a1\u3002SDK\u53ef\u80fd\u5305\u62ec\u6587\u6863\u3001\u793a\u4f8b\u4ee3\u7801\u3001\u6d4b\u8bd5\u5de5\u5177\u7b49\uff0c\u800cPython\u5e93\u4e00\u822c\u53ea\u5305\u542b\u529f\u80fd\u6027\u4ee3\u7801\u3002\u56e0\u6b64\uff0c\u5728\u9009\u62e9\u65f6\u9700\u8003\u8651\u9879\u76ee\u9700\u6c42\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406Python SDK\u7684\u7248\u672c\u66f4\u65b0\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Python SDK\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4fdd\u6301SDK\u7684\u7248\u672c\u66f4\u65b0\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528<code>pip list --outdated<\/code>\u547d\u4ee4\u68c0\u67e5\u5f53\u524d\u5b89\u88c5\u7684SDK\u7248\u672c\u4e0e\u6700\u65b0\u7248\u672c\u7684\u5dee\u5f02\u3002\u82e5\u9700\u66f4\u65b0\uff0c\u53ea\u9700\u8fd0\u884c<code>pip install --upgrade sdk-name<\/code>\u3002\u5728\u66f4\u65b0\u4e4b\u524d\uff0c\u5efa\u8bae\u67e5\u770b\u66f4\u65b0\u65e5\u5fd7\uff0c\u4ee5\u786e\u4fdd\u65b0\u7248\u672c\u4e0d\u4f1a\u5f15\u5165\u4e0d\u517c\u5bb9\u7684\u66f4\u6539\uff0c\u5f71\u54cd\u73b0\u6709\u4ee3\u7801\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u6dfb\u52a0SDK\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528pip\u5b89\u88c5\u3001\u624b\u52a8\u4e0b\u8f7d\u548c\u914d\u7f6e\u3001\u96c6\u6210\u5230\u9879\u76ee\u73af\u5883\u4e2d\u3002\u5176\u4e2d\uff0c\u4f7f\u7528pip\u5b89\u88c5\u662f [&hellip;]","protected":false},"author":3,"featured_media":928830,"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\/928828"}],"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=928828"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/928828\/revisions"}],"predecessor-version":[{"id":928833,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/928828\/revisions\/928833"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/928830"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=928828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=928828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=928828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}