{"id":1180534,"date":"2025-01-15T18:38:03","date_gmt":"2025-01-15T10:38:03","guid":{"rendered":""},"modified":"2025-01-15T18:38:06","modified_gmt":"2025-01-15T10:38:06","slug":"python3%e5%a6%82%e4%bd%95%e8%bf%9e%e6%8e%a5pg","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1180534.html","title":{"rendered":"python3\u5982\u4f55\u8fde\u63a5pg"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25125225\/a8e37720-9e3a-42f2-88ac-cfd2f2c2643e.webp\" alt=\"python3\u5982\u4f55\u8fde\u63a5pg\" \/><\/p>\n<p><p> <strong>Python3\u5982\u4f55\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93<\/strong><\/p>\n<\/p>\n<p><p><strong>\u8981\u4f7f\u7528Python3\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528psycopg2\u5e93\u3001SQLAlchemy\u5e93\u3001pg8000\u5e93<\/strong>\u3002\u5176\u4e2d\uff0c<strong>psycopg2\u5e93<\/strong>\u662f\u6700\u5e38\u7528\u7684\u5e93\u4e4b\u4e00\uff0c\u5177\u6709\u5f88\u9ad8\u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u3002<strong>SQLAlchemy\u5e93<\/strong>\u662f\u4e00\u79cdORM\uff08\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04\uff09\u6846\u67b6\uff0c\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u64cd\u4f5c\u6570\u636e\u5e93\u3002<strong>pg8000\u5e93<\/strong>\u662f\u4e00\u4e2a\u7eafPython\u5e93\uff0c\u4e0d\u4f9d\u8d56\u4e8eC\u8bed\u8a00\u7684\u6269\u5c55\uff0c\u56e0\u6b64\u5728\u67d0\u4e9b\u73af\u5883\u4e0b\u5177\u6709\u4f18\u52bf\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528psycopg2\u5e93\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5psycopg2\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528pip\u5b89\u88c5psycopg2\u5e93<\/h4>\n<\/p>\n<p><p>\u5728\u4f7f\u7528psycopg2\u5e93\u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u8be5\u5e93\u3002\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install psycopg2-binary<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>psycopg2-binary\u662fpsycopg2\u7684\u4e8c\u8fdb\u5236\u7248\u672c\uff0c\u5305\u542b\u4e86\u6240\u6709\u5fc5\u8981\u7684\u4f9d\u8d56\u9879\uff0c\u5b89\u88c5\u66f4\u4e3a\u7b80\u4fbf\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u8fde\u63a5\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u597dpsycopg2\u5e93\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import psycopg2<\/p>\n<p>try:<\/p>\n<p>    connection = psycopg2.connect(<\/p>\n<p>        user=&quot;your_username&quot;,<\/p>\n<p>        password=&quot;your_password&quot;,<\/p>\n<p>        host=&quot;your_host&quot;,<\/p>\n<p>        port=&quot;your_port&quot;,<\/p>\n<p>        database=&quot;your_database&quot;<\/p>\n<p>    )<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    print(&quot;PostgreSQL connection is open&quot;)<\/p>\n<p>    # \u6267\u884cSQL\u67e5\u8be2<\/p>\n<p>    cursor.execute(&quot;SELECT version();&quot;)<\/p>\n<p>    record = cursor.fetchone()<\/p>\n<p>    print(&quot;You are connected to - &quot;, record, &quot;\\n&quot;)<\/p>\n<p>except (Exception, psycopg2.Error) as error:<\/p>\n<p>    print(&quot;Error while connecting to PostgreSQL&quot;, error)<\/p>\n<p>finally:<\/p>\n<p>    # \u5173\u95ed\u6570\u636e\u5e93\u8fde\u63a5<\/p>\n<p>    if (connection):<\/p>\n<p>        cursor.close()<\/p>\n<p>        connection.close()<\/p>\n<p>        print(&quot;PostgreSQL connection is closed&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u9700\u8981\u5c06<code>your_username<\/code>\u3001<code>your_password<\/code>\u3001<code>your_host<\/code>\u3001<code>your_port<\/code>\u548c<code>your_database<\/code>\u66ff\u6362\u4e3a\u5b9e\u9645\u7684\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u6267\u884cSQL\u67e5\u8be2<\/h4>\n<\/p>\n<p><p>\u8fde\u63a5\u6210\u529f\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528cursor\u5bf9\u8c61\u6267\u884cSQL\u67e5\u8be2\u3002\u4f8b\u5982\uff0c\u63d2\u5165\u4e00\u6761\u8bb0\u5f55\u5230\u8868\u4e2d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    connection = psycopg2.connect(<\/p>\n<p>        user=&quot;your_username&quot;,<\/p>\n<p>        password=&quot;your_password&quot;,<\/p>\n<p>        host=&quot;your_host&quot;,<\/p>\n<p>        port=&quot;your_port&quot;,<\/p>\n<p>        database=&quot;your_database&quot;<\/p>\n<p>    )<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    # \u63d2\u5165\u6570\u636e<\/p>\n<p>    insert_query = &quot;&quot;&quot; INSERT INTO your_table (id, name) VALUES (%s, %s)&quot;&quot;&quot;<\/p>\n<p>    record_to_insert = (1, &#39;John Doe&#39;)<\/p>\n<p>    cursor.execute(insert_query, record_to_insert)<\/p>\n<p>    connection.commit()<\/p>\n<p>    print(&quot;Record inserted successfully&quot;)<\/p>\n<p>except (Exception, psycopg2.Error) as error:<\/p>\n<p>    print(&quot;F<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led to insert record into table&quot;, error)<\/p>\n<p>finally:<\/p>\n<p>    if (connection):<\/p>\n<p>        cursor.close()<\/p>\n<p>        connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528SQLAlchemy\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5SQLAlchemy\u5e93<\/h4>\n<\/p>\n<p><p>\u540c\u6837\u7684\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5SQLAlchemy\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install sqlalchemy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8fde\u63a5\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528SQLAlchemy\u5e93\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sqlalchemy import create_engine<\/p>\n<p>engine = create_engine(&#39;postgresql:\/\/your_username:your_password@your_host:your_port\/your_database&#39;)<\/p>\n<h2><strong>\u6d4b\u8bd5\u8fde\u63a5<\/strong><\/h2>\n<p>with engine.connect() as connection:<\/p>\n<p>    result = connection.execute(&quot;SELECT version();&quot;)<\/p>\n<p>    for row in result:<\/p>\n<p>        print(row)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528pg8000\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5pg8000\u5e93<\/h4>\n<\/p>\n<p><p>\u4e0epsycopg2\u548cSQLAlchemy\u4e00\u6837\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5pg8000\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install pg8000<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8fde\u63a5\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528pg8000\u5e93\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pg8000<\/p>\n<p>try:<\/p>\n<p>    connection = pg8000.connect(<\/p>\n<p>        user=&quot;your_username&quot;,<\/p>\n<p>        password=&quot;your_password&quot;,<\/p>\n<p>        host=&quot;your_host&quot;,<\/p>\n<p>        port=int(&quot;your_port&quot;),<\/p>\n<p>        database=&quot;your_database&quot;<\/p>\n<p>    )<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    print(&quot;PostgreSQL connection is open&quot;)<\/p>\n<p>    # \u6267\u884cSQL\u67e5\u8be2<\/p>\n<p>    cursor.execute(&quot;SELECT version();&quot;)<\/p>\n<p>    record = cursor.fetchone()<\/p>\n<p>    print(&quot;You are connected to - &quot;, record, &quot;\\n&quot;)<\/p>\n<p>except (Exception, pg8000.Error) as error:<\/p>\n<p>    print(&quot;Error while connecting to PostgreSQL&quot;, error)<\/p>\n<p>finally:<\/p>\n<p>    # \u5173\u95ed\u6570\u636e\u5e93\u8fde\u63a5<\/p>\n<p>    if (connection):<\/p>\n<p>        cursor.close()<\/p>\n<p>        connection.close()<\/p>\n<p>        print(&quot;PostgreSQL connection is closed&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u4ecb\u7ecd\uff0c\u6211\u4eec\u53ef\u4ee5\u4e86\u89e3\u5230<strong>\u4f7f\u7528psycopg2\u5e93\u3001SQLAlchemy\u5e93\u548cpg8000\u5e93<\/strong>\u90fd\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728Python3\u4e2d\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\u3002<strong>psycopg2\u5e93<\/strong>\u9002\u5408\u5927\u90e8\u5206\u573a\u666f\uff0c\u5177\u6709\u9ad8\u6027\u80fd\u548c\u7a33\u5b9a\u6027\uff1b<strong>SQLAlchemy\u5e93<\/strong>\u63d0\u4f9b\u4e86ORM\u529f\u80fd\uff0c\u65b9\u4fbf\u8fdb\u884c\u6570\u636e\u5e93\u64cd\u4f5c\uff1b<strong>pg8000\u5e93<\/strong>\u662f\u4e00\u4e2a\u7eafPython\u5e93\uff0c\u4e0d\u4f9d\u8d56\u4e8eC\u8bed\u8a00\u7684\u6269\u5c55\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5e93\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u9644\u5f55<\/h3>\n<\/p>\n<p><h4>1\u3001\u5e38\u89c1\u95ee\u9898\u548c\u89e3\u51b3\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u95ee\u98981\uff1a\u65e0\u6cd5\u8fde\u63a5\u5230\u6570\u636e\u5e93<\/strong><\/p>\n<\/p>\n<ul>\n<li>\u89e3\u51b3\u65b9\u6cd5\uff1a\u68c0\u67e5\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f\u662f\u5426\u6b63\u786e\uff0c\u5305\u62ec\u7528\u6237\u540d\u3001\u5bc6\u7801\u3001\u4e3b\u673a\u3001\u7aef\u53e3\u548c\u6570\u636e\u5e93\u540d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u95ee\u98982\uff1a\u6743\u9650\u4e0d\u8db3<\/strong><\/p>\n<\/p>\n<ul>\n<li>\u89e3\u51b3\u65b9\u6cd5\uff1a\u786e\u4fdd\u8fde\u63a5\u7684\u7528\u6237\u5177\u6709\u76f8\u5e94\u7684\u6743\u9650\uff0c\u53ef\u4ee5\u6267\u884c\u6240\u9700\u7684\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u95ee\u98983\uff1a\u7f51\u7edc\u95ee\u9898<\/strong><\/p>\n<\/p>\n<ul>\n<li>\u89e3\u51b3\u65b9\u6cd5\uff1a\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u662f\u5426\u6b63\u5e38\uff0c\u786e\u4fdd\u53ef\u4ee5\u8bbf\u95ee\u6570\u636e\u5e93\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><h4>2\u3001\u66f4\u591a\u8d44\u6e90<\/h4>\n<\/p>\n<ul>\n<li><a href=\"https:\/\/www.psycopg.org\/docs\/\">psycopg2\u5b98\u65b9\u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/docs.sqlalchemy.org\/en\/14\/\">SQLAlchemy\u5b98\u65b9\u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/pg8000.readthedocs.io\/en\/latest\/\">pg8000\u5b98\u65b9\u6587\u6863<\/a><\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u76f8\u4fe1\u8bfb\u8005\u5df2\u7ecf\u638c\u63e1\u4e86\u5982\u4f55\u5728Python3\u4e2d\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\uff0c\u5e76\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5e93\u8fdb\u884c\u6570\u636e\u5e93\u64cd\u4f5c\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python3\u4e2d\u5b89\u88c5\u8fde\u63a5PostgreSQL\u6240\u9700\u7684\u5e93\uff1f<\/strong><br \/>\u8981\u5728Python3\u4e2d\u8fde\u63a5PostgreSQL\uff0c\u60a8\u9700\u8981\u5b89\u88c5<code>psycopg2<\/code>\u6216<code>asyncpg<\/code>\u7b49\u5e93\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<pre><code>pip install psycopg2\n<\/code><\/pre>\n<p>\u6216\u8005\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u4f7f\u7528\u5f02\u6b65\u5e93\uff0c\u53ef\u4ee5\u5b89\u88c5\uff1a<\/p>\n<pre><code>pip install asyncpg\n<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u5c31\u53ef\u4ee5\u5728Python\u811a\u672c\u4e2d\u5bfc\u5165\u8fd9\u4e9b\u5e93\u5e76\u5efa\u7acb\u8fde\u63a5\u3002<\/p>\n<p><strong>\u8fde\u63a5PostgreSQL\u65f6\u9700\u8981\u54ea\u4e9b\u57fa\u672c\u4fe1\u606f\uff1f<\/strong><br \/>\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\u65f6\uff0c\u60a8\u9700\u8981\u63d0\u4f9b\u4ee5\u4e0b\u57fa\u672c\u4fe1\u606f\uff1a  <\/p>\n<ol>\n<li>\u6570\u636e\u5e93\u7684\u4e3b\u673a\u540d\u6216IP\u5730\u5740\uff08\u4f8b\u5982\uff1alocalhost\u6216192.168.1.1\uff09<\/li>\n<li>\u6570\u636e\u5e93\u7684\u7aef\u53e3\u53f7\uff08\u9ed8\u8ba4\u662f5432\uff09<\/li>\n<li>\u6570\u636e\u5e93\u540d\u79f0<\/li>\n<li>\u7528\u6237\u540d<\/li>\n<li>\u5bc6\u7801<br \/>\u786e\u4fdd\u8fd9\u4e9b\u4fe1\u606f\u51c6\u786e\u65e0\u8bef\uff0c\u4ee5\u4fbf\u6210\u529f\u8fde\u63a5\u3002<\/li>\n<\/ol>\n<p><strong>\u5982\u4f55\u5904\u7406Python\u4e0ePostgreSQL\u8fde\u63a5\u4e2d\u7684\u5f02\u5e38\uff1f<\/strong><br \/>\u5728\u4e0ePostgreSQL\u5efa\u7acb\u8fde\u63a5\u65f6\uff0c\u5f02\u5e38\u5904\u7406\u81f3\u5173\u91cd\u8981\u3002\u53ef\u4ee5\u4f7f\u7528<code>try<\/code>\u548c<code>except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u548c\u5904\u7406\u53ef\u80fd\u53d1\u751f\u7684\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u6355\u83b7\u8fde\u63a5\u9519\u8bef\u5e76\u8f93\u51fa\u53cb\u597d\u7684\u9519\u8bef\u4fe1\u606f\uff1a<\/p>\n<pre><code class=\"language-python\">import psycopg2\n\ntry:\n    conn = psycopg2.connect(database=&quot;your_db&quot;, user=&quot;your_user&quot;, password=&quot;your_password&quot;, host=&quot;localhost&quot;, port=&quot;5432&quot;)\nexcept psycopg2.Error as e:\n    print(f&quot;\u8fde\u63a5\u6570\u636e\u5e93\u65f6\u51fa\u9519: {e}&quot;)\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u6837\u7684\u5904\u7406\uff0c\u60a8\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u8fde\u63a5\u8fc7\u7a0b\u4e2d\u7684\u95ee\u9898\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python3\u5982\u4f55\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93 \u8981\u4f7f\u7528Python3\u8fde\u63a5PostgreSQL\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528 [&hellip;]","protected":false},"author":3,"featured_media":1180543,"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\/1180534"}],"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=1180534"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1180534\/revisions"}],"predecessor-version":[{"id":1180551,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1180534\/revisions\/1180551"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1180543"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1180534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1180534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1180534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}