{"id":1104534,"date":"2025-01-08T16:21:42","date_gmt":"2025-01-08T08:21:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1104534.html"},"modified":"2025-01-08T16:21:47","modified_gmt":"2025-01-08T08:21:47","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e6%b7%bb%e5%8a%a0%e6%95%b0%e6%8d%ae%e5%ba%93%e8%bf%9e%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1104534.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u6dfb\u52a0\u6570\u636e\u5e93\u8fde\u63a5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25065845\/d87f0726-2a06-48fc-8043-9d28c3bb1f75.webp\" alt=\"python\u4e2d\u5982\u4f55\u6dfb\u52a0\u6570\u636e\u5e93\u8fde\u63a5\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u6dfb\u52a0\u6570\u636e\u5e93\u8fde\u63a5\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u9002\u5f53\u7684\u6570\u636e\u5e93\u9a71\u52a8\u3001\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u3001\u4f7f\u7528\u8fde\u63a5\u6c60\u3002<\/strong>\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u4e2d\u6dfb\u52a0\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u5e93\u8fde\u63a5\uff0c\u5e76\u6df1\u5165\u63a2\u8ba8\u8fd9\u4e9b\u65b9\u6cd5\u7684\u7ec6\u8282\u548c\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528\u9002\u5f53\u7684\u6570\u636e\u5e93\u9a71\u52a8<\/p>\n<\/p>\n<p><p>\u8981\u5728Python\u4e2d\u8fde\u63a5\u5230\u6570\u636e\u5e93\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u9002\u5f53\u7684\u6570\u636e\u5e93\u9a71\u52a8\u3002\u4e0d\u540c\u7684\u6570\u636e\u5e93\u6709\u4e0d\u540c\u7684\u9a71\u52a8\u7a0b\u5e8f\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ol>\n<li>SQLite\uff1a\u5185\u7f6e\u5728Python\u6807\u51c6\u5e93\u4e2d\uff0c\u4e0d\u9700\u8981\u5b89\u88c5\u989d\u5916\u7684\u5305\u3002<\/li>\n<li>MySQL\uff1a\u9700\u8981\u5b89\u88c5 <code>mysql-connector-python<\/code> \u6216 <code>PyMySQL<\/code>\u3002<\/li>\n<li>PostgreSQL\uff1a\u9700\u8981\u5b89\u88c5 <code>psycopg2<\/code>\u3002<\/li>\n<li>Oracle\uff1a\u9700\u8981\u5b89\u88c5 <code>cx_Oracle<\/code>\u3002<\/li>\n<li>Microsoft SQL Server\uff1a\u9700\u8981\u5b89\u88c5 <code>pyodbc<\/code> \u6216 <code>pymssql<\/code>\u3002<\/li>\n<\/ol>\n<p><p>\u4f8b\u5982\uff0c\u5bf9\u4e8eMySQL\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 <code>mysql-connector-python<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install mysql-connector-python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5bf9\u4e8ePostgreSQL\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 <code>psycopg2<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install psycopg2<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u4e86\u9002\u5f53\u7684\u6570\u636e\u5e93\u9a71\u52a8\u540e\uff0c\u63a5\u4e0b\u6765\u9700\u8981\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u3002\u8fde\u63a5\u5b57\u7b26\u4e32\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6570\u636e\u5e93\u7c7b\u578b<\/li>\n<li>\u6570\u636e\u5e93\u4e3b\u673a\u5730\u5740<\/li>\n<li>\u6570\u636e\u5e93\u7aef\u53e3<\/li>\n<li>\u6570\u636e\u5e93\u540d\u79f0<\/li>\n<li>\u6570\u636e\u5e93\u7528\u6237\u540d<\/li>\n<li>\u6570\u636e\u5e93\u5bc6\u7801<\/li>\n<\/ol>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u6570\u636e\u5e93\u7684\u8fde\u63a5\u5b57\u7b26\u4e32\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<ol>\n<li>SQLite\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import sqlite3<\/p>\n<p>connection = sqlite3.connect(&#39;example.db&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>MySQL\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import mysql.connector<\/p>\n<p>connection = mysql.connector.connect(<\/p>\n<p>    host=&#39;localhost&#39;,<\/p>\n<p>    user=&#39;yourusername&#39;,<\/p>\n<p>    password=&#39;yourpassword&#39;,<\/p>\n<p>    database=&#39;yourdatabase&#39;<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>PostgreSQL\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import psycopg2<\/p>\n<p>connection = psycopg2.connect(<\/p>\n<p>    host=&#39;localhost&#39;,<\/p>\n<p>    port=&#39;5432&#39;,<\/p>\n<p>    user=&#39;yourusername&#39;,<\/p>\n<p>    password=&#39;yourpassword&#39;,<\/p>\n<p>    database=&#39;yourdatabase&#39;<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528\u8fde\u63a5\u6c60<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9891\u7e41\u5730\u6253\u5f00\u548c\u5173\u95ed\u6570\u636e\u5e93\u8fde\u63a5\u4f1a\u5bf9\u6027\u80fd\u4ea7\u751f\u8d1f\u9762\u5f71\u54cd\u3002\u4e3a\u4e86\u4f18\u5316\u6570\u636e\u5e93\u8fde\u63a5\u7684\u6027\u80fd\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fde\u63a5\u6c60\u3002\u8fde\u63a5\u6c60\u662f\u4e00\u79cd\u7f13\u5b58\u6570\u636e\u5e93\u8fde\u63a5\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u590d\u7528\u5df2\u6709\u7684\u8fde\u63a5\uff0c\u51cf\u5c11\u8fde\u63a5\u5efa\u7acb\u548c\u91ca\u653e\u7684\u5f00\u9500\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u8fde\u63a5\u6c60\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<ol>\n<li>MySQL\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">from mysql.connector import pooling<\/p>\n<p>dbconfig = {<\/p>\n<p>    &quot;database&quot;: &quot;yourdatabase&quot;,<\/p>\n<p>    &quot;user&quot;: &quot;yourusername&quot;,<\/p>\n<p>    &quot;password&quot;: &quot;yourpassword&quot;,<\/p>\n<p>    &quot;host&quot;: &quot;localhost&quot;<\/p>\n<p>}<\/p>\n<p>connection_pool = pooling.MySQLConnectionPool(pool_name=&quot;mypool&quot;,<\/p>\n<p>                                              pool_size=5,<\/p>\n<p>                                              dbconfig)<\/p>\n<p>connection = connection_pool.get_connection()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>PostgreSQL\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import psycopg2<\/p>\n<p>from psycopg2 import pool<\/p>\n<p>connection_pool = pool.SimpleConnectionPool(1, 10,<\/p>\n<p>                                            user=&#39;yourusername&#39;,<\/p>\n<p>                                            password=&#39;yourpassword&#39;,<\/p>\n<p>                                            host=&#39;localhost&#39;,<\/p>\n<p>                                            port=&#39;5432&#39;,<\/p>\n<p>                                            database=&#39;yourdatabase&#39;)<\/p>\n<p>connection = connection_pool.getconn()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u6267\u884c\u6570\u636e\u5e93\u64cd\u4f5c<\/p>\n<\/p>\n<p><p>\u5efa\u7acb\u8fde\u63a5\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fde\u63a5\u5bf9\u8c61\u6765\u6267\u884c\u6570\u636e\u5e93\u64cd\u4f5c\uff0c\u4f8b\u5982\u67e5\u8be2\u3001\u63d2\u5165\u3001\u66f4\u65b0\u548c\u5220\u9664\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u67e5\u8be2\u6570\u636e\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">cursor = connection.cursor()<\/p>\n<p>cursor.execute(&quot;SELECT * FROM yourtable&quot;)<\/p>\n<p>rows = cursor.fetchall()<\/p>\n<p>for row in rows:<\/p>\n<p>    print(row)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u63d2\u5165\u6570\u636e\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">cursor = connection.cursor()<\/p>\n<p>sql = &quot;INSERT INTO yourtable (column1, column2) VALUES (%s, %s)&quot;<\/p>\n<p>val = (&#39;value1&#39;, &#39;value2&#39;)<\/p>\n<p>cursor.execute(sql, val)<\/p>\n<p>connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u66f4\u65b0\u6570\u636e\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">cursor = connection.cursor()<\/p>\n<p>sql = &quot;UPDATE yourtable SET column1 = %s WHERE column2 = %s&quot;<\/p>\n<p>val = (&#39;newvalue&#39;, &#39;value2&#39;)<\/p>\n<p>cursor.execute(sql, val)<\/p>\n<p>connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"4\">\n<li>\u5220\u9664\u6570\u636e\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">cursor = connection.cursor()<\/p>\n<p>sql = &quot;DELETE FROM yourtable WHERE column1 = %s&quot;<\/p>\n<p>val = (&#39;value1&#39;,)<\/p>\n<p>cursor.execute(sql, val)<\/p>\n<p>connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u5173\u95ed\u8fde\u63a5<\/p>\n<\/p>\n<p><p>\u5b8c\u6210\u6570\u636e\u5e93\u64cd\u4f5c\u540e\uff0c\u8bb0\u5f97\u5173\u95ed\u8fde\u63a5\u4ee5\u91ca\u653e\u8d44\u6e90\u3002\u5982\u679c\u4f7f\u7528\u8fde\u63a5\u6c60\uff0c\u5e94\u8be5\u5c06\u8fde\u63a5\u8fd4\u56de\u5230\u8fde\u63a5\u6c60\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u5173\u95ed\u666e\u901a\u8fde\u63a5\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u8fd4\u56de\u8fde\u63a5\u5230\u8fde\u63a5\u6c60\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">connection_pool.putconn(connection)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u5904\u7406\u5f02\u5e38<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6570\u636e\u5e93\u64cd\u4f5c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\u60c5\u51b5\u3002\u4e3a\u4e86\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\uff0c\u5e94\u8be5\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u673a\u5236\u6765\u5904\u7406\u6f5c\u5728\u7684\u9519\u8bef\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    connection = connection_pool.get_connection()<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    cursor.execute(&quot;SELECT * FROM yourtable&quot;)<\/p>\n<p>    rows = cursor.fetchall()<\/p>\n<p>    for row in rows:<\/p>\n<p>        print(row)<\/p>\n<p>except Exception as e:<\/p>\n<p>    print(f&quot;Error: {e}&quot;)<\/p>\n<p>finally:<\/p>\n<p>    if connection:<\/p>\n<p>        connection_pool.putconn(connection)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e03\u3001\u5b89\u5168\u6027\u548c\u6700\u4f73\u5b9e\u8df5<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6570\u636e\u5e93\u8fde\u63a5\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u5b89\u5168\u6027\u548c\u6700\u4f73\u5b9e\u8df5\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u907f\u514d\u5c06\u6570\u636e\u5e93\u51ed\u636e\u786c\u7f16\u7801\u5728\u4ee3\u7801\u4e2d<\/strong>\u3002\u53ef\u4ee5\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u6216\u914d\u7f6e\u6587\u4ef6\u6765\u5b58\u50a8\u6570\u636e\u5e93\u51ed\u636e\u3002<\/li>\n<li><strong>\u4f7f\u7528\u53c2\u6570\u5316\u67e5\u8be2<\/strong>\uff0c\u9632\u6b62SQL\u6ce8\u5165\u653b\u51fb\u3002\u4f8b\u5982\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">cursor.execute(&quot;SELECT * FROM yourtable WHERE column1 = %s&quot;, (value,))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u5b9a\u671f\u5907\u4efd\u6570\u636e\u5e93<\/strong>\uff0c\u9632\u6b62\u6570\u636e\u4e22\u5931\u3002<\/li>\n<li><strong>\u76d1\u63a7\u6570\u636e\u5e93\u6027\u80fd<\/strong>\uff0c\u786e\u4fdd\u6570\u636e\u5e93\u8fd0\u884c\u7a33\u5b9a\uff0c\u53ca\u65f6\u53d1\u73b0\u548c\u5904\u7406\u6027\u80fd\u74f6\u9888\u3002<\/li>\n<\/ol>\n<p><p>\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u6dfb\u52a0\u6570\u636e\u5e93\u8fde\u63a5\u9700\u8981\u9009\u62e9\u9002\u5f53\u7684\u6570\u636e\u5e93\u9a71\u52a8\u3001\u914d\u7f6e\u8fde\u63a5\u5b57\u7b26\u4e32\u3001\u4f7f\u7528\u8fde\u63a5\u6c60\u3001\u6267\u884c\u6570\u636e\u5e93\u64cd\u4f5c\u3001\u5904\u7406\u5f02\u5e38\u5e76\u6ce8\u610f\u5b89\u5168\u6027\u548c\u6700\u4f73\u5b9e\u8df5\u3002\u901a\u8fc7\u5408\u7406\u7684\u8bbe\u8ba1\u548c\u4f18\u5316\uff0c\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u5e93\u8fde\u63a5\u7684\u9ad8\u6548\u6027\u548c\u53ef\u9760\u6027\u3002\u65e0\u8bba\u662f\u5f00\u53d1\u5c0f\u578b\u5e94\u7528\u8fd8\u662f\u5927\u578b\u4f01\u4e1a\u7ea7\u7cfb\u7edf\uff0c\u638c\u63e1\u8fd9\u4e9b\u6280\u672f\u548c\u6280\u5de7\u5c06\u663e\u8457\u63d0\u9ad8\u5e94\u7528\u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u5e93\u5e93\u8fdb\u884c\u8fde\u63a5\uff1f<\/strong><br \/>\u9009\u62e9\u6570\u636e\u5e93\u5e93\u65f6\uff0c\u9996\u5148\u9700\u8981\u8003\u8651\u9879\u76ee\u7684\u9700\u6c42\u548c\u6570\u636e\u5e93\u7684\u7c7b\u578b\u3002\u5bf9\u4e8e\u5173\u7cfb\u578b\u6570\u636e\u5e93\uff0c\u5e38\u7528\u7684\u5e93\u5305\u62ec<code>SQLite<\/code>\u3001<code>MySQL<\/code>\u3001<code>PostgreSQL<\/code>\u7b49\u3002\u975e\u5173\u7cfb\u578b\u6570\u636e\u5e93\u5982<code>MongoDB<\/code>\u3001<code>Redis<\/code>\u7b49\u4e5f\u6709\u5404\u81ea\u7684\u5e93\u3002\u6839\u636e\u6570\u636e\u5e93\u7684\u7279\u6027\u548c\u4f7f\u7528\u573a\u666f\uff0c\u9009\u62e9\u76f8\u5e94\u7684\u5e93\u53ef\u4ee5\u6709\u6548\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u901a\u5e38\u5305\u542b\u6570\u636e\u5e93\u7c7b\u578b\u3001\u7528\u6237\u51ed\u8bc1\u3001\u4e3b\u673a\u5730\u5740\u3001\u7aef\u53e3\u53f7\u548c\u6570\u636e\u5e93\u540d\u79f0\u7b49\u4fe1\u606f\u3002\u4e0d\u540c\u7684\u6570\u636e\u5e93\u5e93\u5bf9\u8fde\u63a5\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\u8981\u6c42\u53ef\u80fd\u4f1a\u6709\u6240\u4e0d\u540c\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8eMySQL\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u683c\u5f0f\uff1a<code>mysql:\/\/username:password@localhost\/dbname<\/code>\u3002\u786e\u4fdd\u5728\u914d\u7f6e\u65f6\u4f7f\u7528\u6b63\u786e\u7684\u683c\u5f0f\u548c\u5fc5\u8981\u7684\u53c2\u6570\uff0c\u4ee5\u4fbf\u987a\u5229\u8fde\u63a5\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406Python\u6570\u636e\u5e93\u8fde\u63a5\u4e2d\u7684\u5f02\u5e38\uff1f<\/strong><br \/>\u5728\u6570\u636e\u5e93\u64cd\u4f5c\u65f6\uff0c\u5f02\u5e38\u5904\u7406\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u8bed\u53e5\u6355\u83b7\u8fde\u63a5\u6216\u67e5\u8be2\u8fc7\u7a0b\u4e2d\u7684\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u8fde\u63a5\u6570\u636e\u5e93\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u7f51\u7edc\u95ee\u9898\u3001\u6743\u9650\u4e0d\u8db3\u7b49\u60c5\u51b5\u3002\u901a\u8fc7\u6355\u83b7\u8fd9\u4e9b\u5f02\u5e38\uff0c\u53ef\u4ee5\u8f93\u51fa\u53cb\u597d\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u6216\u8005\u8fdb\u884c\u91cd\u8bd5\u7b49\u64cd\u4f5c\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u6dfb\u52a0\u6570\u636e\u5e93\u8fde\u63a5\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u9002\u5f53\u7684\u6570\u636e\u5e93\u9a71\u52a8\u3001\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u3001\u4f7f\u7528\u8fde\u63a5\u6c60\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982 [&hellip;]","protected":false},"author":3,"featured_media":1104547,"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\/1104534"}],"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=1104534"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1104534\/revisions"}],"predecessor-version":[{"id":1104552,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1104534\/revisions\/1104552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1104547"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1104534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1104534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1104534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}