{"id":984759,"date":"2024-12-27T07:31:03","date_gmt":"2024-12-26T23:31:03","guid":{"rendered":""},"modified":"2024-12-27T07:31:05","modified_gmt":"2024-12-26T23:31:05","slug":"python%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e9%9d%9e%e9%98%bb%e5%a1%9e","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/984759.html","title":{"rendered":"python\u5982\u4f55\u5b9e\u73b0\u975e\u963b\u585e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24212234\/15938f86-fa7c-4cff-bc86-deb90b23a0d8.webp\" alt=\"python\u5982\u4f55\u5b9e\u73b0\u975e\u963b\u585e\" \/><\/p>\n<p><p> Python\u4e2d\u5b9e\u73b0\u975e\u963b\u585e\u64cd\u4f5c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec<strong>\u4f7f\u7528\u5f02\u6b65\u7f16\u7a0b\u3001\u7ebf\u7a0b\u548c\u8fdb\u7a0b\u3001\u591a\u8def\u590d\u7528\u6280\u672f<\/strong>\u3002\u5176\u4e2d\uff0c\u5f02\u6b65\u7f16\u7a0b\u662f\u8fd1\u5e74\u6765\u975e\u5e38\u6d41\u884c\u7684\u4e00\u79cd\u5b9e\u73b0\u975e\u963b\u585e\u7684\u65b9\u6cd5\u3002\u5f02\u6b65\u7f16\u7a0b\u901a\u8fc7\u534f\u7a0b\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5728\u7b49\u5f85I\/O\u64cd\u4f5c\u65f6\u4e0d\u963b\u585e\u6574\u4e2a\u7a0b\u5e8f\u7684\u6267\u884c\uff0c\u4f7f\u5f97\u7a0b\u5e8f\u53ef\u4ee5\u540c\u65f6\u5904\u7406\u591a\u4e2a\u4efb\u52a1\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e09\u79cd\u65b9\u6cd5\u53ca\u5176\u5b9e\u73b0\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5f02\u6b65\u7f16\u7a0b<\/p>\n<\/p>\n<p><p>\u5f02\u6b65\u7f16\u7a0b\u662f\u4e00\u79cd\u975e\u963b\u585e\u7f16\u7a0b\u6a21\u578b\uff0c\u901a\u8fc7\u5141\u8bb8\u4efb\u52a1\u5728\u7b49\u5f85\u5176\u4ed6\u4efb\u52a1\u5b8c\u6210\u65f6\u7ee7\u7eed\u6267\u884c\u6765\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6548\u7387\u3002\u5728Python\u4e2d\uff0c\u5f02\u6b65\u7f16\u7a0b\u4e3b\u8981\u901a\u8fc7<code>asyncio<\/code>\u5e93\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5f02\u6b65\u51fd\u6570\u4e0e\u534f\u7a0b<\/strong><\/li>\n<\/ol>\n<p><p>\u5f02\u6b65\u7f16\u7a0b\u7684\u6838\u5fc3\u662f\u534f\u7a0b\u3002\u534f\u7a0b\u7c7b\u4f3c\u4e8e\u751f\u6210\u5668\uff0c\u4f46\u5b83\u4eec\u53ef\u4ee5\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u6682\u505c\u548c\u6062\u590d\u3002\u8981\u5b9a\u4e49\u4e00\u4e2a\u534f\u7a0b\u51fd\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>async def<\/code>\u8bed\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import asyncio<\/p>\n<p>async def my_coroutine():<\/p>\n<p>    print(&quot;Start coroutine&quot;)<\/p>\n<p>    aw<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t asyncio.sleep(1)<\/p>\n<p>    print(&quot;End coroutine&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>my_coroutine<\/code>\u662f\u4e00\u4e2a\u534f\u7a0b\u51fd\u6570\u3002<code>await asyncio.sleep(1)<\/code>\u8868\u793a\u7a0b\u5e8f\u5c06\u5728\u6b64\u5904\u6682\u505c1\u79d2\u949f\uff0c\u800c\u4e0d\u662f\u963b\u585e\u6574\u4e2a\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4e8b\u4ef6\u5faa\u73af<\/strong><\/li>\n<\/ol>\n<p><p>\u4e8b\u4ef6\u5faa\u73af\u662f\u5f02\u6b65\u7f16\u7a0b\u7684\u6838\u5fc3\u3002\u5b83\u8d1f\u8d23\u8c03\u5ea6\u534f\u7a0b\u7684\u6267\u884c\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7<code>asyncio.get_event_loop()<\/code>\u6765\u83b7\u53d6\u4e8b\u4ef6\u5faa\u73af\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">loop = asyncio.get_event_loop()<\/p>\n<p>loop.run_until_complete(my_coroutine())<\/p>\n<p>loop.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u4e8b\u4ef6\u5faa\u73af<code>loop<\/code>\u8d1f\u8d23\u8c03\u5ea6\u534f\u7a0b<code>my_coroutine<\/code>\u7684\u6267\u884c\uff0c\u76f4\u5230\u534f\u7a0b\u5b8c\u6210\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u4efb\u52a1\u4e0e\u5f02\u6b65I\/O\u64cd\u4f5c<\/strong><\/li>\n<\/ol>\n<p><p>\u4efb\u52a1\u662f\u5bf9\u534f\u7a0b\u7684\u8fdb\u4e00\u6b65\u5c01\u88c5\uff0c\u5141\u8bb8\u534f\u7a0b\u5728\u4e8b\u4ef6\u5faa\u73af\u4e2d\u5e76\u53d1\u8fd0\u884c\u3002\u53ef\u4ee5\u4f7f\u7528<code>asyncio.create_task()<\/code>\u6765\u521b\u5efa\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">async def main():<\/p>\n<p>    task1 = asyncio.create_task(my_coroutine())<\/p>\n<p>    task2 = asyncio.create_task(my_coroutine())<\/p>\n<p>    await task1<\/p>\n<p>    await task2<\/p>\n<p>asyncio.run(main())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>task1<\/code>\u548c<code>task2<\/code>\u662f\u4e24\u4e2a\u4efb\u52a1\uff0c\u5b83\u4eec\u5c06\u5e76\u53d1\u6267\u884c\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u7ebf\u7a0b\u4e0e\u8fdb\u7a0b<\/p>\n<\/p>\n<p><p>\u7ebf\u7a0b\u548c\u8fdb\u7a0b\u662f\u5b9e\u73b0\u975e\u963b\u585e\u7f16\u7a0b\u7684\u4f20\u7edf\u65b9\u6cd5\u3002\u5b83\u4eec\u901a\u8fc7\u5e76\u53d1\u6216\u5e76\u884c\u6267\u884c\u591a\u4e2a\u4efb\u52a1\u6765\u5b9e\u73b0\u975e\u963b\u585e\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u7ebf\u7a0b<\/strong><\/li>\n<\/ol>\n<p><p>Python\u4e2d\u7684<code>threading<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u5bf9\u7ebf\u7a0b\u7684\u652f\u6301\u3002\u7ebf\u7a0b\u662f\u8f7b\u91cf\u7ea7\u7684\u8fdb\u7a0b\uff0c\u53ef\u4ee5\u5e76\u53d1\u6267\u884c\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u7ebf\u7a0b\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>def my_thread():<\/p>\n<p>    print(&quot;Start thread&quot;)<\/p>\n<p>    time.sleep(1)<\/p>\n<p>    print(&quot;End thread&quot;)<\/p>\n<p>thread = threading.Thread(target=my_thread)<\/p>\n<p>thread.start()<\/p>\n<p>thread.join()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>my_thread<\/code>\u51fd\u6570\u5c06\u5728\u4e00\u4e2a\u5355\u72ec\u7684\u7ebf\u7a0b\u4e2d\u6267\u884c\u3002\u8fd9\u610f\u5473\u7740\u5373\u4f7f<code>my_thread<\/code>\u963b\u585e\uff0c\u4e3b\u7a0b\u5e8f\u4e5f\u53ef\u4ee5\u7ee7\u7eed\u6267\u884c\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u8fdb\u7a0b<\/strong><\/li>\n<\/ol>\n<p><p><code>multiprocessing<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u5bf9\u8fdb\u7a0b\u7684\u652f\u6301\u3002\u8fdb\u7a0b\u662f\u72ec\u7acb\u7684\u6267\u884c\u5355\u5143\uff0c\u5177\u6709\u81ea\u5df1\u7684\u5185\u5b58\u7a7a\u95f4\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u8fdb\u7a0b\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import multiprocessing<\/p>\n<p>def my_process():<\/p>\n<p>    print(&quot;Start process&quot;)<\/p>\n<p>    time.sleep(1)<\/p>\n<p>    print(&quot;End process&quot;)<\/p>\n<p>process = multiprocessing.Process(target=my_process)<\/p>\n<p>process.start()<\/p>\n<p>process.join()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>my_process<\/code>\u51fd\u6570\u5c06\u5728\u4e00\u4e2a\u5355\u72ec\u7684\u8fdb\u7a0b\u4e2d\u6267\u884c\u3002\u7531\u4e8e\u8fdb\u7a0b\u4e4b\u95f4\u662f\u72ec\u7acb\u7684\uff0c\u56e0\u6b64\u5373\u4f7f\u4e00\u4e2a\u8fdb\u7a0b\u963b\u585e\uff0c\u4e5f\u4e0d\u4f1a\u5f71\u54cd\u5176\u4ed6\u8fdb\u7a0b\u7684\u6267\u884c\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u591a\u8def\u590d\u7528\u6280\u672f<\/p>\n<\/p>\n<p><p>\u591a\u8def\u590d\u7528\u662f\u4e00\u79cd\u901a\u8fc7\u540c\u65f6\u76d1\u89c6\u591a\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684I\/O\u4e8b\u4ef6\u6765\u5b9e\u73b0\u975e\u963b\u585e\u7684\u65b9\u6cd5\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>select<\/code>\u6a21\u5757\u5b9e\u73b0\u591a\u8def\u590d\u7528\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>select<\/strong><\/li>\n<\/ol>\n<p><p><code>select<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u5bf9\u591a\u8def\u590d\u7528\u7684\u652f\u6301\u3002\u5b83\u53ef\u4ee5\u540c\u65f6\u76d1\u89c6\u591a\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u4ee5\u68c0\u67e5\u5b83\u4eec\u662f\u5426\u53ef\u8bfb\u3001\u53ef\u5199\u6216\u6709\u9519\u8bef\u53d1\u751f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import select<\/p>\n<p>import socket<\/p>\n<p>server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<\/p>\n<p>server_socket.bind((&#39;localhost&#39;, 12345))<\/p>\n<p>server_socket.listen()<\/p>\n<p>inputs = [server_socket]<\/p>\n<p>outputs = []<\/p>\n<p>while inputs:<\/p>\n<p>    readable, writable, exceptional = select.select(inputs, outputs, inputs)<\/p>\n<p>    for s in readable:<\/p>\n<p>        if s is server_socket:<\/p>\n<p>            connection, client_address = s.accept()<\/p>\n<p>            inputs.append(connection)<\/p>\n<p>        else:<\/p>\n<p>            data = s.recv(1024)<\/p>\n<p>            if data:<\/p>\n<p>                outputs.append(s)<\/p>\n<p>            else:<\/p>\n<p>                inputs.remove(s)<\/p>\n<p>                s.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>select.select<\/code>\u51fd\u6570\u5c06\u540c\u65f6\u76d1\u89c6<code>inputs<\/code>\u5217\u8868\u4e2d\u7684\u6240\u6709\u5957\u63a5\u5b57\uff0c\u4ee5\u68c0\u67e5\u5b83\u4eec\u662f\u5426\u53ef\u8bfb\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>epoll\u4e0ekqueue<\/strong><\/li>\n<\/ol>\n<p><p>\u5728Linux\u7cfb\u7edf\u4e0a\uff0c<code>select<\/code>\u6a21\u5757\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u968f\u7740\u76d1\u89c6\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u6570\u91cf\u7684\u589e\u52a0\u800c\u4e0b\u964d\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528<code>epoll<\/code>\uff08\u4ec5\u9650Linux\uff09\u6216<code>kqueue<\/code>\uff08\u4ec5\u9650BSD\u548cmacOS\uff09\u5b9e\u73b0\u66f4\u9ad8\u6548\u7684\u591a\u8def\u590d\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801\u7565<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a<\/p>\n<\/p>\n<p><p>Python\u4e2d\u5b9e\u73b0\u975e\u963b\u585e\u7f16\u7a0b\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\u3002<strong>\u5f02\u6b65\u7f16\u7a0b<\/strong>\u662f\u73b0\u4ee3\u7f16\u7a0b\u4e2d\u5b9e\u73b0\u975e\u963b\u585e\u7684\u9996\u9009\u65b9\u6cd5\uff0c\u5177\u6709\u9ad8\u6548\u3001\u7075\u6d3b\u7684\u7279\u70b9\u3002<strong>\u7ebf\u7a0b\u4e0e\u8fdb\u7a0b<\/strong>\u5219\u662f\u4f20\u7edf\u65b9\u6cd5\uff0c\u9002\u7528\u4e8e\u67d0\u4e9b\u9700\u8981\u5e76\u884c\u8ba1\u7b97\u7684\u573a\u666f\u3002<strong>\u591a\u8def\u590d\u7528\u6280\u672f<\/strong>\u9002\u7528\u4e8e\u9700\u8981\u540c\u65f6\u5904\u7406\u591a\u4e2aI\/O\u4e8b\u4ef6\u7684\u573a\u5408\u3002\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6027\u80fd\u548c\u54cd\u5e94\u80fd\u529b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u975e\u963b\u585e\u7f16\u7a0b\u5728Python\u4e2d\u6709\u4ec0\u4e48\u4f18\u52bf\uff1f<\/strong><br \/>\u975e\u963b\u585e\u7f16\u7a0b\u5141\u8bb8\u7a0b\u5e8f\u5728\u7b49\u5f85\u67d0\u4e9b\u64cd\u4f5c\uff08\u5982I\/O\u64cd\u4f5c\uff09\u5b8c\u6210\u65f6\u7ee7\u7eed\u6267\u884c\u5176\u4ed6\u4efb\u52a1\uff0c\u8fd9\u79cd\u65b9\u5f0f\u63d0\u5347\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6548\u7387\u548c\u54cd\u5e94\u80fd\u529b\u3002\u901a\u8fc7\u975e\u963b\u585e\u6a21\u5f0f\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u540c\u65f6\u5904\u7406\u591a\u4e2a\u4efb\u52a1\uff0c\u5c24\u5176\u5728\u7f51\u7edc\u670d\u52a1\u548c\u591a\u7528\u6237\u73af\u5883\u4e2d\uff0c\u80fd\u591f\u663e\u8457\u63d0\u9ad8\u7cfb\u7edf\u7684\u6027\u80fd\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u975e\u963b\u585eI\/O\uff1f<\/strong><br \/>Python\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<code>asyncio<\/code>\u5e93\u6765\u5b9e\u73b0\u975e\u963b\u585eI\/O\u3002\u8be5\u5e93\u63d0\u4f9b\u4e86\u5f02\u6b65\u7f16\u7a0b\u7684\u5de5\u5177\uff0c\u4f7f\u5f97\u53ef\u4ee5\u5728\u4e0d\u963b\u585e\u4e3b\u7ebf\u7a0b\u7684\u60c5\u51b5\u4e0b\u8fdb\u884cI\/O\u64cd\u4f5c\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>selectors<\/code>\u6a21\u5757\u6765\u5b9e\u73b0\u57fa\u4e8e\u4e8b\u4ef6\u7684\u975e\u963b\u585eI\/O\uff0c\u5141\u8bb8\u7a0b\u5e8f\u5728\u6570\u636e\u51c6\u5907\u597d\u65f6\u518d\u8fdb\u884c\u5904\u7406\uff0c\u8fd9\u6837\u53ef\u4ee5\u6709\u6548\u7ba1\u7406\u591a\u4e2a\u8fde\u63a5\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u4f7f\u7528\u591a\u7ebf\u7a0b\u5b9e\u73b0\u975e\u963b\u585e\u7684\u6700\u4f73\u5b9e\u8df5\u6709\u54ea\u4e9b\uff1f<\/strong><br \/>\u5229\u7528<code>threading<\/code>\u6a21\u5757\u53ef\u4ee5\u521b\u5efa\u591a\u4e2a\u7ebf\u7a0b\u6765\u6267\u884c\u4e0d\u540c\u7684\u4efb\u52a1\uff0c\u4ece\u800c\u5b9e\u73b0\u975e\u963b\u585e\u64cd\u4f5c\u3002\u5728\u8bbe\u8ba1\u591a\u7ebf\u7a0b\u7a0b\u5e8f\u65f6\uff0c\u786e\u4fdd\u7ebf\u7a0b\u5b89\u5168\u662f\u81f3\u5173\u91cd\u8981\u7684\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u9501\uff08Lock\uff09\u673a\u5236\u6765\u907f\u514d\u6570\u636e\u7ade\u4e89\u3002\u6b64\u5916\uff0c\u5408\u7406\u8bbe\u7f6e\u7ebf\u7a0b\u7684\u6570\u91cf\uff0c\u4ee5\u907f\u514d\u56e0\u8fc7\u591a\u7ebf\u7a0b\u800c\u5bfc\u81f4\u7684\u4e0a\u4e0b\u6587\u5207\u6362\u5f00\u9500\uff0c\u4e5f\u662f\u63d0\u9ad8\u7a0b\u5e8f\u6027\u80fd\u7684\u5173\u952e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u5b9e\u73b0\u975e\u963b\u585e\u64cd\u4f5c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528\u5f02\u6b65\u7f16\u7a0b\u3001\u7ebf\u7a0b\u548c\u8fdb\u7a0b\u3001\u591a\u8def\u590d\u7528\u6280\u672f\u3002\u5176\u4e2d\uff0c\u5f02\u6b65\u7f16\u7a0b\u662f\u8fd1\u5e74 [&hellip;]","protected":false},"author":3,"featured_media":984768,"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\/984759"}],"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=984759"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/984759\/revisions"}],"predecessor-version":[{"id":984769,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/984759\/revisions\/984769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/984768"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=984759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=984759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=984759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}