{"id":1046473,"date":"2024-12-31T13:33:38","date_gmt":"2024-12-31T05:33:38","guid":{"rendered":""},"modified":"2024-12-31T13:33:41","modified_gmt":"2024-12-31T05:33:41","slug":"python%e5%a6%82%e4%bd%95%e7%99%bb%e9%99%86oracle%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1046473.html","title":{"rendered":"python\u5982\u4f55\u767b\u9646oracle\u6570\u636e\u5e93"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/a853647e-a773-4170-8c38-9988368491d1.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u767b\u9646oracle\u6570\u636e\u5e93\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u767b\u5f55Oracle\u6570\u636e\u5e93\uff1a<\/strong><\/p>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u3001\u4f7f\u7528cx_Oracle\u5e93\u3001\u5904\u7406\u5f02\u5e38\u60c5\u51b5\u3001\u4f18\u5316\u6027\u80fd\u3002<\/strong>\u5176\u4e2d\uff0c\u4f7f\u7528cx_Oracle\u5e93\u662f\u6700\u5e38\u7528\u4e14\u5f3a\u5927\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u4e0b\u9762\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u4f7f\u7528cx_Oracle\u5e93\u6765\u8fde\u63a5Oracle\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<hr>\n<p><p><strong>\u4e00\u3001\u914d\u7f6eOracle\u5ba2\u6237\u7aef\u548c\u5b89\u88c5cx_Oracle\u5e93<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4f7f\u7528Python\u8fde\u63a5Oracle\u6570\u636e\u5e93\u4e4b\u524d\uff0c\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86Oracle Instant Client\u548ccx_Oracle\u5e93\u3002Oracle Instant Client\u63d0\u4f9b\u4e86\u8fde\u63a5Oracle\u6570\u636e\u5e93\u6240\u9700\u7684\u57fa\u672c\u7ec4\u4ef6\uff0c\u800ccx_Oracle\u5e93\u662fPython\u4e0eOracle\u6570\u636e\u5e93\u4ea4\u4e92\u7684\u63a5\u53e3\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u5e76\u5b89\u88c5Oracle Instant Client\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u8bbf\u95eeOracle\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.oracle.com\/database\/technologies\/instant-client.html%EF%BC%89%EF%BC%8C%E6%A0%B9%E6%8D%AE%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%AE%89%E8%A3%85%E7%9B%B8%E5%BA%94%E7%9A%84Oracle\">https:\/\/www.oracle.com\/database\/technologies\/instant-client.html\uff09\uff0c\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u4e0b\u8f7d\u5e76\u5b89\u88c5\u76f8\u5e94\u7684Oracle<\/a> Instant Client\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5Oracle Instant Client\u540e\uff0c\u9700\u8981\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u4ee5\u4fbf\u7cfb\u7edf\u80fd\u591f\u627e\u5230Oracle\u5ba2\u6237\u7aef\u5e93\u3002\u4f8b\u5982\uff0c\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u5c06Instant Client\u7684\u76ee\u5f55\u6dfb\u52a0\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5cx_Oracle\u5e93\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5cx_Oracle\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install cx_Oracle<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<hr>\n<p><p><strong>\u4e8c\u3001\u5efa\u7acb\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5bfc\u5165cx_Oracle\u5e93\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u811a\u672c\u4e2d\uff0c\u9996\u5148\u9700\u8981\u5bfc\u5165cx_Oracle\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cx_Oracle<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528cx_Oracle.connect()\u65b9\u6cd5\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u8fde\u63a5\u5bf9\u8c61\u3002\u8fde\u63a5\u5b57\u7b26\u4e32\u901a\u5e38\u5305\u542b\u7528\u6237\u540d\u3001\u5bc6\u7801\u548c\u6570\u636e\u5e93\u670d\u52a1\u540d\u79f0\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">dsn_tns = cx_Oracle.makedsn(&#39;host&#39;, port, service_name=&#39;service_name&#39;)<\/p>\n<p>connection = cx_Oracle.connect(user=&#39;username&#39;, password=&#39;password&#39;, dsn=dsn_tns)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cx_Oracle<\/p>\n<p>try:<\/p>\n<p>    dsn_tns = cx_Oracle.makedsn(&#39;localhost&#39;, 1521, service_name=&#39;orclpdb&#39;)<\/p>\n<p>    connection = cx_Oracle.connect(user=&#39;scott&#39;, password=&#39;tiger&#39;, dsn=dsn_tns)<\/p>\n<p>    print(&quot;Successfully connected to Oracle Database&quot;)<\/p>\n<p>except cx_Oracle.DatabaseError as e:<\/p>\n<p>    print(f&quot;Error occurred while connecting to the database: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<hr>\n<p><p><strong>\u4e09\u3001\u6267\u884cSQL\u67e5\u8be2<\/strong><\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u6e38\u6807\u5bf9\u8c61\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5efa\u7acb\u8fde\u63a5\u540e\uff0c\u521b\u5efa\u4e00\u4e2a\u6e38\u6807\u5bf9\u8c61\uff0c\u7528\u4e8e\u6267\u884cSQL\u67e5\u8be2\u548c\u83b7\u53d6\u7ed3\u679c\u96c6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cursor = connection.cursor()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6267\u884cSQL\u67e5\u8be2\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u6e38\u6807\u5bf9\u8c61\u7684execute()\u65b9\u6cd5\u6267\u884cSQL\u67e5\u8be2\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u67e5\u8be2\u5458\u5de5\u8868\u4e2d\u7684\u6570\u636e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cursor.execute(&quot;SELECT * FROM employees&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u83b7\u53d6\u67e5\u8be2\u7ed3\u679c\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u6e38\u6807\u5bf9\u8c61\u7684fetchall()\u65b9\u6cd5\u83b7\u53d6\u67e5\u8be2\u7ed3\u679c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u904d\u5386\u67e5\u8be2\u7ed3\u679c\u5e76\u6253\u5370\u6bcf\u4e00\u884c\u7684\u6570\u636e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">rows = cursor.fetchall()<\/p>\n<p>for row in rows:<\/p>\n<p>    print(row)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cx_Oracle<\/p>\n<p>try:<\/p>\n<p>    dsn_tns = cx_Oracle.makedsn(&#39;localhost&#39;, 1521, service_name=&#39;orclpdb&#39;)<\/p>\n<p>    connection = cx_Oracle.connect(user=&#39;scott&#39;, password=&#39;tiger&#39;, dsn=dsn_tns)<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    cursor.execute(&quot;SELECT * FROM employees&quot;)<\/p>\n<p>    rows = cursor.fetchall()<\/p>\n<p>    for row in rows:<\/p>\n<p>        print(row)<\/p>\n<p>except cx_Oracle.DatabaseError as e:<\/p>\n<p>    print(f&quot;Error occurred while connecting to the database: {e}&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<\/li>\n<\/ol>\n<hr>\n<p><p><strong>\u56db\u3001\u5904\u7406\u5f02\u5e38\u60c5\u51b5<\/strong><\/p>\n<\/p>\n<p><p>\u6570\u636e\u5e93\u64cd\u4f5c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\u60c5\u51b5\uff0c\u4f8b\u5982\u8fde\u63a5\u5931\u8d25\u3001SQL\u8bed\u6cd5\u9519\u8bef\u7b49\u3002\u4f7f\u7528try-except\u5757\u53ef\u4ee5\u6355\u83b7\u5e76\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cx_Oracle<\/p>\n<p>try:<\/p>\n<p>    dsn_tns = cx_Oracle.makedsn(&#39;localhost&#39;, 1521, service_name=&#39;orclpdb&#39;)<\/p>\n<p>    connection = cx_Oracle.connect(user=&#39;scott&#39;, password=&#39;tiger&#39;, dsn=dsn_tns)<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    cursor.execute(&quot;SELECT * FROM employees&quot;)<\/p>\n<p>    rows = cursor.fetchall()<\/p>\n<p>    for row in rows:<\/p>\n<p>        print(row)<\/p>\n<p>except cx_Oracle.DatabaseError as e:<\/p>\n<p>    print(f&quot;Error occurred while connecting to the database: {e}&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><p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0ctry\u5757\u4e2d\u7684\u4ee3\u7801\u7528\u4e8e\u6267\u884c\u6570\u636e\u5e93\u8fde\u63a5\u548c\u67e5\u8be2\u64cd\u4f5c\uff0cexcept\u5757\u7528\u4e8e\u6355\u83b7\u6570\u636e\u5e93\u76f8\u5173\u7684\u5f02\u5e38\uff0c\u5e76\u5728finally\u5757\u4e2d\u786e\u4fdd\u6e38\u6807\u548c\u8fde\u63a5\u5bf9\u8c61\u88ab\u6b63\u786e\u5173\u95ed\u3002<\/p>\n<\/p>\n<hr>\n<p><p><strong>\u4e94\u3001\u4f18\u5316\u6027\u80fd<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u91cf\u6570\u636e\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u4f18\u5316\u6027\u80fd\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528fetchmany()\u65b9\u6cd5\uff1a<\/strong><\/p>\n<\/p>\n<p><p>fetchall()\u65b9\u6cd5\u4f1a\u5c06\u6240\u6709\u7ed3\u679c\u96c6\u4e00\u6b21\u6027\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u4e0d\u8db3\u3002\u4f7f\u7528fetchmany()\u65b9\u6cd5\u53ef\u4ee5\u4e00\u6b21\u83b7\u53d6\u6307\u5b9a\u6570\u91cf\u7684\u884c\uff0c\u4ece\u800c\u964d\u4f4e\u5185\u5b58\u6d88\u8017\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">rows = cursor.fetchmany(numRows=100)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u7ed1\u5b9a\u53d8\u91cf\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u6267\u884c\u91cd\u590d\u67e5\u8be2\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u7ed1\u5b9a\u53d8\u91cf\u6765\u63d0\u9ad8\u67e5\u8be2\u6027\u80fd\u3002\u7ed1\u5b9a\u53d8\u91cf\u53ef\u4ee5\u51cf\u5c11SQL\u89e3\u6790\u7684\u5f00\u9500\uff0c\u5e76\u63d0\u9ad8\u67e5\u8be2\u6267\u884c\u7684\u6548\u7387\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cursor.execute(&quot;SELECT * FROM employees WHERE department_id = :dept_id&quot;, dept_id=10)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cx_Oracle<\/p>\n<p>try:<\/p>\n<p>    dsn_tns = cx_Oracle.makedsn(&#39;localhost&#39;, 1521, service_name=&#39;orclpdb&#39;)<\/p>\n<p>    connection = cx_Oracle.connect(user=&#39;scott&#39;, password=&#39;tiger&#39;, dsn=dsn_tns)<\/p>\n<p>    cursor = connection.cursor()<\/p>\n<p>    cursor.execute(&quot;SELECT * FROM employees WHERE department_id = :dept_id&quot;, dept_id=10)<\/p>\n<p>    rows = cursor.fetchmany(numRows=100)<\/p>\n<p>    for row in rows:<\/p>\n<p>        print(row)<\/p>\n<p>except cx_Oracle.DatabaseError as e:<\/p>\n<p>    print(f&quot;Error occurred while connecting to the database: {e}&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><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Python\u6210\u529f\u8fde\u63a5\u5230Oracle\u6570\u636e\u5e93\uff0c\u5e76\u6267\u884c\u5404\u79cd\u6570\u636e\u5e93\u64cd\u4f5c\u3002\u786e\u4fdd\u5728\u6bcf\u6b21\u64cd\u4f5c\u540e\u6b63\u786e\u5173\u95ed\u6e38\u6807\u548c\u8fde\u63a5\uff0c\u4ee5\u91ca\u653e\u6570\u636e\u5e93\u8d44\u6e90\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8fde\u63a5Oracle\u6570\u636e\u5e93\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u8fde\u63a5Oracle\u6570\u636e\u5e93\uff0c\u60a8\u9700\u8981\u4f7f\u7528cx_Oracle\u5e93\u3002\u9996\u5148\uff0c\u786e\u4fdd\u5df2\u5b89\u88c5\u8be5\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u5b89\u88c5\uff1a<code>pip install cx_Oracle<\/code>\u3002\u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u793a\u4f8b\u8fdb\u884c\u8fde\u63a5\uff1a  <\/p>\n<pre><code class=\"language-python\">import cx_Oracle\n\n# \u8bbe\u7f6e\u8fde\u63a5\u53c2\u6570\nusername = &#39;your_username&#39;\npassword = &#39;your_password&#39;\ndsn = &#39;your_dsn&#39;  # \u6570\u636e\u5e93\u670d\u52a1\u540d\u6216TNS\u540d\u79f0\n\n# \u521b\u5efa\u8fde\u63a5\nconnection = cx_Oracle.connect(username, password, dsn)\n\n# \u6267\u884c\u67e5\u8be2\ncursor = connection.cursor()\ncursor.execute(&#39;SELECT * FROM your_table&#39;)\n\nfor row in cursor:\n    print(row)\n\n# \u5173\u95ed\u8fde\u63a5\ncursor.close()\nconnection.close()\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528Python\u8fde\u63a5Oracle\u6570\u636e\u5e93\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u8fde\u63a5Oracle\u6570\u636e\u5e93\u65f6\uff0c\u786e\u4fddOracle\u5ba2\u6237\u7aef\u5df2\u6b63\u786e\u5b89\u88c5\uff0c\u5e76\u4e14\u4e0ePython\u7248\u672c\u517c\u5bb9\u3002\u786e\u4fdd\u4f7f\u7528\u7684\u7528\u6237\u540d\u3001\u5bc6\u7801\u548c\u6570\u636e\u6e90\u540d\u79f0\uff08DSN\uff09\u90fd\u662f\u6b63\u786e\u7684\u3002\u6b64\u5916\uff0c\u5904\u7406\u6570\u636e\u5e93\u8fde\u63a5\u65f6\u8981\u9075\u5faa\u6700\u4f73\u5b9e\u8df5\uff0c\u4f8b\u5982\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u81ea\u52a8\u7ba1\u7406\u8fde\u63a5\u7684\u6253\u5f00\u548c\u5173\u95ed\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406Python\u8fde\u63a5Oracle\u6570\u636e\u5e93\u65f6\u7684\u5f02\u5e38\uff1f<\/strong><br \/>\u5728\u8fde\u63a5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\uff0c\u4f8b\u5982\u8fde\u63a5\u5931\u8d25\u3001\u8ba4\u8bc1\u5931\u8d25\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528try-except\u8bed\u53e5\u6765\u6355\u83b7\u8fd9\u4e9b\u5f02\u5e38\u3002\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">try:\n    connection = cx_Oracle.connect(username, password, dsn)\nexcept cx_Oracle.DatabaseError as e:\n    error, = e.args\n    print(f&quot;Oracle Database error: {error.message}&quot;)\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u66f4\u52a0\u4f18\u96c5\u5730\u5904\u7406\u9519\u8bef\u5e76\u7ed9\u51fa\u53cb\u597d\u7684\u63d0\u793a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u767b\u5f55Oracle\u6570\u636e\u5e93\uff1a \u901a\u8fc7\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u3001\u4f7f\u7528cx_Oracle\u5e93\u3001\u5904\u7406\u5f02\u5e38\u60c5\u51b5\u3001\u4f18\u5316\u6027\u80fd [&hellip;]","protected":false},"author":3,"featured_media":1046485,"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\/1046473"}],"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=1046473"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1046473\/revisions"}],"predecessor-version":[{"id":1046489,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1046473\/revisions\/1046489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1046485"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1046473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1046473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1046473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}