{"id":1092995,"date":"2025-01-08T14:26:42","date_gmt":"2025-01-08T06:26:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1092995.html"},"modified":"2025-01-08T14:26:45","modified_gmt":"2025-01-08T06:26:45","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e4%bf%ae%e6%94%b9%e6%95%b0%e6%8d%ae%e5%ba%93-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1092995.html","title":{"rendered":"\u5982\u4f55\u7528python\u4fee\u6539\u6570\u636e\u5e93"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24205753\/63da43a4-239a-431d-a74e-01b3b787c365.webp\" alt=\"\u5982\u4f55\u7528python\u4fee\u6539\u6570\u636e\u5e93\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u4fee\u6539\u6570\u636e\u5e93\u7684\u57fa\u672c\u6b65\u9aa4\u5305\u62ec\u4f7f\u7528\u6570\u636e\u5e93\u8fde\u63a5\u5e93\u4e0e\u6570\u636e\u5e93\u5efa\u7acb\u8fde\u63a5\u3001\u7f16\u5199SQL\u8bed\u53e5\u3001\u6267\u884cSQL\u8bed\u53e5\u3001\u5904\u7406\u7ed3\u679c\u3002\u8fd9\u4e9b\u6b65\u9aa4\u7684\u6838\u5fc3\u5728\u4e8e\uff1a\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u5e93\u5e93\u3001\u8fde\u63a5\u6570\u636e\u5e93\u3001\u7f16\u5199\u5e76\u6267\u884cSQL\u8bed\u53e5\u3001\u5904\u7406\u7ed3\u679c<\/strong>\u3002\u5176\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u5e93\u5e93\u662f\u5173\u952e\uff0c\u56e0\u4e3a\u4e0d\u540c\u6570\u636e\u5e93\u7cfb\u7edf\uff08\u5982MySQL\u3001PostgreSQL\u3001SQLite\u7b49\uff09\u6709\u4e0d\u540c\u7684Python\u5e93\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Python\u4fee\u6539\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u5e93\u5e93<\/h3>\n<\/p>\n<p><p>\u6839\u636e\u4f60\u4f7f\u7528\u7684\u6570\u636e\u5e93\u7cfb\u7edf\u9009\u62e9\u5408\u9002\u7684\u5e93\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>MySQL<\/strong>\uff1a\u4f7f\u7528<code>mysql-connector-python<\/code>\u6216<code>PyMySQL<\/code>\u3002<\/li>\n<li><strong>PostgreSQL<\/strong>\uff1a\u4f7f\u7528<code>psycopg2<\/code>\u3002<\/li>\n<li><strong>SQLite<\/strong>\uff1a\u4f7f\u7528\u5185\u7f6e\u7684<code>sqlite3<\/code>\u3002<\/li>\n<\/ul>\n<p><h3>\u4e8c\u3001\u5b89\u88c5\u6570\u636e\u5e93\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u5b89\u88c5\u4e86\u5bf9\u5e94\u7684\u6570\u636e\u5e93\u5e93\u3002\u53ef\u4ee5\u4f7f\u7528<code>pip<\/code>\u547d\u4ee4\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\">pip install mysql-connector-python<\/p>\n<p>pip install psycopg2<\/p>\n<p>pip install pymysql<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u8fde\u63a5\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p><p>\u4e0b\u9762\u5206\u522b\u5c55\u793a\u5982\u4f55\u8fde\u63a5\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u8fde\u63a5MySQL\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import mysql.connector<\/p>\n<p>connection = mysql.connector.connect(<\/p>\n<p>    host=&quot;localhost&quot;,<\/p>\n<p>    user=&quot;yourusername&quot;,<\/p>\n<p>    password=&quot;yourpassword&quot;,<\/p>\n<p>    database=&quot;yourdatabase&quot;<\/p>\n<p>)<\/p>\n<p>cursor = connection.cursor()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import psycopg2<\/p>\n<p>connection = psycopg2.connect(<\/p>\n<p>    host=&quot;localhost&quot;,<\/p>\n<p>    database=&quot;yourdatabase&quot;,<\/p>\n<p>    user=&quot;yourusername&quot;,<\/p>\n<p>    password=&quot;yourpassword&quot;<\/p>\n<p>)<\/p>\n<p>cursor = connection.cursor()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u8fde\u63a5SQLite\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import sqlite3<\/p>\n<p>connection = sqlite3.connect(&quot;yourdatabase.db&quot;)<\/p>\n<p>cursor = connection.cursor()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u7f16\u5199\u5e76\u6267\u884cSQL\u8bed\u53e5<\/h3>\n<\/p>\n<p><h4>1\u3001\u63d2\u5165\u6570\u636e<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">insert_query = &quot;INSERT INTO yourtable (column1, column2) VALUES (%s, %s)&quot;<\/p>\n<p>values = (&quot;value1&quot;, &quot;value2&quot;)<\/p>\n<p>cursor.execute(insert_query, values)<\/p>\n<p>connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u66f4\u65b0\u6570\u636e<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">update_query = &quot;UPDATE yourtable SET column1 = %s WHERE column2 = %s&quot;<\/p>\n<p>values = (&quot;new_value&quot;, &quot;condition_value&quot;)<\/p>\n<p>cursor.execute(update_query, values)<\/p>\n<p>connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u5220\u9664\u6570\u636e<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">delete_query = &quot;DELETE FROM yourtable WHERE column1 = %s&quot;<\/p>\n<p>values = (&quot;condition_value&quot;,)<\/p>\n<p>cursor.execute(delete_query, values)<\/p>\n<p>connection.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u7ed3\u679c\u5e76\u5173\u95ed\u8fde\u63a5<\/h3>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5904\u7406\u7ed3\u679c\uff08\u5982\u679c\u6709\u9700\u8981\uff09<\/p>\n<h2><strong>cursor.fetchall() for SELECT queries<\/strong><\/h2>\n<h2><strong>\u5173\u95ed\u6e38\u6807\u548c\u8fde\u63a5<\/strong><\/h2>\n<p>cursor.close()<\/p>\n<p>connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5f02\u5e38\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fde\u63a5\u6570\u636e\u5e93\u548c\u6267\u884cSQL\u8bed\u53e5\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\u60c5\u51b5\uff0c\u56e0\u6b64\u5efa\u8bae\u52a0\u5165\u5f02\u5e38\u5904\u7406\u673a\u5236\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    connection = mysql.connector.connect(<\/p>\n<p>        host=&quot;localhost&quot;,<\/p>\n<p>        user=&quot;yourusername&quot;,<\/p>\n<p>        password=&quot;yourpassword&quot;,<\/p>\n<p>        database=&quot;yourdatabase&quot;<\/p>\n<p>    )<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    # \u6267\u884cSQL\u8bed\u53e5<\/p>\n<p>    update_query = &quot;UPDATE yourtable SET column1 = %s WHERE column2 = %s&quot;<\/p>\n<p>    values = (&quot;new_value&quot;, &quot;condition_value&quot;)<\/p>\n<p>    cursor.execute(update_query, values)<\/p>\n<p>    connection.commit()<\/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 cursor:<\/p>\n<p>        cursor.close()<\/p>\n<p>    if connection:<\/p>\n<p>        connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u4e8b\u52a1\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u6570\u636e\u5e93\u64cd\u4f5c\u901a\u5e38\u6d89\u53ca\u4e8b\u52a1\u5904\u7406\uff0c\u5373\u4e00\u7ec4\u6570\u636e\u5e93\u64cd\u4f5c\u8981\u4e48\u5168\u90e8\u6267\u884c\u6210\u529f\uff0c\u8981\u4e48\u5168\u90e8\u5931\u8d25\u56de\u6eda\u3002\u4e8b\u52a1\u5904\u7406\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u5b8c\u6574\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    connection = mysql.connector.connect(<\/p>\n<p>        host=&quot;localhost&quot;,<\/p>\n<p>        user=&quot;yourusername&quot;,<\/p>\n<p>        password=&quot;yourpassword&quot;,<\/p>\n<p>        database=&quot;yourdatabase&quot;<\/p>\n<p>    )<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    # \u5f00\u59cb\u4e8b\u52a1<\/p>\n<p>    connection.start_transaction()<\/p>\n<p>    # \u6267\u884c\u591a\u4e2aSQL\u8bed\u53e5<\/p>\n<p>    update_query = &quot;UPDATE yourtable SET column1 = %s WHERE column2 = %s&quot;<\/p>\n<p>    values = (&quot;new_value&quot;, &quot;condition_value&quot;)<\/p>\n<p>    cursor.execute(update_query, values)<\/p>\n<p>    insert_query = &quot;INSERT INTO yourtable (column1, column2) VALUES (%s, %s)&quot;<\/p>\n<p>    values = (&quot;value1&quot;, &quot;value2&quot;)<\/p>\n<p>    cursor.execute(insert_query, values)<\/p>\n<p>    # \u63d0\u4ea4\u4e8b\u52a1<\/p>\n<p>    connection.commit()<\/p>\n<p>except mysql.connector.Error as err:<\/p>\n<p>    # \u53d1\u751f\u9519\u8bef\u65f6\u56de\u6eda\u4e8b\u52a1<\/p>\n<p>    connection.rollback()<\/p>\n<p>    print(f&quot;Error: {err}&quot;)<\/p>\n<p>finally:<\/p>\n<p>    if cursor:<\/p>\n<p>        cursor.close()<\/p>\n<p>    if connection:<\/p>\n<p>        connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u4f7f\u7528ORM\u6846\u67b6<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u6570\u636e\u5e93\u64cd\u4f5c\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528ORM\uff08\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04\uff09\u6846\u67b6\uff0c\u5982SQLAlchemy\u6216Django ORM\u3002\u8fd9\u4e9b\u6846\u67b6\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u522b\u7684\u62bd\u8c61\uff0c\u4f7f\u5f97\u6570\u636e\u5e93\u64cd\u4f5c\u66f4\u52a0\u7b80\u6d01\u548c\u6613\u4e8e\u7ef4\u62a4\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5SQLAlchemy<\/h4>\n<\/p>\n<p><pre><code class=\"language-sh\">pip install sqlalchemy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528SQLAlchemy\u8fdb\u884c\u6570\u636e\u5e93\u64cd\u4f5c<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">from sqlalchemy import create_engine, Column, Integer, String<\/p>\n<p>from sqlalchemy.ext.declarative import declarative_base<\/p>\n<p>from sqlalchemy.orm import sessionmaker<\/p>\n<p>engine = create_engine(&#39;mysql+mysqlconnector:\/\/yourusername:yourpassword@localhost\/yourdatabase&#39;)<\/p>\n<p>Base = declarative_base()<\/p>\n<p>class YourTable(Base):<\/p>\n<p>    __tablename__ = &#39;yourtable&#39;<\/p>\n<p>    id = Column(Integer, primary_key=True)<\/p>\n<p>    column1 = Column(String)<\/p>\n<p>    column2 = Column(String)<\/p>\n<p>Session = sessionmaker(bind=engine)<\/p>\n<p>session = Session()<\/p>\n<h2><strong>\u63d2\u5165\u6570\u636e<\/strong><\/h2>\n<p>new_record = YourTable(column1=&quot;value1&quot;, column2=&quot;value2&quot;)<\/p>\n<p>session.add(new_record)<\/p>\n<p>session.commit()<\/p>\n<h2><strong>\u66f4\u65b0\u6570\u636e<\/strong><\/h2>\n<p>record = session.query(YourTable).filter_by(column2=&quot;condition_value&quot;).first()<\/p>\n<p>record.column1 = &quot;new_value&quot;<\/p>\n<p>session.commit()<\/p>\n<h2><strong>\u5220\u9664\u6570\u636e<\/strong><\/h2>\n<p>record = session.query(YourTable).filter_by(column1=&quot;condition_value&quot;).first()<\/p>\n<p>session.delete(record)<\/p>\n<p>session.commit()<\/p>\n<p>session.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7Python\u4fee\u6539\u6570\u636e\u5e93\u6d89\u53ca\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u5e93\u5e93\u3001\u8fde\u63a5\u6570\u636e\u5e93\u3001\u7f16\u5199\u5e76\u6267\u884cSQL\u8bed\u53e5\u3001\u5904\u7406\u7ed3\u679c\u7b49\u6b65\u9aa4\u3002\u5bf9\u4e8e\u8f83\u4e3a\u590d\u6742\u7684\u6570\u636e\u5e93\u64cd\u4f5c\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528ORM\u6846\u67b6\u6765\u7b80\u5316\u64cd\u4f5c\u5e76\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u3002\u65e0\u8bba\u662f\u76f4\u63a5\u4f7f\u7528SQL\u8bed\u53e5\u8fd8\u662f\u901a\u8fc7ORM\u6846\u67b6\u8fdb\u884c\u64cd\u4f5c\uff0c\u786e\u4fdd\u6dfb\u52a0\u5f02\u5e38\u5904\u7406\u548c\u4e8b\u52a1\u5904\u7406\u673a\u5236\uff0c\u4ee5\u4fdd\u8bc1\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u5b8c\u6574\u6027\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u80fd\u591f\u5e2e\u52a9\u4f60\u638c\u63e1\u4f7f\u7528Python\u4fee\u6539\u6570\u636e\u5e93\u7684\u57fa\u672c\u65b9\u6cd5\u548c\u6280\u5de7\u3002\u65e0\u8bba\u662f\u7b80\u5355\u7684\u589e\u5220\u6539\u67e5\u64cd\u4f5c\uff0c\u8fd8\u662f\u590d\u6742\u7684\u4e8b\u52a1\u5904\u7406\u548c\u5f02\u5e38\u5904\u7406\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7\u5408\u7406\u7684\u7f16\u7801\u5b9e\u8df5\u548c\u5de5\u5177\u9009\u62e9\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u8fde\u63a5\u6570\u636e\u5e93\u8fdb\u884c\u4fee\u6539\u64cd\u4f5c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5e93\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u4f8b\u5982<code>sqlite3<\/code>\u3001<code>MySQL Connector<\/code>\u3001<code>SQLAlchemy<\/code>\u7b49\u3002\u8fde\u63a5\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6267\u884cSQL\u8bed\u53e5\u6765\u4fee\u6539\u6570\u636e\u3002\u901a\u5e38\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u5bfc\u5165\u5e93\u3001\u5efa\u7acb\u6570\u636e\u5e93\u8fde\u63a5\u3001\u521b\u5efa\u6e38\u6807\u3001\u6267\u884c<code>UPDATE<\/code>\u8bed\u53e5\u3001\u63d0\u4ea4\u66f4\u6539\uff0c\u5e76\u5173\u95ed\u8fde\u63a5\u3002\u786e\u4fdd\u5728\u6267\u884c\u4fee\u6539\u64cd\u4f5c\u524d\u5907\u4efd\u6570\u636e\uff0c\u4ee5\u9632\u6570\u636e\u4e22\u5931\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u4fee\u6539\u6570\u636e\u5e93\u6570\u636e\u65f6\uff0c\u5982\u4f55\u786e\u4fdd\u6570\u636e\u7684\u5b89\u5168\u6027\uff1f<\/strong><br \/>\u5728\u6267\u884c\u6570\u636e\u5e93\u4fee\u6539\u65f6\uff0c\u53ef\u4ee5\u91c7\u53d6\u53c2\u6570\u5316\u67e5\u8be2\uff08prepared statements\uff09\u6765\u9632\u6b62SQL\u6ce8\u5165\u653b\u51fb\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u4e8b\u52a1\u7ba1\u7406\u4e5f\u662f\u4e00\u79cd\u6709\u6548\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u64cd\u4f5c\u7684\u4e00\u81f4\u6027\u3002\u5728\u7a0b\u5e8f\u4e2d\u52a0\u5165\u5f02\u5e38\u5904\u7406\u673a\u5236\uff0c\u80fd\u591f\u5728\u51fa\u73b0\u9519\u8bef\u65f6\u56de\u6eda\u4e8b\u52a1\uff0c\u9632\u6b62\u90e8\u5206\u66f4\u65b0\u9020\u6210\u7684\u6570\u636e\u4e0d\u4e00\u81f4\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u5904\u7406\u6570\u636e\u5e93\u4fee\u6539\u64cd\u4f5c\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u5f53\u4f7f\u7528Python\u6267\u884c\u6570\u636e\u5e93\u4fee\u6539\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u591a\u79cd\u9519\u8bef\uff0c\u4f8b\u5982\u8fde\u63a5\u5931\u8d25\u3001SQL\u8bed\u6cd5\u9519\u8bef\u6216\u6570\u636e\u51b2\u7a81\u7b49\u3002\u53ef\u4ee5\u901a\u8fc7try-except\u8bed\u53e5\u6355\u83b7\u8fd9\u4e9b\u5f02\u5e38\uff0c\u6253\u5370\u9519\u8bef\u4fe1\u606f\u6216\u8bb0\u5f55\u65e5\u5fd7\uff0c\u4ee5\u4fbf\u5206\u6790\u548c\u89e3\u51b3\u95ee\u9898\u3002\u5728\u8bbe\u8ba1\u65f6\uff0c\u5efa\u8bae\u5bf9\u7528\u6237\u8f93\u5165\u8fdb\u884c\u9a8c\u8bc1\uff0c\u4ee5\u51cf\u5c11\u9519\u8bef\u53d1\u751f\u7684\u53ef\u80fd\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u4fee\u6539\u6570\u636e\u5e93\u7684\u57fa\u672c\u6b65\u9aa4\u5305\u62ec\u4f7f\u7528\u6570\u636e\u5e93\u8fde\u63a5\u5e93\u4e0e\u6570\u636e\u5e93\u5efa\u7acb\u8fde\u63a5\u3001\u7f16\u5199SQL\u8bed\u53e5\u3001\u6267\u884cSQL\u8bed\u53e5\u3001\u5904\u7406 [&hellip;]","protected":false},"author":3,"featured_media":1093003,"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\/1092995"}],"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=1092995"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1092995\/revisions"}],"predecessor-version":[{"id":1093004,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1092995\/revisions\/1093004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1093003"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1092995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1092995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1092995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}