{"id":1084295,"date":"2025-01-08T13:05:58","date_gmt":"2025-01-08T05:05:58","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1084295.html"},"modified":"2025-01-08T13:06:00","modified_gmt":"2025-01-08T05:06:00","slug":"python%e5%a6%82%e4%bd%95%e5%8f%96%e4%bb%bb%e4%b8%80%e6%ad%a3%e6%95%b4%e6%95%b0-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1084295.html","title":{"rendered":"python\u5982\u4f55\u53d6\u4efb\u4e00\u6b63\u6574\u6570"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24194729\/56aefd04-7e58-4e52-9262-ecbd5cd349a2.webp\" alt=\"python\u5982\u4f55\u53d6\u4efb\u4e00\u6b63\u6574\u6570\" \/><\/p>\n<p><p> <strong>Python\u53d6\u4efb\u4e00\u6b63\u6574\u6570\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528input\u51fd\u6570\u3001\u968f\u673a\u6570\u751f\u6210\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u7b49\u3002\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7input\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6613\u7528\uff0c\u9002\u5408\u5927\u591a\u6570\u60c5\u51b5\u3002<\/strong> \u4f8b\u5982\uff0c\u901a\u8fc7input\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6b63\u6574\u6570\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u79cd\u65b9\u6cd5\u5e76\u7ed9\u51fa\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = int(input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6b63\u6574\u6570: &quot;))<\/p>\n<p>if number &lt;= 0:<\/p>\n<p>    print(&quot;\u8f93\u5165\u7684\u4e0d\u662f\u6b63\u6574\u6570&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;\u4f60\u8f93\u5165\u7684\u6b63\u6574\u6570\u662f: {number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528input\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165<\/p>\n<\/p>\n<p><p>\u4f7f\u7528input\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002input\u51fd\u6570\u4f1a\u6682\u505c\u7a0b\u5e8f\u8fd0\u884c\uff0c\u7b49\u5f85\u7528\u6237\u8f93\u5165\uff0c\u5e76\u5c06\u8f93\u5165\u5185\u5bb9\u4f5c\u4e3a\u5b57\u7b26\u4e32\u8fd4\u56de\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528int\u51fd\u6570\u5c06\u5176\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def get_positive_integer():<\/p>\n<p>    while True:<\/p>\n<p>        user_input = input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6b63\u6574\u6570: &quot;)<\/p>\n<p>        try:<\/p>\n<p>            number = int(user_input)<\/p>\n<p>            if number &gt; 0:<\/p>\n<p>                return number<\/p>\n<p>            else:<\/p>\n<p>                print(&quot;\u8f93\u5165\u7684\u4e0d\u662f\u6b63\u6574\u6570\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002&quot;)<\/p>\n<p>        except ValueError:<\/p>\n<p>            print(&quot;\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u8f93\u5165\u4e00\u4e2a\u6b63\u6574\u6570\u3002&quot;)<\/p>\n<p>number = get_positive_integer()<\/p>\n<p>print(f&quot;\u4f60\u8f93\u5165\u7684\u6b63\u6574\u6570\u662f: {number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570get_positive_integer\uff0c\u8be5\u51fd\u6570\u4f1a\u6301\u7eed\u63d0\u793a\u7528\u6237\u8f93\u5165\uff0c\u76f4\u5230\u7528\u6237\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u6b63\u6574\u6570\u4e3a\u6b62\u3002\u4f7f\u7528try-except\u8bed\u53e5\u6355\u83b7\u53ef\u80fd\u7684ValueError\u5f02\u5e38\uff0c\u786e\u4fdd\u8f93\u5165\u7684\u5185\u5bb9\u53ef\u4ee5\u6210\u529f\u8f6c\u6362\u4e3a\u6574\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u968f\u673a\u6570\u751f\u6210<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u901a\u8fc7\u7528\u6237\u8f93\u5165\u83b7\u53d6\u6b63\u6574\u6570\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528random\u6a21\u5757\u751f\u6210\u4e00\u4e2a\u968f\u673a\u7684\u6b63\u6574\u6570\u3002random\u6a21\u5757\u4e2d\u7684randint\u51fd\u6570\u53ef\u4ee5\u751f\u6210\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u6574\u6570\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p>def generate_random_positive_integer(min_value, max_value):<\/p>\n<p>    return random.randint(min_value, max_value)<\/p>\n<p>min_value = 1<\/p>\n<p>max_value = 100<\/p>\n<p>random_number = generate_random_positive_integer(min_value, max_value)<\/p>\n<p>print(f&quot;\u751f\u6210\u7684\u968f\u673a\u6b63\u6574\u6570\u662f: {random_number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570generate_random_positive_integer\uff0c\u8be5\u51fd\u6570\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\uff0c\u5206\u522b\u8868\u793a\u751f\u6210\u968f\u673a\u6570\u7684\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c\u3002\u901a\u8fc7\u8c03\u7528random.randint\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u751f\u6210\u5e76\u8fd4\u56de\u4e00\u4e2a\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u6b63\u6574\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u83b7\u53d6<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u83b7\u53d6\u6b63\u6574\u6570\u3002\u53ef\u4ee5\u4f7f\u7528sys\u6a21\u5757\u4e2d\u7684argv\u5217\u8868\u83b7\u53d6\u547d\u4ee4\u884c\u53c2\u6570\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>def get_positive_integer_from_args():<\/p>\n<p>    if len(sys.argv) &lt; 2:<\/p>\n<p>        print(&quot;\u8bf7\u63d0\u4f9b\u4e00\u4e2a\u6b63\u6574\u6570\u4f5c\u4e3a\u547d\u4ee4\u884c\u53c2\u6570\u3002&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>    try:<\/p>\n<p>        number = int(sys.argv[1])<\/p>\n<p>        if number &gt; 0:<\/p>\n<p>            return number<\/p>\n<p>        else:<\/p>\n<p>            print(&quot;\u63d0\u4f9b\u7684\u53c2\u6570\u4e0d\u662f\u6b63\u6574\u6570\u3002&quot;)<\/p>\n<p>            sys.exit(1)<\/p>\n<p>    except ValueError:<\/p>\n<p>        print(&quot;\u65e0\u6548\u7684\u547d\u4ee4\u884c\u53c2\u6570\uff0c\u8bf7\u63d0\u4f9b\u4e00\u4e2a\u6b63\u6574\u6570\u3002&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>number = get_positive_integer_from_args()<\/p>\n<p>print(f&quot;\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u63d0\u4f9b\u7684\u6b63\u6574\u6570\u662f: {number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570get_positive_integer_from_args\uff0c\u901a\u8fc7sys.argv\u5217\u8868\u83b7\u53d6\u547d\u4ee4\u884c\u53c2\u6570\uff0c\u5e76\u68c0\u67e5\u5176\u6709\u6548\u6027\u3002\u7a0b\u5e8f\u5728\u68c0\u67e5\u5230\u65e0\u6548\u8f93\u5165\u65f6\u4f1a\u8f93\u51fa\u63d0\u793a\u4fe1\u606f\u5e76\u9000\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u901a\u8fc7GUI\u83b7\u53d6\u7528\u6237\u8f93\u5165<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u6211\u4eec\u53ef\u80fd\u9700\u8981\u901a\u8fc7\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u83b7\u53d6\u6b63\u6574\u6570\u3002\u53ef\u4ee5\u4f7f\u7528Tkinter\u5e93\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684GUI\uff0c\u63d0\u793a\u7528\u6237\u8f93\u5165\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>from tkinter import simpledialog<\/p>\n<p>def get_positive_integer_from_gui():<\/p>\n<p>    root = tk.Tk()<\/p>\n<p>    root.withdraw()  # \u9690\u85cf\u4e3b\u7a97\u53e3<\/p>\n<p>    while True:<\/p>\n<p>        user_input = simpledialog.askstring(&quot;\u8f93\u5165&quot;, &quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6b63\u6574\u6570:&quot;)<\/p>\n<p>        if user_input is None:<\/p>\n<p>            print(&quot;\u7528\u6237\u53d6\u6d88\u4e86\u8f93\u5165\u3002&quot;)<\/p>\n<p>            sys.exit(1)<\/p>\n<p>        try:<\/p>\n<p>            number = int(user_input)<\/p>\n<p>            if number &gt; 0:<\/p>\n<p>                return number<\/p>\n<p>            else:<\/p>\n<p>                print(&quot;\u8f93\u5165\u7684\u4e0d\u662f\u6b63\u6574\u6570\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002&quot;)<\/p>\n<p>        except ValueError:<\/p>\n<p>            print(&quot;\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u8f93\u5165\u4e00\u4e2a\u6b63\u6574\u6570\u3002&quot;)<\/p>\n<p>number = get_positive_integer_from_gui()<\/p>\n<p>print(f&quot;\u901a\u8fc7GUI\u8f93\u5165\u7684\u6b63\u6574\u6570\u662f: {number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528Tkinter\u5e93\u521b\u5efa\u4e86\u4e00\u4e2a\u7b80\u5355\u7684GUI\uff0c\u63d0\u793a\u7528\u6237\u8f93\u5165\u6b63\u6574\u6570\u3002\u4f7f\u7528simpledialog.askstring\u51fd\u6570\u663e\u793a\u8f93\u5165\u5bf9\u8bdd\u6846\uff0c\u5e76\u5c06\u7528\u6237\u8f93\u5165\u7684\u5185\u5bb9\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u901a\u8fc7\u5faa\u73af\u63d0\u793a\u7528\u6237\uff0c\u76f4\u5230\u8f93\u5165\u6709\u6548\u7684\u6b63\u6574\u6570\u4e3a\u6b62\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u83b7\u53d6<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4ece\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bfb\u53d6\u6b63\u6574\u6570\u3002\u53ef\u4ee5\u4f7f\u7528configparser\u5e93\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u6570\u503c\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import configparser<\/p>\n<p>def get_positive_integer_from_config(file_path, section, option):<\/p>\n<p>    config = configparser.ConfigParser()<\/p>\n<p>    config.read(file_path)<\/p>\n<p>    try:<\/p>\n<p>        number = config.getint(section, option)<\/p>\n<p>        if number &gt; 0:<\/p>\n<p>            return number<\/p>\n<p>        else:<\/p>\n<p>            r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se ValueError(&quot;\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u503c\u4e0d\u662f\u6b63\u6574\u6570\u3002&quot;)<\/p>\n<p>    except (configparser.NoSectionError, configparser.NoOptionError, ValueError) as e:<\/p>\n<p>        print(f&quot;\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\u5931\u8d25: {e}&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>file_path = &quot;config.ini&quot;<\/p>\n<p>section = &quot;Settings&quot;<\/p>\n<p>option = &quot;positive_integer&quot;<\/p>\n<p>number = get_positive_integer_from_config(file_path, section, option)<\/p>\n<p>print(f&quot;\u4ece\u914d\u7f6e\u6587\u4ef6\u8bfb\u53d6\u7684\u6b63\u6574\u6570\u662f: {number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570get_positive_integer_from_config\uff0c\u901a\u8fc7configparser\u5e93\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u6570\u503c\uff0c\u5e76\u68c0\u67e5\u5176\u6709\u6548\u6027\u3002\u7a0b\u5e8f\u5728\u8bfb\u53d6\u5931\u8d25\u65f6\u4f1a\u8f93\u51fa\u63d0\u793a\u4fe1\u606f\u5e76\u9000\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\u5c55\u793a\u4e86\u5728\u4e0d\u540c\u573a\u666f\u4e0b\u83b7\u53d6\u6b63\u6574\u6570\u7684\u591a\u79cd\u65b9\u5f0f\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\uff0c\u53ef\u4ee5\u9009\u62e9\u6700\u9002\u5408\u7684\u65b9\u6cd5\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5408\u7406\u9009\u62e9\u8f93\u5165\u65b9\u5f0f\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u7075\u6d3b\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u751f\u6210\u4e00\u4e2a\u968f\u673a\u6b63\u6574\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>random<\/code>\u6a21\u5757\u6765\u751f\u6210\u4e00\u4e2a\u968f\u673a\u7684\u6b63\u6574\u6570\u3002\u5177\u4f53\u65b9\u6cd5\u662f\u4f7f\u7528<code>random.randint(a, b)<\/code>\u51fd\u6570\uff0c\u5176\u4e2d<code>a<\/code>\u548c<code>b<\/code>\u5206\u522b\u662f\u751f\u6210\u968f\u673a\u6570\u7684\u8303\u56f4\u3002\u5982\u679c\u60f3\u8981\u751f\u6210\u4e00\u4e2a1\u5230100\u4e4b\u95f4\u7684\u968f\u673a\u6b63\u6574\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>random.randint(1, 100)<\/code>\u3002<\/p>\n<p><strong>Python\u4e2d\u5982\u4f55\u9a8c\u8bc1\u4e00\u4e2a\u6574\u6570\u662f\u5426\u4e3a\u6b63\u6574\u6570\uff1f<\/strong><br \/>\u8981\u68c0\u67e5\u4e00\u4e2a\u6574\u6570\u662f\u5426\u4e3a\u6b63\u6574\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u6761\u4ef6\u8bed\u53e5\u8fdb\u884c\u5224\u65ad\u3002\u53ef\u4ee5\u4f7f\u7528<code>if<\/code>\u8bed\u53e5\u7ed3\u5408<code>isinstance()<\/code>\u51fd\u6570\u548c\u6bd4\u8f83\u8fd0\u7b97\u7b26\u3002\u4f8b\u5982\uff0c<code>if isinstance(num, int) and num &gt; 0:<\/code> \u8fd9\u884c\u4ee3\u7801\u53ef\u4ee5\u6709\u6548\u5730\u9a8c\u8bc1<code>num<\/code>\u662f\u5426\u4e3a\u6b63\u6574\u6570\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u4ece\u7528\u6237\u8f93\u5165\u4e2d\u83b7\u53d6\u6b63\u6574\u6570\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff0c\u5e76\u7ed3\u5408\u5f02\u5e38\u5904\u7406\u6765\u786e\u4fdd\u8f93\u5165\u662f\u6b63\u6574\u6570\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">try:\n    num = int(input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6b63\u6574\u6570: &quot;))\n    if num &gt; 0:\n        print(&quot;\u60a8\u8f93\u5165\u7684\u6b63\u6574\u6570\u662f:&quot;, num)\n    else:\n        print(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6b63\u6574\u6570\u3002&quot;)\nexcept ValueError:\n    print(&quot;\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u6574\u6570\u3002&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u6709\u6548\u5904\u7406\u7528\u6237\u7684\u8f93\u5165\u5e76\u63d0\u793a\u9519\u8bef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u53d6\u4efb\u4e00\u6b63\u6574\u6570\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528input\u51fd\u6570\u3001\u968f\u673a\u6570\u751f\u6210\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u7b49\u3002\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7 [&hellip;]","protected":false},"author":3,"featured_media":1084300,"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\/1084295"}],"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=1084295"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1084295\/revisions"}],"predecessor-version":[{"id":1084303,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1084295\/revisions\/1084303"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1084300"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1084295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1084295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1084295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}