{"id":1004881,"date":"2024-12-27T10:30:33","date_gmt":"2024-12-27T02:30:33","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1004881.html"},"modified":"2024-12-27T10:30:38","modified_gmt":"2024-12-27T02:30:38","slug":"python%e5%a6%82%e4%bd%95%e8%be%93%e5%85%a5%e8%a7%92%e5%ba%a6%e5%80%bc","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1004881.html","title":{"rendered":"python\u5982\u4f55\u8f93\u5165\u89d2\u5ea6\u503c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25081638\/5f81f06f-ae9b-4fcf-8aea-2746eafa1b8b.webp\" alt=\"python\u5982\u4f55\u8f93\u5165\u89d2\u5ea6\u503c\" \/><\/p>\n<p><p> <strong>Python\u8f93\u5165\u89d2\u5ea6\u503c\u53ef\u4ee5\u901a\u8fc7\u6807\u51c6\u8f93\u5165\u51fd\u6570\u3001GUI\u5e93\u6216\u8005\u914d\u7f6e\u6587\u4ef6\u7b49\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7\u6807\u51c6\u8f93\u5165\u51fd\u6570input()\u3001GUI\u5e93\u5982Tkinter\u3001\u914d\u7f6e\u6587\u4ef6\u8bfb\u53d6\u7b49\u65b9\u5f0f\u3002<\/strong>\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\uff0c\u5e2e\u52a9\u8bfb\u8005\u5728\u4e0d\u540c\u573a\u666f\u4e0b\u9009\u62e9\u5408\u9002\u7684\u65b9\u5f0f\u8f93\u5165\u89d2\u5ea6\u503c\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528\u6807\u51c6\u8f93\u5165\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6700\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u6cd5\u5c31\u662f\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u6765\u83b7\u53d6\u7528\u6237\u8f93\u5165\u7684\u89d2\u5ea6\u503c\u3002<code>input()<\/code>\u51fd\u6570\u4f1a\u5c06\u7528\u6237\u8f93\u5165\u7684\u5185\u5bb9\u5f53\u4f5c\u5b57\u7b26\u4e32\u8fd4\u56de\uff0c\u56e0\u6b64\u5728\u8fdb\u884c\u89d2\u5ea6\u8ba1\u7b97\u4e4b\u524d\uff0c\u9700\u8981\u5c06\u5176\u8f6c\u6362\u4e3a\u6570\u503c\u7c7b\u578b\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528<code>input()<\/code>\u51fd\u6570<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7<code>input()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u89d2\u5ea6\u503c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">angle = float(input(&quot;\u8bf7\u8f93\u5165\u89d2\u5ea6\u503c\uff1a&quot;))<\/p>\n<p>print(f&quot;\u8f93\u5165\u7684\u89d2\u5ea6\u503c\u4e3a\uff1a{angle}\u5ea6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u7a0b\u5e8f\u63d0\u793a\u7528\u6237\u8f93\u5165\u89d2\u5ea6\u503c\uff0c\u7136\u540e\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\uff0c\u5e76\u8f93\u51fa\u7ed3\u679c\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u7b80\u5355\u7684\u811a\u672c\u7a0b\u5e8f\u6216\u547d\u4ee4\u884c\u5e94\u7528\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u9a8c\u8bc1\u8f93\u5165\u5408\u6cd5\u6027<\/li>\n<\/ol>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u8f93\u5165\u975e\u6cd5\u7684\u5b57\u7b26\u6216\u4e0d\u7b26\u5408\u8981\u6c42\u7684\u6570\u503c\uff0c\u56e0\u6b64\u9a8c\u8bc1\u8f93\u5165\u7684\u5408\u6cd5\u6027\u975e\u5e38\u91cd\u8981\u3002\u53ef\u4ee5\u901a\u8fc7\u5f02\u5e38\u5904\u7406\u6765\u6355\u83b7\u8f93\u5165\u9519\u8bef\u5e76\u63d0\u793a\u7528\u6237\u91cd\u65b0\u8f93\u5165\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">while True:<\/p>\n<p>    try:<\/p>\n<p>        angle = float(input(&quot;\u8bf7\u8f93\u5165\u89d2\u5ea6\u503c\uff1a&quot;))<\/p>\n<p>        break<\/p>\n<p>    except ValueError:<\/p>\n<p>        print(&quot;\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u503c\u3002&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u786e\u4fdd\u7528\u6237\u8f93\u5165\u7684\u662f\u4e00\u4e2a\u6709\u6548\u7684\u6570\u503c\uff0c\u907f\u514d\u7a0b\u5e8f\u5d29\u6e83\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528GUI\u5e93<\/p>\n<\/p>\n<p><p>\u5728\u56fe\u5f62\u7528\u6237\u754c\u9762\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684GUI\u5e93\u6765\u521b\u5efa\u8f93\u5165\u754c\u9762\uff0c\u4f8b\u5982Tkinter\u3002Tkinter\u662fPython\u5185\u7f6e\u7684GUI\u5e93\uff0c\u4f7f\u7528\u65b9\u4fbf\uff0c\u652f\u6301\u591a\u79cd\u63a7\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>Tkinter\u8f93\u5165\u6846<\/li>\n<\/ol>\n<p><p>\u4f7f\u7528Tkinter\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u7a97\u53e3\uff0c\u5305\u542b\u4e00\u4e2a\u8f93\u5165\u6846\u548c\u4e00\u4e2a\u6309\u94ae\uff0c\u8ba9\u7528\u6237\u8f93\u5165\u89d2\u5ea6\u503c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>def get_angle():<\/p>\n<p>    angle = entry.get()<\/p>\n<p>    try:<\/p>\n<p>        angle = float(angle)<\/p>\n<p>        label.config(text=f&quot;\u8f93\u5165\u7684\u89d2\u5ea6\u503c\u4e3a\uff1a{angle}\u5ea6&quot;)<\/p>\n<p>    except ValueError:<\/p>\n<p>        label.config(text=&quot;\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u503c\u3002&quot;)<\/p>\n<p>root = tk.Tk()<\/p>\n<p>root.title(&quot;\u89d2\u5ea6\u8f93\u5165&quot;)<\/p>\n<p>entry = tk.Entry(root)<\/p>\n<p>entry.pack()<\/p>\n<p>button = tk.Button(root, text=&quot;\u786e\u5b9a&quot;, command=get_angle)<\/p>\n<p>button.pack()<\/p>\n<p>label = tk.Label(root)<\/p>\n<p>label.pack()<\/p>\n<p>root.m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>nloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u8f93\u5165\u6846\u3001\u6309\u94ae\u548c\u6807\u7b7e\u7684\u7a97\u53e3\u3002\u5f53\u7528\u6237\u70b9\u51fb\u6309\u94ae\u65f6\uff0c\u7a0b\u5e8f\u4f1a\u8bfb\u53d6\u8f93\u5165\u6846\u4e2d\u7684\u5185\u5bb9\u5e76\u8fdb\u884c\u9a8c\u8bc1\uff0c\u663e\u793a\u76f8\u5e94\u7684\u63d0\u793a\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4ece\u914d\u7f6e\u6587\u4ef6\u8bfb\u53d6<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u5e94\u7528\u4e2d\uff0c\u89d2\u5ea6\u503c\u53ef\u80fd\u9700\u8981\u4ece\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bfb\u53d6\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u9700\u8981\u9891\u7e41\u66f4\u6539\u89d2\u5ea6\u503c\u7684\u60c5\u51b5\uff0c\u800c\u65e0\u9700\u91cd\u65b0\u8fd0\u884c\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\uff08\u4f8b\u5982JSON\u3001YAML\u6216INI\u6587\u4ef6\uff09\u5b58\u50a8\u89d2\u5ea6\u503c\uff0c\u5e76\u5728\u7a0b\u5e8f\u8fd0\u884c\u65f6\u8bfb\u53d6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528JSON\u6587\u4ef6\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>config.json<\/code>\u7684\u6587\u4ef6\uff0c\u5e76\u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-json\">{<\/p>\n<p>    &quot;angle&quot;: 45.0<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u5728Python\u7a0b\u5e8f\u4e2d\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<p>with open(&#39;config.json&#39;, &#39;r&#39;) as f:<\/p>\n<p>    config = json.load(f)<\/p>\n<p>angle = config.get(&#39;angle&#39;)<\/p>\n<p>print(f&quot;\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u89d2\u5ea6\u503c\u4e3a\uff1a{angle}\u5ea6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u7ba1\u7406\u548c\u66f4\u65b0\u89d2\u5ea6\u503c\uff0c\u800c\u65e0\u9700\u4fee\u6539\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u53c2\u6570<\/p>\n<\/p>\n<p><p>\u5728\u4e00\u4e9b\u811a\u672c\u6216\u547d\u4ee4\u884c\u5de5\u5177\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u4f20\u9012\u89d2\u5ea6\u503c\u3002Python\u7684<code>argparse<\/code>\u6a21\u5757\u53ef\u4ee5\u5e2e\u52a9\u89e3\u6790\u547d\u4ee4\u884c\u53c2\u6570\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528<code>argparse<\/code>\u6a21\u5757<\/li>\n<\/ol>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528<code>argparse<\/code>\u6a21\u5757\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import argparse<\/p>\n<p>parser = argparse.ArgumentParser(description=&quot;\u8f93\u5165\u89d2\u5ea6\u503c&quot;)<\/p>\n<p>parser.add_argument(&#39;angle&#39;, type=float, help=&#39;\u89d2\u5ea6\u503c&#39;)<\/p>\n<p>args = parser.parse_args()<\/p>\n<p>print(f&quot;\u547d\u4ee4\u884c\u53c2\u6570\u4e2d\u7684\u89d2\u5ea6\u503c\u4e3a\uff1a{args.angle}\u5ea6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u811a\u672c\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u53c2\u6570\u4f20\u9012\u89d2\u5ea6\u503c\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code>python script.py 30.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u9700\u8981\u5728\u547d\u4ee4\u884c\u4e2d\u5feb\u901f\u4f20\u9012\u53c2\u6570\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u8f93\u5165\u89d2\u5ea6\u503c\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u5f0f\u53d6\u51b3\u4e8e\u5e94\u7528\u573a\u666f\u548c\u9700\u6c42\u3002\u5bf9\u4e8e\u7b80\u5355\u7684\u811a\u672c\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u6216\u547d\u4ee4\u884c\u53c2\u6570\uff1b\u5bf9\u4e8e\u56fe\u5f62\u754c\u9762\u5e94\u7528\uff0c\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528Tkinter\u7b49GUI\u5e93\uff1b\u5bf9\u4e8e\u9700\u8981\u9891\u7e41\u66f4\u6539\u7684\u53c2\u6570\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u5e0c\u671b\u80fd\u591f\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u9009\u62e9\u548c\u5b9e\u73b0\u89d2\u5ea6\u503c\u7684\u8f93\u5165\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8f93\u5165\u89d2\u5ea6\u503c\u5e76\u8fdb\u884c\u8f6c\u6362\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>input()<\/code>\u51fd\u6570\u6765\u83b7\u53d6\u7528\u6237\u8f93\u5165\u7684\u89d2\u5ea6\u503c\u3002\u83b7\u53d6\u5230\u7684\u503c\u901a\u5e38\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u9700\u8981\u4f7f\u7528<code>float()<\/code>\u6216<code>int()<\/code>\u51fd\u6570\u8fdb\u884c\u8f6c\u6362\uff0c\u4ee5\u4fbf\u4e8e\u540e\u7eed\u7684\u8ba1\u7b97\u3002\u6b64\u5916\uff0c\u5e38\u89c1\u7684\u89d2\u5ea6\u8f6c\u6362\u6709\u5ea6\u4e0e\u5f27\u5ea6\u4e4b\u95f4\u7684\u8f6c\u6362\uff0c\u53ef\u4ee5\u4f7f\u7528<code>math<\/code>\u5e93\u4e2d\u7684<code>radians()<\/code>\u51fd\u6570\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">import math\n\nangle_deg = float(input(&quot;\u8bf7\u8f93\u5165\u89d2\u5ea6\u503c: &quot;))\nangle_rad = math.radians(angle_deg)\nprint(f&quot;\u5f27\u5ea6\u503c\u4e3a: {angle_rad}&quot;)\n<\/code><\/pre>\n<p><strong>Python\u4e2d\u5982\u4f55\u5904\u7406\u8f93\u5165\u7684\u89d2\u5ea6\u503c\u4ee5\u907f\u514d\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u786e\u4fdd\u8f93\u5165\u7684\u6709\u6548\u6027\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u5757\u6765\u6355\u6349\u53ef\u80fd\u53d1\u751f\u7684\u9519\u8bef\uff0c\u4f8b\u5982\u8f93\u5165\u975e\u6570\u5b57\u5b57\u7b26\u3002\u5728\u6355\u83b7\u5230\u9519\u8bef\u65f6\uff0c\u60a8\u53ef\u4ee5\u63d0\u793a\u7528\u6237\u91cd\u65b0\u8f93\u5165\u6709\u6548\u7684\u89d2\u5ea6\u503c\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">try:\n    angle_deg = float(input(&quot;\u8bf7\u8f93\u5165\u89d2\u5ea6\u503c: &quot;))\nexcept ValueError:\n    print(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u6570\u5b57\u4f5c\u4e3a\u89d2\u5ea6\u503c\u3002&quot;)\n<\/code><\/pre>\n<p><strong>\u53ef\u4ee5\u5728Python\u4e2d\u5c06\u8f93\u5165\u7684\u89d2\u5ea6\u503c\u7528\u4e8e\u54ea\u4e9b\u8ba1\u7b97\uff1f<\/strong><br \/>\u8f93\u5165\u7684\u89d2\u5ea6\u503c\u53ef\u4ee5\u7528\u4e8e\u591a\u79cd\u8ba1\u7b97\uff0c\u4f8b\u5982\u4e09\u89d2\u51fd\u6570\u7684\u8ba1\u7b97\uff08\u6b63\u5f26\u3001\u4f59\u5f26\u3001\u6b63\u5207\u7b49\uff09\u3002\u901a\u8fc7\u5c06\u5ea6\u6570\u8f6c\u6362\u4e3a\u5f27\u5ea6\u540e\uff0c\u53ef\u4ee5\u5229\u7528<code>math<\/code>\u5e93\u4e2d\u7684\u76f8\u5173\u51fd\u6570\u8fdb\u884c\u8ba1\u7b97\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u8ba1\u7b97\u6b63\u5f26\u503c\uff1a<\/p>\n<pre><code class=\"language-python\">import math\n\nangle_deg = float(input(&quot;\u8bf7\u8f93\u5165\u89d2\u5ea6\u503c: &quot;))\nangle_rad = math.radians(angle_deg)\nsine_value = math.sin(angle_rad)\nprint(f&quot;{angle_deg}\u5ea6\u7684\u6b63\u5f26\u503c\u4e3a: {sine_value}&quot;)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"Python\u8f93\u5165\u89d2\u5ea6\u503c\u53ef\u4ee5\u901a\u8fc7\u6807\u51c6\u8f93\u5165\u51fd\u6570\u3001GUI\u5e93\u6216\u8005\u914d\u7f6e\u6587\u4ef6\u7b49\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7\u6807\u51c6\u8f93\u5165\u51fd\u6570 [&hellip;]","protected":false},"author":3,"featured_media":1004895,"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\/1004881"}],"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=1004881"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1004881\/revisions"}],"predecessor-version":[{"id":1004896,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1004881\/revisions\/1004896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1004895"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1004881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1004881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1004881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}