{"id":1114018,"date":"2025-01-08T17:53:18","date_gmt":"2025-01-08T09:53:18","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1114018.html"},"modified":"2025-01-08T17:53:20","modified_gmt":"2025-01-08T09:53:20","slug":"python%e5%a6%82%e4%bd%95%e8%bf%9b%e5%88%b0%e6%8c%87%e5%ae%9a%e6%95%b0%e6%8d%ae%e5%ba%93-3","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1114018.html","title":{"rendered":"python\u5982\u4f55\u8fdb\u5230\u6307\u5b9a\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\/25075348\/345fa050-abac-4e47-a405-a24d67770a20.webp\" alt=\"python\u5982\u4f55\u8fdb\u5230\u6307\u5b9a\u6570\u636e\u5e93\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u8fde\u63a5\u5e76\u8bbf\u95ee\u6307\u5b9a\u6570\u636e\u5e93<\/strong><br \/><strong>\u4f7f\u7528Python\u8fde\u63a5\u5e76\u8bbf\u95ee\u6307\u5b9a\u6570\u636e\u5e93<\/strong>\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u4e3b\u8981\u53d6\u51b3\u4e8e\u4f60\u4f7f\u7528\u7684\u6570\u636e\u5e93\u7c7b\u578b\u3002\u5e38\u89c1\u7684\u6570\u636e\u5e93\u5305\u62ecMySQL\u3001PostgreSQL\u3001SQLite\u3001MongoDB\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u4e3b\u8981\u65b9\u6cd5\uff1a<strong>\u4f7f\u7528\u9002\u5f53\u7684\u5e93\uff08\u5982<code>mysql-connector-python<\/code>\u3001<code>psycopg2<\/code>\u3001<code>sqlite3<\/code>\u7b49\uff09\u8fde\u63a5\u6570\u636e\u5e93\u3001\u63d0\u4f9b\u6b63\u786e\u7684\u8fde\u63a5\u53c2\u6570\u3001\u5229\u7528SQL\u8bed\u53e5\u6216ORM\uff08\u5982SQLAlchemy\uff09\u8fdb\u884c\u64cd\u4f5c<\/strong>\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u8bbf\u95ee\u6307\u5b9a\u6570\u636e\u5e93\u7684\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u9002\u5f53\u7684\u5e93\u8fde\u63a5\u6570\u636e\u5e93\u662f\u9996\u5148\u8981\u505a\u7684<\/strong>\u3002\u6bcf\u79cd\u6570\u636e\u5e93\u90fd\u6709\u5176\u7279\u5b9a\u7684Python\u5e93\uff0c\u4f8b\u5982MySQL\u4f7f\u7528<code>mysql-connector-python<\/code>\uff0cPostgreSQL\u4f7f\u7528<code>psycopg2<\/code>\uff0cSQLite\u5219\u4f7f\u7528\u5185\u7f6e\u7684<code>sqlite3<\/code>\u5e93\u3002\u9009\u62e9\u5e76\u5b89\u88c5\u9002\u5408\u4f60\u7684\u6570\u636e\u5e93\u7684\u5e93\u662f\u8bbf\u95ee\u6570\u636e\u5e93\u7684\u7b2c\u4e00\u6b65\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528MySQL\u8fde\u63a5\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p><h4>1. \u5b89\u88c5\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\u9700\u8981\u5b89\u88c5<code>mysql-connector-python<\/code>\u5e93\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\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><h4>2. \u521b\u5efa\u8fde\u63a5<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fde\u63a5\u5230\u6307\u5b9a\u7684MySQL\u6570\u636e\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import mysql.connector<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/h2>\n<p>cnx = mysql.connector.connect(<\/p>\n<p>    user=&#39;yourusername&#39;, <\/p>\n<p>    password=&#39;yourpassword&#39;,<\/p>\n<p>    host=&#39;yourhost&#39;,<\/p>\n<p>    database=&#39;yourdatabase&#39;<\/p>\n<p>)<\/p>\n<h2><strong>\u521b\u5efa\u6e38\u6807\u5bf9\u8c61<\/strong><\/h2>\n<p>cursor = cnx.cursor()<\/p>\n<h2><strong>\u6267\u884c\u67e5\u8be2<\/strong><\/h2>\n<p>cursor.execute(&quot;SELECT * FROM yourtable&quot;)<\/p>\n<h2><strong>\u83b7\u53d6\u67e5\u8be2\u7ed3\u679c<\/strong><\/h2>\n<p>rows = cursor.fetchall()<\/p>\n<p>for row in rows:<\/p>\n<p>    print(row)<\/p>\n<h2><strong>\u5173\u95ed\u6e38\u6807\u548c\u8fde\u63a5<\/strong><\/h2>\n<p>cursor.close()<\/p>\n<p>cnx.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u4f7f\u7528\u8fde\u63a5\u53c2\u6570<\/h4>\n<\/p>\n<p><p>\u5728\u8fde\u63a5\u65f6\uff0c\u9700\u8981\u63d0\u4f9b\u6b63\u786e\u7684\u8fde\u63a5\u53c2\u6570\uff1a<code>user<\/code>\uff08\u7528\u6237\u540d\uff09\u3001<code>password<\/code>\uff08\u5bc6\u7801\uff09\u3001<code>host<\/code>\uff08\u4e3b\u673a\u5730\u5740\uff09\u548c<code>database<\/code>\uff08\u6570\u636e\u5e93\u540d\u79f0\uff09\u3002\u786e\u4fdd\u8fd9\u4e9b\u53c2\u6570\u6b63\u786e\u65e0\u8bef\u624d\u80fd\u6210\u529f\u8fde\u63a5\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528PostgreSQL\u8fde\u63a5\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p><h4>1. \u5b89\u88c5\u5e93<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8ePostgreSQL\uff0c\u53ef\u4ee5\u4f7f\u7528<code>psycopg2<\/code>\u5e93\u3002\u9996\u5148\uff0c\u5b89\u88c5\u8be5\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install psycopg2<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u521b\u5efa\u8fde\u63a5<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fde\u63a5\u5230PostgreSQL\u6570\u636e\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import psycopg2<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/h2>\n<p>conn = psycopg2.connect(<\/p>\n<p>    dbname=&#39;yourdatabase&#39;, <\/p>\n<p>    user=&#39;yourusername&#39;, <\/p>\n<p>    password=&#39;yourpassword&#39;, <\/p>\n<p>    host=&#39;yourhost&#39;<\/p>\n<p>)<\/p>\n<h2><strong>\u521b\u5efa\u6e38\u6807\u5bf9\u8c61<\/strong><\/h2>\n<p>cur = conn.cursor()<\/p>\n<h2><strong>\u6267\u884c\u67e5\u8be2<\/strong><\/h2>\n<p>cur.execute(&quot;SELECT * FROM yourtable&quot;)<\/p>\n<h2><strong>\u83b7\u53d6\u67e5\u8be2\u7ed3\u679c<\/strong><\/h2>\n<p>rows = cur.fetchall()<\/p>\n<p>for row in rows:<\/p>\n<p>    print(row)<\/p>\n<h2><strong>\u5173\u95ed\u6e38\u6807\u548c\u8fde\u63a5<\/strong><\/h2>\n<p>cur.close()<\/p>\n<p>conn.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u63d0\u4f9b\u6b63\u786e\u7684\u8fde\u63a5\u53c2\u6570<\/h4>\n<\/p>\n<p><p>\u4e0eMySQL\u7c7b\u4f3c\uff0c\u9700\u8981\u63d0\u4f9b<code>dbname<\/code>\uff08\u6570\u636e\u5e93\u540d\u79f0\uff09\u3001<code>user<\/code>\uff08\u7528\u6237\u540d\uff09\u3001<code>password<\/code>\uff08\u5bc6\u7801\uff09\u548c<code>host<\/code>\uff08\u4e3b\u673a\u5730\u5740\uff09\u7b49\u8fde\u63a5\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528SQLite\u8fde\u63a5\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p><h4>1. \u4f7f\u7528\u5185\u7f6e\u5e93<\/h4>\n<\/p>\n<p><p>SQLite\u662f\u4e00\u4e2a\u5185\u7f6e\u5e93\uff0c\u65e0\u9700\u989d\u5916\u5b89\u88c5\u3002\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sqlite3<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/h2>\n<p>conn = sqlite3.connect(&#39;yourdatabase.db&#39;)<\/p>\n<h2><strong>\u521b\u5efa\u6e38\u6807\u5bf9\u8c61<\/strong><\/h2>\n<p>cur = conn.cursor()<\/p>\n<h2><strong>\u6267\u884c\u67e5\u8be2<\/strong><\/h2>\n<p>cur.execute(&quot;SELECT * FROM yourtable&quot;)<\/p>\n<h2><strong>\u83b7\u53d6\u67e5\u8be2\u7ed3\u679c<\/strong><\/h2>\n<p>rows = cur.fetchall()<\/p>\n<p>for row in rows:<\/p>\n<p>    print(row)<\/p>\n<h2><strong>\u5173\u95ed\u6e38\u6807\u548c\u8fde\u63a5<\/strong><\/h2>\n<p>cur.close()<\/p>\n<p>conn.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u63d0\u4f9b\u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u8fde\u63a5SQLite\u6570\u636e\u5e93\u65f6\uff0c\u53ea\u9700\u63d0\u4f9b\u6570\u636e\u5e93\u6587\u4ef6\u7684\u8def\u5f84\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528MongoDB\u8fde\u63a5\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p><h4>1. \u5b89\u88c5\u5e93<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8eMongoDB\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pymongo<\/code>\u5e93\u3002\u9996\u5148\uff0c\u5b89\u88c5\u8be5\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pymongo<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u521b\u5efa\u8fde\u63a5<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fde\u63a5\u5230MongoDB\u6570\u636e\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pymongo import MongoClient<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/h2>\n<p>client = MongoClient(&#39;yourhost&#39;, yourport)<\/p>\n<h2><strong>\u9009\u62e9\u6570\u636e\u5e93<\/strong><\/h2>\n<p>db = client[&#39;yourdatabase&#39;]<\/p>\n<h2><strong>\u9009\u62e9\u96c6\u5408<\/strong><\/h2>\n<p>collection = db[&#39;yourcollection&#39;]<\/p>\n<h2><strong>\u6267\u884c\u67e5\u8be2<\/strong><\/h2>\n<p>documents = collection.find()<\/p>\n<p>for document in documents:<\/p>\n<p>    print(document)<\/p>\n<h2><strong>\u5173\u95ed\u8fde\u63a5<\/strong><\/h2>\n<p>client.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u63d0\u4f9b\u8fde\u63a5\u53c2\u6570<\/h4>\n<\/p>\n<p><p>\u8fde\u63a5MongoDB\u65f6\uff0c\u9700\u8981\u63d0\u4f9b<code>host<\/code>\uff08\u4e3b\u673a\u5730\u5740\uff09\u548c<code>port<\/code>\uff08\u7aef\u53e3\u53f7\uff09\uff0c\u5e76\u9009\u62e9\u76f8\u5e94\u7684\u6570\u636e\u5e93\u548c\u96c6\u5408\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528SQLAlchemy\u8fdb\u884c\u64cd\u4f5c<\/h3>\n<\/p>\n<p><h4>1. \u5b89\u88c5\u5e93<\/h4>\n<\/p>\n<p><p>SQLAlchemy\u662f\u4e00\u4e2a\u5f3a\u5927\u7684ORM\u5e93\uff0c\u53ef\u4ee5\u7528\u4e8e\u591a\u79cd\u6570\u636e\u5e93\u3002\u9996\u5148\uff0c\u5b89\u88c5\u8be5\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install sqlalchemy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u521b\u5efa\u8fde\u63a5<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u521b\u5efa\u8fde\u63a5\u5e76\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sqlalchemy import create_engine<\/p>\n<p>from sqlalchemy.orm import sessionmaker<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e\u5e93\u5f15\u64ce<\/strong><\/h2>\n<p>engine = create_engine(&#39;mysql+mysqlconnector:\/\/yourusername:yourpassword@yourhost\/yourdatabase&#39;)<\/p>\n<h2><strong>\u521b\u5efa\u4f1a\u8bdd<\/strong><\/h2>\n<p>Session = sessionmaker(bind=engine)<\/p>\n<p>session = Session()<\/p>\n<h2><strong>\u6267\u884c\u67e5\u8be2<\/strong><\/h2>\n<p>result = session.execute(&quot;SELECT * FROM yourtable&quot;)<\/p>\n<p>for row in result:<\/p>\n<p>    print(row)<\/p>\n<h2><strong>\u5173\u95ed\u4f1a\u8bdd<\/strong><\/h2>\n<p>session.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u63d0\u4f9b\u6b63\u786e\u7684\u8fde\u63a5URL<\/h4>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u5f15\u64ce\u65f6\uff0c\u63d0\u4f9b\u6b63\u786e\u7684\u8fde\u63a5URL\uff0c\u683c\u5f0f\u4e3a<code>dialect+driver:\/\/username:password@host\/database<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u8fde\u63a5\u5e76\u8bbf\u95ee\u6307\u5b9a\u6570\u636e\u5e93\u3002\u65e0\u8bba\u4f60\u4f7f\u7528\u7684\u662fMySQL\u3001PostgreSQL\u3001SQLite\u8fd8\u662fMongoDB\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5\u76f8\u5e94\u7684\u5e93\u5e76\u63d0\u4f9b\u6b63\u786e\u7684\u8fde\u63a5\u53c2\u6570\u6765\u5b9e\u73b0\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u3002\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5728Python\u4e2d\u8f7b\u677e\u64cd\u4f5c\u5404\u79cd\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u8fde\u63a5\u5230\u7279\u5b9a\u7684\u6570\u636e\u5e93\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0d\u540c\u7684\u5e93\u6765\u8fde\u63a5\u5230\u6570\u636e\u5e93\uff0c\u4f8b\u5982<code>sqlite3<\/code>\u3001<code>mysql-connector<\/code>\u3001<code>psycopg2<\/code>\u7b49\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u76f8\u5e94\u7684\u5e93\uff0c\u4e4b\u540e\u4f7f\u7528\u6570\u636e\u5e93\u7684\u8fde\u63a5\u5b57\u7b26\u4e32\uff0c\u5305\u62ec\u6570\u636e\u5e93\u540d\u79f0\u3001\u7528\u6237\u540d\u548c\u5bc6\u7801\u7b49\u4fe1\u606f\u3002\u8fde\u63a5\u540e\uff0c\u60a8\u53ef\u4ee5\u6267\u884cSQL\u67e5\u8be2\u6765\u8bfb\u53d6\u6216\u4fee\u6539\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u6267\u884cSQL\u67e5\u8be2\uff1f<\/strong><br \/>\u8fde\u63a5\u5230\u6570\u636e\u5e93\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u6e38\u6807\u5bf9\u8c61\u6267\u884cSQL\u67e5\u8be2\u3002\u901a\u8fc7\u8c03\u7528\u6e38\u6807\u7684<code>execute()<\/code>\u65b9\u6cd5\u5e76\u4f20\u5165SQL\u8bed\u53e5\uff0c\u53ef\u4ee5\u8fd0\u884c\u67e5\u8be2\u3002\u5bf9\u4e8e\u8fd4\u56de\u7ed3\u679c\u7684\u67e5\u8be2\uff08\u5982SELECT\uff09\uff0c\u4f7f\u7528<code>fetchall()<\/code>\u6216<code>fetchone()<\/code>\u65b9\u6cd5\u83b7\u53d6\u6570\u636e\u7ed3\u679c\u3002\u786e\u4fdd\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u5173\u95ed\u6e38\u6807\u548c\u8fde\u63a5\uff0c\u4ee5\u91ca\u653e\u8d44\u6e90\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406Python\u4e0e\u6570\u636e\u5e93\u4e4b\u95f4\u7684\u5f02\u5e38\uff1f<\/strong><br \/>\u5728\u6570\u636e\u5e93\u64cd\u4f5c\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\uff0c\u5982\u8fde\u63a5\u5931\u8d25\u6216SQL\u8bed\u6cd5\u9519\u8bef\u3002\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u53ef\u4ee5\u6709\u6548\u6355\u6349\u8fd9\u4e9b\u5f02\u5e38\uff0c\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\u3002\u901a\u8fc7\u6dfb\u52a0\u9002\u5f53\u7684\u9519\u8bef\u5904\u7406\u4ee3\u7801\uff0c\u60a8\u53ef\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\uff0c\u5e76\u80fd\u591f\u8f93\u51fa\u6709\u7528\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u5e2e\u52a9\u8c03\u8bd5\u548c\u4fee\u590d\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u8fde\u63a5\u5e76\u8bbf\u95ee\u6307\u5b9a\u6570\u636e\u5e93\u4f7f\u7528Python\u8fde\u63a5\u5e76\u8bbf\u95ee\u6307\u5b9a\u6570\u636e\u5e93\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u4e3b\u8981\u53d6\u51b3\u4e8e\u4f60\u4f7f\u7528 [&hellip;]","protected":false},"author":3,"featured_media":1114029,"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\/1114018"}],"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=1114018"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1114018\/revisions"}],"predecessor-version":[{"id":1114031,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1114018\/revisions\/1114031"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1114029"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1114018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1114018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1114018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}