{"id":957377,"date":"2024-12-27T02:58:51","date_gmt":"2024-12-26T18:58:51","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/957377.html"},"modified":"2024-12-27T02:58:53","modified_gmt":"2024-12-26T18:58:53","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e6%8f%92%e5%85%a5mysql","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/957377.html","title":{"rendered":"\u5982\u4f55\u7528python\u63d2\u5165mysql"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100714\/1482bd89-8829-4917-b7e5-78c09f9619cd.webp\" alt=\"\u5982\u4f55\u7528python\u63d2\u5165mysql\" \/><\/p>\n<p><p> <strong>\u8981\u7528Python\u63d2\u5165MySQL\uff0c\u53ef\u4ee5\u4f7f\u7528MySQL Connector\u3001PyMySQL\u7b49\u5e93\uff0c\u901a\u8fc7\u521b\u5efa\u8fde\u63a5\u3001\u7f16\u5199SQL\u8bed\u53e5\u3001\u6267\u884cSQL\u8bed\u53e5\u7b49\u6b65\u9aa4\u5b8c\u6210\u63d2\u5165\u64cd\u4f5c\u3002\u5176\u4e2d\uff0cMySQL Connector\u662f\u5b98\u65b9\u63a8\u8350\u7684\u5e93\uff0c\u652f\u6301\u6700\u65b0\u7684MySQL\u7248\u672c\u3001\u63d0\u4f9b\u826f\u597d\u7684\u6027\u80fd\u548c\u529f\u80fd\u3002<\/strong><\/p>\n<\/p>\n<p><p>MySQL Connector\u662f\u4e00\u6b3e\u7531MySQL\u5b98\u65b9\u63d0\u4f9b\u7684Python\u63a5\u53e3\u5e93\uff0c\u4f7f\u7528\u5b83\u53ef\u4ee5\u8f7b\u677e\u5730\u5b8c\u6210\u5bf9MySQL\u6570\u636e\u5e93\u7684\u5404\u79cd\u64cd\u4f5c\uff0c\u5305\u62ec\u63d2\u5165\u6570\u636e\u3002\u63d2\u5165\u6570\u636e\u7684\u57fa\u672c\u6b65\u9aa4\u5305\u62ec\u5bfc\u5165\u5e93\u3001\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5\u3001\u521b\u5efa\u6e38\u6807\u3001\u7f16\u5199\u5e76\u6267\u884c\u63d2\u5165SQL\u8bed\u53e5\u3001\u63d0\u4ea4\u4e8b\u52a1\u53ca\u5173\u95ed\u8fde\u63a5\u7b49\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u8bb2\u89e3\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u5e76\u63d0\u4f9b\u76f8\u5173\u7684\u4ee3\u7801\u793a\u4f8b\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u4e0e\u5bfc\u5165MySQL Connector<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u8fdb\u884cMySQL\u64cd\u4f5c\u4e4b\u524d\uff0c\u786e\u4fdd\u5b89\u88c5\u4e86MySQL Connector\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u6765\u5b89\u88c5\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>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5728Python\u4ee3\u7801\u4e2d\u5bfc\u5165\u8be5\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import mysql.connector<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5bfc\u5165\u5e93\u662f\u8fde\u63a5MySQL\u6570\u636e\u5e93\u7684\u7b2c\u4e00\u6b65<\/strong>\uff0c\u5b83\u4e3a\u540e\u7eed\u64cd\u4f5c\u63d0\u4f9b\u4e86\u5fc5\u8981\u7684\u529f\u80fd\u652f\u6301\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5<\/p>\n<\/p>\n<p><p>\u5728\u6267\u884c\u63d2\u5165\u64cd\u4f5c\u4e4b\u524d\uff0c\u9700\u8981\u5148\u521b\u5efa\u5230MySQL\u6570\u636e\u5e93\u7684\u8fde\u63a5\u3002\u8fde\u63a5\u9700\u8981\u6307\u5b9a\u6570\u636e\u5e93\u7684\u4e3b\u673a\u5730\u5740\u3001\u7528\u6237\u540d\u3001\u5bc6\u7801\u4ee5\u53ca\u8981\u64cd\u4f5c\u7684\u6570\u636e\u5e93\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">db_connection = mysql.connector.connect(<\/p>\n<p>    host=&quot;localhost&quot;,       # \u6570\u636e\u5e93\u4e3b\u673a\u5730\u5740<\/p>\n<p>    user=&quot;yourusername&quot;,    # \u6570\u636e\u5e93\u7528\u6237\u540d<\/p>\n<p>    password=&quot;yourpassword&quot;,# \u6570\u636e\u5e93\u5bc6\u7801<\/p>\n<p>    database=&quot;mydatabase&quot;   # \u6570\u636e\u5e93\u540d\u79f0<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u521b\u5efa\u8fde\u63a5\u5bf9\u8c61\u65f6\u8981\u786e\u4fdd\u63d0\u4f9b\u7684\u53c2\u6570\u6b63\u786e\u65e0\u8bef<\/strong>\uff0c\u5426\u5219\u4f1a\u5bfc\u81f4\u8fde\u63a5\u5931\u8d25\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u521b\u5efa\u6e38\u6807\u5bf9\u8c61<\/p>\n<\/p>\n<p><p>\u8fde\u63a5\u5efa\u7acb\u540e\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u6e38\u6807\u5bf9\u8c61\u6765\u6267\u884cSQL\u8bed\u53e5\u3002\u6e38\u6807\u662f\u6570\u636e\u5e93\u7f16\u7a0b\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u6982\u5ff5\uff0c\u5b83\u53ef\u4ee5\u4ece\u7ed3\u679c\u96c6\u4e2d\u63d0\u53d6\u4e00\u884c\u6216\u591a\u884c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cursor = db_connection.cursor()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u6e38\u6807\u6765\u6267\u884cSQL\u8bed\u53e5\u662f\u7ba1\u7406\u6570\u636e\u5e93\u64cd\u4f5c\u7684\u6807\u51c6\u65b9\u5f0f<\/strong>\uff0c\u5b83\u4e3a\u6570\u636e\u64cd\u4f5c\u63d0\u4f9b\u4e86\u8bb8\u591a\u4fbf\u5229\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u7f16\u5199\u5e76\u6267\u884c\u63d2\u5165SQL\u8bed\u53e5<\/p>\n<\/p>\n<p><p>\u7f16\u5199\u4e00\u4e2aINSERT INTO\u8bed\u53e5\u6765\u63d2\u5165\u6570\u636e\u5230\u6307\u5b9a\u7684\u8868\u4e2d\u3002\u53ef\u4ee5\u901a\u8fc7\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u6216\u5360\u4f4d\u7b26\u7684\u65b9\u5f0f\u4f20\u9012\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">sql = &quot;INSERT INTO customers (name, address) VALUES (%s, %s)&quot;<\/p>\n<p>val = (&quot;John Doe&quot;, &quot;Highway 21&quot;)<\/p>\n<p>cursor.execute(sql, val)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u5360\u4f4d\u7b26\u53ef\u4ee5\u6709\u6548\u9632\u6b62SQL\u6ce8\u5165\u653b\u51fb<\/strong>\uff0c\u786e\u4fdd\u6570\u636e\u7684\u5b89\u5168\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u63d0\u4ea4\u4e8b\u52a1<\/p>\n<\/p>\n<p><p>\u5728\u6267\u884c\u5b8c\u63d2\u5165\u64cd\u4f5c\u540e\uff0c\u9700\u8981\u63d0\u4ea4\u4e8b\u52a1\u4ee5\u786e\u4fdd\u6570\u636e\u88ab\u5199\u5165\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">db_connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u63d0\u4ea4\u4e8b\u52a1\u662f\u6570\u636e\u6301\u4e45\u5316\u7684\u5173\u952e\u6b65\u9aa4<\/strong>\uff0c\u672a\u63d0\u4ea4\u7684\u4e8b\u52a1\u5728\u8fde\u63a5\u5173\u95ed\u540e\u5c06\u88ab\u56de\u6eda\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u5173\u95ed\u8fde\u63a5<\/p>\n<\/p>\n<p><p>\u64cd\u4f5c\u5b8c\u6210\u540e\uff0c\u5173\u95ed\u6e38\u6807\u548c\u6570\u636e\u5e93\u8fde\u63a5\u4ee5\u91ca\u653e\u8d44\u6e90\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cursor.close()<\/p>\n<p>db_connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5173\u95ed\u8fde\u63a5\u548c\u6e38\u6807\u53ef\u4ee5\u9632\u6b62\u8d44\u6e90\u6cc4\u6f0f<\/strong>\uff0c\u662f\u826f\u597d\u7684\u7f16\u7a0b\u4e60\u60ef\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u5904\u7406\u5f02\u5e38<\/p>\n<\/p>\n<p><p>\u5728\u6570\u636e\u5e93\u64cd\u4f5c\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\u60c5\u51b5\u3002\u4f7f\u7528try-except\u5757\u6765\u6355\u83b7\u548c\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    # \u6267\u884c\u6570\u636e\u5e93\u64cd\u4f5c<\/p>\n<p>except mysql.connector.Error as err:<\/p>\n<p>    print(f&quot;Error: {err}&quot;)<\/p>\n<p>finally:<\/p>\n<p>    if db_connection.is_connected():<\/p>\n<p>        cursor.close()<\/p>\n<p>        db_connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5904\u7406\u5f02\u5e38\u662f\u786e\u4fdd\u7a0b\u5e8f\u7a33\u5b9a\u8fd0\u884c\u7684\u91cd\u8981\u63aa\u65bd<\/strong>\uff0c\u53ef\u4ee5\u907f\u514d\u7a0b\u5e8f\u56e0\u672a\u5904\u7406\u7684\u9519\u8bef\u800c\u5d29\u6e83\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u6279\u91cf\u63d2\u5165\u6570\u636e<\/p>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u63d2\u5165\u5927\u91cf\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528executemany()\u65b9\u6cd5\u6765\u63d0\u9ad8\u6548\u7387\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">sql = &quot;INSERT INTO customers (name, address) VALUES (%s, %s)&quot;<\/p>\n<p>vals = [<\/p>\n<p>    (&quot;John Doe&quot;, &quot;Highway 21&quot;),<\/p>\n<p>    (&quot;Jane Smith&quot;, &quot;Lowstreet 4&quot;),<\/p>\n<p>    (&quot;Michael Brown&quot;, &quot;Yellow Garden 2&quot;)<\/p>\n<p>]<\/p>\n<p>cursor.executemany(sql, vals)<\/p>\n<p>db_connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u6279\u91cf\u63d2\u5165\u53ef\u4ee5\u5927\u5e45\u63d0\u9ad8\u63d2\u5165\u6548\u7387<\/strong>\uff0c\u7279\u522b\u662f\u5728\u9700\u8981\u63d2\u5165\u5927\u91cf\u8bb0\u5f55\u65f6\u3002<\/p>\n<\/p>\n<p><p>\u4e5d\u3001\u4f7f\u7528\u4e8b\u52a1\u7ba1\u7406<\/p>\n<\/p>\n<p><p>\u5728\u4e00\u4e9b\u9700\u8981\u786e\u4fdd\u591a\u4e2aSQL\u64cd\u4f5c\u4e00\u81f4\u6027\u7684\u573a\u666f\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e8b\u52a1\u7ba1\u7406\u3002\u5f00\u59cb\u4e8b\u52a1\u540e\uff0c\u6240\u6709\u64cd\u4f5c\u90fd\u88ab\u89c6\u4e3a\u4e00\u4e2a\u539f\u5b50\u64cd\u4f5c\uff0c\u53ea\u6709\u5728\u6240\u6709\u64cd\u4f5c\u6210\u529f\u540e\u624d\u63d0\u4ea4\u4e8b\u52a1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    db_connection.start_transaction()<\/p>\n<p>    cursor.execute(&quot;INSERT INTO orders (order_id, product) VALUES (%s, %s)&quot;, (1, &#39;Laptop&#39;))<\/p>\n<p>    cursor.execute(&quot;INSERT INTO order_items (order_id, item) VALUES (%s, %s)&quot;, (1, &#39;Mouse&#39;))<\/p>\n<p>    db_connection.commit()<\/p>\n<p>except mysql.connector.Error as err:<\/p>\n<p>    db_connection.rollback()<\/p>\n<p>    print(f&quot;Transaction f<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led: {err}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4e8b\u52a1\u7ba1\u7406\u786e\u4fdd\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u5b8c\u6574\u6027<\/strong>\uff0c\u5728\u590d\u6742\u7684\u6570\u636e\u5e93\u64cd\u4f5c\u4e2d\u5c24\u4e3a\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p>\u5341\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u4f7f\u7528Python\u63d2\u5165MySQL\u6570\u636e\u5e93\u662f\u4e00\u4e2a\u76f8\u5bf9\u7b80\u5355\u4f46\u9700\u8981\u4ed4\u7ec6\u5904\u7406\u7684\u8fc7\u7a0b\u3002\u901a\u8fc7MySQL Connector\u5e93\uff0c\u7528\u6237\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fde\u63a5\u5230\u6570\u636e\u5e93\u5e76\u6267\u884c\u5404\u79cd\u6570\u636e\u64cd\u4f5c\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8981\u6ce8\u610f\u4f7f\u7528\u5b89\u5168\u7684\u7f16\u7801\u5b9e\u8df5\uff0c\u5982\u4f7f\u7528\u53c2\u6570\u5316\u67e5\u8be2\u9632\u6b62SQL\u6ce8\u5165\uff0c\u5904\u7406\u5f02\u5e38\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\uff0c\u9002\u65f6\u4f7f\u7528\u4e8b\u52a1\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u5b8c\u6574\u6027\u3002\u901a\u8fc7\u5bf9\u8fd9\u4e9b\u6280\u672f\u7684\u638c\u63e1\uff0c\u53ef\u4ee5\u9ad8\u6548\u800c\u5b89\u5168\u5730\u8fdb\u884c\u6570\u636e\u5e93\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>Python\u5982\u4f55\u8fde\u63a5MySQL\u6570\u636e\u5e93\u4ee5\u8fdb\u884c\u63d2\u5165\u64cd\u4f5c\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u8fde\u63a5MySQL\u6570\u636e\u5e93\uff0c\u60a8\u9700\u8981\u4f7f\u7528\u4e00\u4e2a\u5e93\uff0c\u6bd4\u5982<code>mysql-connector-python<\/code>\u6216<code>PyMySQL<\/code>\u3002\u9996\u5148\uff0c\u5b89\u88c5\u6240\u9700\u7684\u5e93\uff0c\u7136\u540e\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fde\u63a5\u5230\u6570\u636e\u5e93\uff1a<\/p>\n<pre><code class=\"language-python\">import mysql.connector\n\n# \u5efa\u7acb\u8fde\u63a5\nconn = mysql.connector.connect(\n    host=&quot;your_host&quot;,\n    user=&quot;your_username&quot;,\n    password=&quot;your_password&quot;,\n    database=&quot;your_database&quot;\n)\n\ncursor = conn.cursor()\n<\/code><\/pre>\n<p>\u8fde\u63a5\u6210\u529f\u540e\uff0c\u60a8\u5c31\u53ef\u4ee5\u4f7f\u7528cursor\u5bf9\u8c61\u6765\u6267\u884c\u63d2\u5165\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u63d2\u5165\u6570\u636e\u65f6\u5982\u4f55\u5904\u7406SQL\u6ce8\u5165\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u63d2\u5165\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u53c2\u6570\u5316\u67e5\u8be2\u53ef\u4ee5\u6709\u6548\u9632\u6b62SQL\u6ce8\u5165\u653b\u51fb\u3002\u8fd9\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-python\">sql = &quot;INSERT INTO your_table (column1, column2) VALUES (%s, %s)&quot;\nval = (value1, value2)\ncursor.execute(sql, val)\nconn.commit()\n<\/code><\/pre>\n<p>\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\uff0c\u60a8\u5c06\u6570\u636e\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9SQL\u8bed\u53e5\uff0c\u786e\u4fdd\u4ee3\u7801\u7684\u5b89\u5168\u6027\u3002<\/p>\n<p><strong>\u5728\u63d2\u5165\u6570\u636e\u540e\u5982\u4f55\u786e\u8ba4\u64cd\u4f5c\u662f\u5426\u6210\u529f\uff1f<\/strong><br \/>\u5728\u6267\u884c\u63d2\u5165\u64cd\u4f5c\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5<code>cursor.rowcount<\/code>\u5c5e\u6027\u6765\u786e\u8ba4\u662f\u5426\u6210\u529f\u63d2\u5165\u4e86\u6570\u636e\u3002\u6b64\u5c5e\u6027\u5c06\u8fd4\u56de\u53d7\u5f71\u54cd\u7684\u884c\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">if cursor.rowcount &gt; 0:\n    print(&quot;\u6570\u636e\u63d2\u5165\u6210\u529f&quot;)\nelse:\n    print(&quot;\u6570\u636e\u63d2\u5165\u5931\u8d25&quot;)\n<\/code><\/pre>\n<p>\u6b64\u5916\uff0c\u786e\u4fdd\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u5173\u95ed\u8fde\u63a5\uff0c\u4ee5\u91ca\u653e\u8d44\u6e90\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u7528Python\u63d2\u5165MySQL\uff0c\u53ef\u4ee5\u4f7f\u7528MySQL Connector\u3001PyMySQL\u7b49\u5e93\uff0c\u901a\u8fc7\u521b\u5efa\u8fde\u63a5\u3001\u7f16\u5199 [&hellip;]","protected":false},"author":3,"featured_media":957381,"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\/957377"}],"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=957377"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/957377\/revisions"}],"predecessor-version":[{"id":957382,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/957377\/revisions\/957382"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/957381"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=957377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=957377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=957377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}