{"id":1001292,"date":"2024-12-27T09:58:42","date_gmt":"2024-12-27T01:58:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1001292.html"},"modified":"2024-12-27T09:58:44","modified_gmt":"2024-12-27T01:58:44","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e6%8c%89%e9%94%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1001292.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u4f7f\u7528\u6309\u952e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25075524\/6a956ccb-4089-4697-9188-3693cec8c85b.webp\" alt=\"python\u4e2d\u5982\u4f55\u4f7f\u7528\u6309\u952e\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u4f7f\u7528\u6309\u952e\u7684\u65b9\u5f0f\u6709\u591a\u79cd\uff0c\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec<strong>\u4f7f\u7528\u952e\u76d8\u76d1\u542c\u5e93\u5982<code>pynput<\/code>\u3001\u501f\u52a9GUI\u6846\u67b6\u5982<code>tkinter<\/code>\u3001\u4ee5\u53ca\u4f7f\u7528\u6e38\u620f\u5f00\u53d1\u5e93\u5982<code>pygame<\/code><\/strong>\u3002\u5176\u4e2d\uff0c<code>pynput<\/code>\u5e93\u7528\u4e8e\u76d1\u542c\u548c\u63a7\u5236\u952e\u76d8\u4e8b\u4ef6\uff0c\u9002\u5408\u4e8e\u9700\u8981\u5168\u5c40\u952e\u76d8\u76d1\u542c\u7684\u573a\u666f\uff1b<code>tkinter<\/code>\u63d0\u4f9b\u4e86\u7b80\u5355\u7684\u6309\u952e\u7ed1\u5b9a\u529f\u80fd\uff0c\u9002\u7528\u4e8e\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\uff1b\u800c<code>pygame<\/code>\u5219\u5e38\u7528\u4e8e\u6e38\u620f\u5f00\u53d1\u4e2d\u7684\u6309\u952e\u68c0\u6d4b\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u5b9e\u73b0\u6309\u952e\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528PYNPUT\u76d1\u542c\u952e\u76d8\u4e8b\u4ef6<\/p>\n<\/p>\n<p><p><code>pynput<\/code>\u5e93\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u76d1\u542c\u548c\u6a21\u62df\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u3002\u5b83\u9002\u7528\u4e8e\u9700\u8981\u5728\u540e\u53f0\u8fd0\u884c\u7684\u952e\u76d8\u76d1\u63a7\u4efb\u52a1\uff0c\u6bd4\u5982\u5feb\u6377\u952e\u68c0\u6d4b\u6216\u81ea\u52a8\u5316\u811a\u672c\u3002\u4e0b\u9762\u662f\u5982\u4f55\u4f7f\u7528<code>pynput<\/code>\u6765\u76d1\u542c\u952e\u76d8\u4e8b\u4ef6\u7684\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5pynput\u5e93<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u4f7f\u7528<code>pynput<\/code>\u4e4b\u524d\uff0c\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86\u8be5\u5e93\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pynput<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u76d1\u542c\u6309\u952e\u4e8b\u4ef6<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528<code>pynput<\/code>\u5e93\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u76d1\u542c\u952e\u76d8\u6309\u952e\u4e8b\u4ef6\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528<code>pynput<\/code>\u76d1\u542c\u6309\u952e\u7684\u6309\u4e0b\u548c\u91ca\u653e\u4e8b\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pynput import keyboard<\/p>\n<p>def on_press(key):<\/p>\n<p>    try:<\/p>\n<p>        print(f&#39;Alphanumeric key {key.char} pressed&#39;)<\/p>\n<p>    except AttributeError:<\/p>\n<p>        print(f&#39;Special key {key} pressed&#39;)<\/p>\n<p>def on_release(key):<\/p>\n<p>    print(f&#39;Key {key} released&#39;)<\/p>\n<p>    if key == keyboard.Key.esc:<\/p>\n<p>        # Stop listener<\/p>\n<p>        return False<\/p>\n<h2><strong>Collect events until released<\/strong><\/h2>\n<p>with keyboard.Listener(<\/p>\n<p>        on_press=on_press,<\/p>\n<p>        on_release=on_release) as listener:<\/p>\n<p>    listener.join()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4ee5\u4e0a\u4ee3\u7801\u4e2d\uff0c<code>on_press<\/code>\u51fd\u6570\u7528\u4e8e\u5904\u7406\u6309\u952e\u6309\u4e0b\u4e8b\u4ef6\uff0c\u800c<code>on_release<\/code>\u51fd\u6570\u7528\u4e8e\u5904\u7406\u6309\u952e\u91ca\u653e\u4e8b\u4ef6\u3002\u5982\u679c\u6309\u4e0b\u7684\u662f<code>ESC<\/code>\u952e\uff0c\u76d1\u542c\u5668\u5c06\u505c\u6b62\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u6a21\u62df\u6309\u952e\u4e8b\u4ef6<\/strong><\/li>\n<\/ol>\n<p><p><code>pynput<\/code>\u4e0d\u4ec5\u53ef\u4ee5\u76d1\u542c\u952e\u76d8\u4e8b\u4ef6\uff0c\u8fd8\u53ef\u4ee5\u6a21\u62df\u6309\u952e\u4e8b\u4ef6\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u4f7f\u7528<code>pynput<\/code>\u6a21\u62df\u6309\u952e\u6309\u4e0b\u548c\u91ca\u653e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pynput.keyboard import Key, Controller<\/p>\n<p>keyboard = Controller()<\/p>\n<h2><strong>Press and release space<\/strong><\/h2>\n<p>keyboard.press(Key.space)<\/p>\n<p>keyboard.release(Key.space)<\/p>\n<h2><strong>Type a string<\/strong><\/h2>\n<p>keyboard.type(&#39;Hello World!&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u4ee3\u7801\uff0c\u53ef\u4ee5\u6a21\u62df\u952e\u76d8\u7684\u6309\u952e\u64cd\u4f5c\uff0c\u6bd4\u5982\u8f93\u5165\u5b57\u7b26\u4e32\u6216\u6309\u4e0b\u7279\u5b9a\u7684\u952e\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528TKINTER\u5b9e\u73b0\u6309\u952e\u7ed1\u5b9a<\/p>\n<\/p>\n<p><p><code>tkinter<\/code>\u662fPython\u7684\u6807\u51c6GUI\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u7ec4\u4ef6\u548c\u4e8b\u4ef6\u5904\u7406\u673a\u5236\u3002\u53ef\u4ee5\u4f7f\u7528<code>tkinter<\/code>\u8f7b\u677e\u5730\u5b9e\u73b0\u6309\u952e\u7ed1\u5b9a\uff0c\u9002\u5408\u4e8e\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u521b\u5efa\u7b80\u5355\u7684\u6309\u952e\u7ed1\u5b9a\u5e94\u7528<\/strong><\/li>\n<\/ol>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528<code>tkinter<\/code>\u5b9e\u73b0\u6309\u952e\u7ed1\u5b9a\u7684\u7b80\u5355\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>def key_event(event):<\/p>\n<p>    print(f&#39;Key pressed: {event.char}&#39;)<\/p>\n<p>root = tk.Tk()<\/p>\n<p>root.bind(&#39;&lt;Key&gt;&#39;, key_event)<\/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\u5f53\u7528\u6237\u5728\u7a97\u53e3\u4e2d\u6309\u4e0b\u4efb\u610f\u952e\u65f6\uff0c<code>key_event<\/code>\u51fd\u6570\u5c06\u88ab\u8c03\u7528\uff0c\u5e76\u8f93\u51fa\u6309\u4e0b\u7684\u6309\u952e\u5b57\u7b26\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5904\u7406\u7279\u5b9a\u6309\u952e\u4e8b\u4ef6<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u7ed1\u5b9a\u7279\u5b9a\u7684\u6309\u952e\u4e8b\u4ef6\u6765\u5904\u7406\u7279\u6b8a\u7684\u6309\u952e\u7ec4\u5408\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def specific_key_event(event):<\/p>\n<p>    if event.keysym == &#39;Escape&#39;:<\/p>\n<p>        print(&#39;Escape key pressed!&#39;)<\/p>\n<p>root.bind(&#39;&lt;Escape&gt;&#39;, specific_key_event)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u5f53\u7528\u6237\u6309\u4e0b<code>Escape<\/code>\u952e\u65f6\uff0c\u5c06\u8f93\u51fa\u7279\u5b9a\u7684\u6d88\u606f\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528PYGAME\u76d1\u542c\u6309\u952e<\/p>\n<\/p>\n<p><p><code>pygame<\/code>\u662f\u4e00\u4e2a\u7528\u4e8e\u6e38\u620f\u5f00\u53d1\u7684\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6e38\u620f\u529f\u80fd\uff0c\u5305\u62ec\u6309\u952e\u76d1\u542c\u3002\u9002\u7528\u4e8e\u9700\u8981\u5b9e\u65f6\u54cd\u5e94\u952e\u76d8\u8f93\u5165\u7684\u6e38\u620f\u5f00\u53d1\u573a\u666f\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u521d\u59cb\u5316pygame<\/strong><\/li>\n<\/ol>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u5e76\u521d\u59cb\u5316<code>pygame<\/code>\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pygame<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u7740\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u521d\u59cb\u5316<code>pygame<\/code>\u5e76\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u7a97\u53e3\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pygame<\/p>\n<p>pygame.init()<\/p>\n<p>screen = pygame.display.set_mode((640, 480))<\/p>\n<p>pygame.display.set_caption(&#39;Key Press Example&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u76d1\u542c\u6309\u952e\u4e8b\u4ef6<\/strong><\/li>\n<\/ol>\n<p><p>\u5728<code>pygame<\/code>\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e8b\u4ef6\u5faa\u73af\u6765\u76d1\u542c\u6309\u952e\u4e8b\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">running = True<\/p>\n<p>while running:<\/p>\n<p>    for event in pygame.event.get():<\/p>\n<p>        if event.type == pygame.QUIT:<\/p>\n<p>            running = False<\/p>\n<p>        elif event.type == pygame.KEYDOWN:<\/p>\n<p>            if event.key == pygame.K_LEFT:<\/p>\n<p>                print(&#39;Left arrow key pressed&#39;)<\/p>\n<p>            elif event.key == pygame.K_RIGHT:<\/p>\n<p>                print(&#39;Right arrow key pressed&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u4ee3\u7801\u76d1\u542c\u4e86\u5de6\u7bad\u5934\u548c\u53f3\u7bad\u5934\u952e\u7684\u6309\u4e0b\u4e8b\u4ef6\uff0c\u5e76\u5728\u63a7\u5236\u53f0\u8f93\u51fa\u76f8\u5e94\u7684\u6d88\u606f\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u5904\u7406\u591a\u4e2a\u6309\u952e<\/strong><\/li>\n<\/ol>\n<p><p><code>pygame<\/code>\u8fd8\u53ef\u4ee5\u7528\u4e8e\u68c0\u6d4b\u591a\u4e2a\u6309\u952e\u7684\u540c\u65f6\u6309\u4e0b\uff0c\u8fd9\u5728\u6e38\u620f\u5f00\u53d1\u4e2d\u975e\u5e38\u5b9e\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = pygame.key.get_pressed()<\/p>\n<p>if keys[pygame.K_w]:<\/p>\n<p>    print(&#39;W key is held down&#39;)<\/p>\n<p>if keys[pygame.K_s]:<\/p>\n<p>    print(&#39;S key is held down&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528<code>pygame.key.get_pressed()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u83b7\u53d6\u5f53\u524d\u6240\u6709\u6309\u952e\u7684\u72b6\u6001\uff0c\u4ece\u800c\u68c0\u6d4b\u591a\u4e2a\u6309\u952e\u7684\u540c\u65f6\u6309\u4e0b\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\u6309\u952e\u529f\u80fd\uff0c\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u3002<strong><code>pynput<\/code>\u9002\u5408\u5168\u5c40\u952e\u76d8\u4e8b\u4ef6\u76d1\u542c\u3001<code>tkinter<\/code>\u9002\u7528\u4e8e\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u6309\u952e\u7ed1\u5b9a\u3001\u800c<code>pygame<\/code>\u5219\u4e13\u6ce8\u4e8e\u6e38\u620f\u5f00\u53d1\u4e2d\u7684\u6309\u952e\u5904\u7406<\/strong>\u3002\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u9700\u6c42\uff0c\u53ef\u4ee5\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u6309\u952e\u529f\u80fd\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u9700\u8981\u6ce8\u610f\u952e\u76d8\u4e8b\u4ef6\u7684\u5904\u7406\u6548\u7387\u548c\u54cd\u5e94\u901f\u5ea6\uff0c\u786e\u4fdd\u6309\u952e\u64cd\u4f5c\u80fd\u591f\u53ca\u65f6\u3001\u51c6\u786e\u5730\u88ab\u54cd\u5e94\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u4f7f\u7528\u952e\u76d8\u4e8b\u4ef6\u8fdb\u884c\u4ea4\u4e92\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5e93\u5982<code>pygame<\/code>\u6216<code>tkinter<\/code>\u6765\u5904\u7406\u952e\u76d8\u4e8b\u4ef6\u3002<code>pygame<\/code>\u9002\u5408\u6e38\u620f\u5f00\u53d1\uff0c\u53ef\u4ee5\u68c0\u6d4b\u6309\u952e\u72b6\u6001\u5e76\u6267\u884c\u76f8\u5e94\u7684\u64cd\u4f5c\uff0c\u800c<code>tkinter<\/code>\u5219\u9002\u5408\u521b\u5efaGUI\u5e94\u7528\u7a0b\u5e8f\u3002\u901a\u8fc7\u7ed1\u5b9a\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\uff0c\u4f60\u53ef\u4ee5\u5728\u7528\u6237\u6309\u4e0b\u7279\u5b9a\u6309\u952e\u65f6\u89e6\u53d1\u76f8\u5e94\u7684\u529f\u80fd\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9bPython\u5e93\u6765\u5904\u7406\u6309\u952e\u8f93\u5165\uff1f<\/strong><br \/>\u5e38\u7528\u7684\u5e93\u5305\u62ec<code>pygame<\/code>\u3001<code>tkinter<\/code>\u548c<code>keyboard<\/code>\u3002<code>pygame<\/code>\u4e13\u6ce8\u4e8e\u6e38\u620f\u5f00\u53d1\uff0c\u652f\u6301\u590d\u6742\u7684\u952e\u76d8\u548c\u9f20\u6807\u8f93\u5165\u5904\u7406\u3002<code>tkinter<\/code>\u662f\u6807\u51c6\u5e93\u4e4b\u4e00\uff0c\u9002\u5408\u6784\u5efa\u7b80\u5355\u7684\u56fe\u5f62\u754c\u9762\u5e94\u7528\u3002<code>keyboard<\/code>\u5e93\u53ef\u4ee5\u76d1\u542c\u5168\u5c40\u6309\u952e\uff0c\u975e\u5e38\u9002\u5408\u9700\u8981\u6355\u6349\u7cfb\u7edf\u8303\u56f4\u5185\u6309\u952e\u7684\u5e94\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u6309\u952e\u76d1\u542c\u529f\u80fd\uff1f<\/strong><br \/>\u4f7f\u7528<code>keyboard<\/code>\u5e93\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u6309\u952e\u76d1\u542c\u3002\u9996\u5148\u5b89\u88c5\u8be5\u5e93\uff0c\u7136\u540e\u901a\u8fc7<code>keyboard.on_press()<\/code>\u6216<code>keyboard.on_release()<\/code>\u51fd\u6570\u6765\u7ed1\u5b9a\u6309\u952e\u4e8b\u4ef6\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u5f53\u7528\u6237\u6309\u4e0b\u6216\u91ca\u653e\u7279\u5b9a\u6309\u952e\u65f6\uff0c\u53ef\u4ee5\u7acb\u5373\u6267\u884c\u9884\u8bbe\u7684\u64cd\u4f5c\uff0c\u8fd9\u5728\u5feb\u6377\u952e\u529f\u80fd\u6216\u5b9e\u65f6\u76d1\u63a7\u4e2d\u975e\u5e38\u6709\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4f7f\u7528\u6309\u952e\u7684\u65b9\u5f0f\u6709\u591a\u79cd\uff0c\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u952e\u76d8\u76d1\u542c\u5e93\u5982pynput\u3001\u501f\u52a9GUI\u6846\u67b6\u5982tkinte [&hellip;]","protected":false},"author":3,"featured_media":1001294,"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\/1001292"}],"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=1001292"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001292\/revisions"}],"predecessor-version":[{"id":1001295,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001292\/revisions\/1001295"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1001294"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1001292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1001292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1001292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}