{"id":1106297,"date":"2025-01-08T16:38:55","date_gmt":"2025-01-08T08:38:55","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1106297.html"},"modified":"2025-01-08T16:38:58","modified_gmt":"2025-01-08T08:38:58","slug":"python%e5%a6%82%e4%bd%95%e5%85%b3%e9%97%ad%e8%87%aa%e5%b8%a6%e5%87%bd%e6%95%b0%e7%9a%84%e6%89%93%e5%8d%b0%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1106297.html","title":{"rendered":"python\u5982\u4f55\u5173\u95ed\u81ea\u5e26\u51fd\u6570\u7684\u6253\u5370\u4fe1\u606f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25070825\/ed2eb0bf-4413-4add-b4ec-71a9a35c76f9.webp\" alt=\"python\u5982\u4f55\u5173\u95ed\u81ea\u5e26\u51fd\u6570\u7684\u6253\u5370\u4fe1\u606f\" \/><\/p>\n<p><h3>PYTHON\u5982\u4f55\u5173\u95ed\u81ea\u5e26\u51fd\u6570\u7684\u6253\u5370\u4fe1\u606f<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6709\u65f6\u6211\u4eec\u5e0c\u671b\u5173\u95ed\u67d0\u4e9b\u81ea\u5e26\u51fd\u6570\u6216\u5e93\u7684\u6253\u5370\u4fe1\u606f\u4ee5\u4fdd\u6301\u63a7\u5236\u53f0\u7684\u6e05\u6d01\u3002<strong>\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa\u3001\u4f7f\u7528\u65e5\u5fd7\u5e93\u3001\u8bbe\u7f6e\u5e93\u7279\u5b9a\u7684\u65e5\u5fd7\u7ea7\u522b\u3001\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/strong>\u7b49\u65b9\u6cd5\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e00\u76ee\u7684\u3002\u4e0b\u9762\u8be6\u7ec6\u63cf\u8ff0\u4e00\u79cd\u5e38\u7528\u65b9\u6cd5\uff1a<strong>\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u5f53\u6211\u4eec\u6267\u884cPython\u4ee3\u7801\u65f6\uff0c\u6240\u6709\u7684\u8f93\u51fa\u4fe1\u606f\u9ed8\u8ba4\u4f1a\u6253\u5370\u5230\u63a7\u5236\u53f0\u3002\u901a\u8fc7\u5c06\u6807\u51c6\u8f93\u51fa\u91cd\u5b9a\u5411\u5230\u4e00\u4e2a\u4e34\u65f6\u7684\u5bf9\u8c61\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u6291\u5236\u4e0d\u5fc5\u8981\u7684\u6253\u5370\u4fe1\u606f\u3002\u8fd9\u4e2a\u65b9\u6cd5\u975e\u5e38\u9002\u5408\u5904\u7406\u90a3\u4e9b\u4e0d\u80fd\u901a\u8fc7\u914d\u7f6e\u6216\u53c2\u6570\u76f4\u63a5\u5173\u95ed\u8f93\u51fa\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa<\/h3>\n<\/p>\n<p><h4>1.1 \u4f7f\u7528<code>sys.stdout<\/code><\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539<code>sys.stdout<\/code>\u6765\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>import io<\/p>\n<h2><strong>\u4fdd\u5b58\u539f\u59cb\u7684\u6807\u51c6\u8f93\u51fa<\/strong><\/h2>\n<p>original_stdout = sys.stdout<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32IO\u5bf9\u8c61<\/strong><\/h2>\n<p>temp_stdout = io.StringIO()<\/p>\n<h2><strong>\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa\u5230\u5b57\u7b26\u4e32IO\u5bf9\u8c61<\/strong><\/h2>\n<p>sys.stdout = temp_stdout<\/p>\n<h2><strong>\u8c03\u7528\u4f1a\u4ea7\u751f\u6253\u5370\u4fe1\u606f\u7684\u51fd\u6570<\/strong><\/h2>\n<p>print(&quot;This will not be printed to console.&quot;)<\/p>\n<h2><strong>\u6062\u590d\u539f\u59cb\u7684\u6807\u51c6\u8f93\u51fa<\/strong><\/h2>\n<p>sys.stdout = original_stdout<\/p>\n<h2><strong>\u6253\u5370\u88ab\u91cd\u5b9a\u5411\u7684\u5185\u5bb9\uff08\u53ef\u9009\uff09<\/strong><\/h2>\n<p>output = temp_stdout.getvalue()<\/p>\n<p>print(f&quot;Captured output: {output}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5728\u6267\u884c\u67d0\u4e9b\u4ee3\u7801\u6bb5\u65f6\u4e34\u65f6\u5173\u95ed\u6253\u5370\u4fe1\u606f\u5e76\u6355\u83b7\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u65e5\u5fd7\u5e93<\/h3>\n<\/p>\n<p><h4>2.1 \u914d\u7f6e\u65e5\u5fd7\u7ea7\u522b<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u4e00\u4e9b\u4f7f\u7528\u65e5\u5fd7\u5e93\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b\u6765\u63a7\u5236\u8f93\u51fa\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import logging<\/p>\n<h2><strong>\u914d\u7f6e\u65e5\u5fd7\u7ea7\u522b\u4e3aWARNING\uff0c\u4f4e\u4e8e\u6b64\u7ea7\u522b\u7684\u4fe1\u606f\u5c06\u4e0d\u4f1a\u6253\u5370<\/strong><\/h2>\n<p>logging.basicConfig(level=logging.WARNING)<\/p>\n<h2><strong>\u4ea7\u751f\u5404\u79cd\u7ea7\u522b\u7684\u65e5\u5fd7\u4fe1\u606f<\/strong><\/h2>\n<p>logging.debug(&quot;This is a debug message.&quot;)<\/p>\n<p>logging.info(&quot;This is an info message.&quot;)<\/p>\n<p>logging.warning(&quot;This is a warning message.&quot;)<\/p>\n<p>logging.error(&quot;This is an error message.&quot;)<\/p>\n<p>logging.critical(&quot;This is a critical message.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u914d\u7f6e\u65e5\u5fd7\u7ea7\u522b\uff0c\u53ef\u4ee5\u7075\u6d3b\u63a7\u5236\u4e0d\u540c\u7ea7\u522b\u7684\u4fe1\u606f\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u8bbe\u7f6e\u5e93\u7279\u5b9a\u7684\u65e5\u5fd7\u7ea7\u522b<\/h3>\n<\/p>\n<p><h4>3.1 \u9488\u5bf9\u7279\u5b9a\u5e93\u8fdb\u884c\u914d\u7f6e<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u67d0\u4e9b\u5e93\uff0c\u5982<code>tensorflow<\/code>\u6216<code>matplotlib<\/code>\uff0c\u53ef\u4ee5\u901a\u8fc7\u5e93\u81ea\u8eab\u63d0\u4f9b\u7684\u914d\u7f6e\u63a5\u53e3\u6765\u5173\u95ed\u6253\u5370\u4fe1\u606f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tensorflow as tf<\/p>\n<p>import os<\/p>\n<h2><strong>\u8bbe\u7f6eTensorFlow\u65e5\u5fd7\u7ea7\u522b\u4e3aERROR<\/strong><\/h2>\n<p>os.environ[&#39;TF_CPP_MIN_LOG_LEVEL&#39;] = &#39;3&#39;<\/p>\n<h2><strong>\u4ea7\u751fTensorFlow\u65e5\u5fd7\u4fe1\u606f<\/strong><\/h2>\n<p>tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u53ea\u5173\u95ed\u7279\u5b9a\u5e93\u7684\u6253\u5370\u4fe1\u606f\uff0c\u800c\u4e0d\u5f71\u54cd\u5176\u4ed6\u90e8\u5206\u7684\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/h3>\n<\/p>\n<p><h4>4.1 \u81ea\u5b9a\u4e49\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u7b80\u5316\u6807\u51c6\u8f93\u51fa\u7684\u91cd\u5b9a\u5411\u64cd\u4f5c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>import io<\/p>\n<p>from contextlib import contextmanager<\/p>\n<p>@contextmanager<\/p>\n<p>def suppress_output():<\/p>\n<p>    # \u4fdd\u5b58\u539f\u59cb\u7684\u6807\u51c6\u8f93\u51fa<\/p>\n<p>    original_stdout = sys.stdout<\/p>\n<p>    temp_stdout = io.StringIO()<\/p>\n<p>    sys.stdout = temp_stdout<\/p>\n<p>    try:<\/p>\n<p>        yield<\/p>\n<p>    finally:<\/p>\n<p>        # \u6062\u590d\u539f\u59cb\u7684\u6807\u51c6\u8f93\u51fa<\/p>\n<p>        sys.stdout = original_stdout<\/p>\n<h2><strong>\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u6291\u5236\u8f93\u51fa<\/strong><\/h2>\n<p>with suppress_output():<\/p>\n<p>    print(&quot;This will not be printed to console.&quot;)<\/p>\n<p>print(&quot;This will be printed to console.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\uff0c\u53ef\u4ee5\u5728\u9700\u8981\u7684\u4ee3\u7801\u6bb5\u4e2d\u7b80\u6d01\u5730\u5173\u95ed\u6253\u5370\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5b9e\u8df5\u793a\u4f8b<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7efc\u5408\u793a\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5\u6765\u5173\u95ed\u6253\u5370\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><h4>5.1 \u7efc\u5408\u793a\u4f8b<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6b63\u5728\u8fdb\u884c\u4e00\u4e2a\u6570\u636e\u5206\u6790\u4efb\u52a1\uff0c\u9700\u8981\u4f7f\u7528<code>pandas<\/code>\u548c<code>numpy<\/code>\u5e93\uff0c\u5e76\u4e14\u6211\u4eec\u5e0c\u671b\u5728\u5904\u7406\u6570\u636e\u65f6\u5173\u95ed\u6240\u6709\u4e0d\u5fc5\u8981\u7684\u6253\u5370\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>import numpy as np<\/p>\n<p>import logging<\/p>\n<p>import sys<\/p>\n<p>import io<\/p>\n<p>from contextlib import contextmanager<\/p>\n<h2><strong>\u914d\u7f6e\u65e5\u5fd7\u7ea7\u522b\u4e3aERROR<\/strong><\/h2>\n<p>logging.basicConfig(level=logging.ERROR)<\/p>\n<p>@contextmanager<\/p>\n<p>def suppress_output():<\/p>\n<p>    original_stdout = sys.stdout<\/p>\n<p>    temp_stdout = io.StringIO()<\/p>\n<p>    sys.stdout = temp_stdout<\/p>\n<p>    try:<\/p>\n<p>        yield<\/p>\n<p>    finally:<\/p>\n<p>        sys.stdout = original_stdout<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(100, 4)<\/p>\n<p>df = pd.DataFrame(data, columns=[&#39;A&#39;, &#39;B&#39;, &#39;C&#39;, &#39;D&#39;])<\/p>\n<h2><strong>\u5173\u95ed\u6253\u5370\u4fe1\u606f<\/strong><\/h2>\n<p>with suppress_output():<\/p>\n<p>    # \u6267\u884c\u6570\u636e\u5206\u6790\u4efb\u52a1<\/p>\n<p>    df.describe()<\/p>\n<h2><strong>\u6062\u590d\u6b63\u5e38\u8f93\u51fa<\/strong><\/h2>\n<p>print(&quot;Data analysis completed.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7<strong>\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa\u3001\u4f7f\u7528\u65e5\u5fd7\u5e93\u3001\u8bbe\u7f6e\u5e93\u7279\u5b9a\u7684\u65e5\u5fd7\u7ea7\u522b\u3001\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/strong>\u7b49\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u5173\u95edPython\u81ea\u5e26\u51fd\u6570\u6216\u5e93\u7684\u6253\u5370\u4fe1\u606f\u3002\u8fd9\u4e9b\u65b9\u6cd5\u4e0d\u4ec5\u9002\u7528\u4e8e\u63a7\u5236\u53f0\u8f93\u51fa\uff0c\u8fd8\u53ef\u4ee5\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u8c03\u8bd5\u6548\u7387\u3002\u5e0c\u671b\u8fd9\u4e9b\u65b9\u6cd5\u5bf9\u60a8\u5728Python\u7f16\u7a0b\u4e2d\u7684\u5b9e\u8df5\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u7981\u7528\u7279\u5b9a\u51fd\u6570\u7684\u8f93\u51fa\uff1f<\/strong><br \/>\u5982\u679c\u4f60\u60f3\u8981\u5728\u6267\u884c\u67d0\u4e2a\u7279\u5b9a\u51fd\u6570\u65f6\u5173\u95ed\u5176\u8f93\u51fa\uff0c\u53ef\u4ee5\u4f7f\u7528<code>contextlib<\/code>\u6a21\u5757\u4e2d\u7684<code>redirect_stdout<\/code>\u3002\u901a\u8fc7\u5c06\u8f93\u51fa\u91cd\u5b9a\u5411\u5230<code>io.StringIO<\/code>\u5bf9\u8c61\uff0c\u4f60\u53ef\u4ee5\u6709\u6548\u5730\u7981\u6b62\u6253\u5370\u4fe1\u606f\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">import io\nimport contextlib\n\nwith io.StringIO() as buf, contextlib.redirect_stdout(buf):\n    # \u8c03\u7528\u4f60\u7684\u51fd\u6570\uff0c\u8fd9\u91cc\u662f\u793a\u4f8b\n    my_function()  # \u5047\u8bbemy_function\u4f1a\u6253\u5370\u4fe1\u606f\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u5728\u51fd\u6570\u8c03\u7528\u671f\u95f4\u4e0d\u4f1a\u6709\u8f93\u51fa\u663e\u793a\u5728\u63a7\u5236\u53f0\u4e0a\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u662f\u5426\u53ef\u4ee5\u5168\u5c40\u7981\u7528\u6253\u5370\u8f93\u51fa\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u53ef\u4ee5\u901a\u8fc7\u8986\u76d6\u5185\u7f6e\u7684<code>print<\/code>\u51fd\u6570\u6765\u5168\u5c40\u7981\u7528\u8f93\u51fa\u3002\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import builtins\n\n# \u5c06print\u51fd\u6570\u66ff\u6362\u4e3a\u4e00\u4e2a\u7a7a\u51fd\u6570\nbuiltins.print = lambda *args, **kwargs: None\n\n# \u4efb\u4f55\u540e\u7eed\u7684print\u8c03\u7528\u90fd\u4e0d\u4f1a\u8f93\u51fa\u4fe1\u606f\nprint(&quot;\u8fd9\u6761\u4fe1\u606f\u4e0d\u4f1a\u88ab\u6253\u5370&quot;)\n<\/code><\/pre>\n<p>\u8bf7\u6ce8\u610f\uff0c\u8fd9\u79cd\u65b9\u6cd5\u4f1a\u5f71\u54cd\u5230\u6574\u4e2a\u7a0b\u5e8f\u4e2d\u7684\u6240\u6709\u6253\u5370\u8f93\u51fa\u3002<\/p>\n<p><strong>\u5982\u4f55\u9009\u62e9\u6027\u5730\u5173\u95ed\u67d0\u4e9b\u51fd\u6570\u7684\u8f93\u51fa\u800c\u4e0d\u5f71\u54cd\u5176\u4ed6\u4ee3\u7801\uff1f<\/strong><br \/>\u5982\u679c\u4f60\u53ea\u60f3\u5173\u95ed\u67d0\u4e9b\u51fd\u6570\u7684\u8f93\u51fa\uff0c\u53ef\u4ee5\u5728\u51fd\u6570\u8c03\u7528\u7684\u4e0a\u4e0b\u6587\u4e2d\u4f7f\u7528\u8f93\u51fa\u91cd\u5b9a\u5411\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u5176\u4ed6\u4ee3\u7801\u4e2d\u7684\u6253\u5370\u8bed\u53e5\u4e0d\u4f1a\u53d7\u5230\u5f71\u54cd\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">def function_with_output():\n    print(&quot;\u8fd9\u662f\u4e00\u4e2a\u51fd\u6570\u7684\u8f93\u51fa&quot;)\n\ndef another_function():\n    print(&quot;\u8fd9\u662f\u53e6\u4e00\u4e2a\u51fd\u6570\u7684\u8f93\u51fa&quot;)\n\nimport io\nimport contextlib\n\nwith io.StringIO() as buf, contextlib.redirect_stdout(buf):\n    function_with_output()  # \u8fd9\u4e2a\u51fd\u6570\u7684\u8f93\u51fa\u4f1a\u88ab\u7981\u6b62\n\nanother_function()  # \u8fd9\u4e2a\u51fd\u6570\u7684\u8f93\u51fa\u4ecd\u7136\u4f1a\u6b63\u5e38\u663e\u793a\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u53ea\u6709\u7279\u5b9a\u51fd\u6570\u7684\u8f93\u51fa\u88ab\u5173\u95ed\uff0c\u800c\u5176\u4ed6\u51fd\u6570\u5219\u53ef\u4ee5\u6b63\u5e38\u6253\u5370\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"PYTHON\u5982\u4f55\u5173\u95ed\u81ea\u5e26\u51fd\u6570\u7684\u6253\u5370\u4fe1\u606f \u5728Python\u4e2d\uff0c\u6709\u65f6\u6211\u4eec\u5e0c\u671b\u5173\u95ed\u67d0\u4e9b\u81ea\u5e26\u51fd\u6570\u6216\u5e93\u7684\u6253\u5370\u4fe1\u606f\u4ee5\u4fdd\u6301\u63a7\u5236 [&hellip;]","protected":false},"author":3,"featured_media":1106303,"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\/1106297"}],"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=1106297"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1106297\/revisions"}],"predecessor-version":[{"id":1106304,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1106297\/revisions\/1106304"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1106303"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1106297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1106297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1106297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}