{"id":977937,"date":"2024-12-27T06:33:41","date_gmt":"2024-12-26T22:33:41","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/977937.html"},"modified":"2024-12-27T06:33:43","modified_gmt":"2024-12-26T22:33:43","slug":"c-%e8%b0%83%e7%94%a8python%e5%a6%82%e4%bd%95%e6%89%93%e5%8c%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/977937.html","title":{"rendered":"c \u8c03\u7528python\u5982\u4f55\u6253\u5305"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24203144\/fac615d7-f964-4325-a3dd-93f91c4307e6.webp\" alt=\"c \u8c03\u7528python\u5982\u4f55\u6253\u5305\" \/><\/p>\n<p><p> <strong>\u8981\u5728C\u8bed\u8a00\u4e2d\u8c03\u7528Python\u4ee3\u7801\u5e76\u5c06\u5176\u6253\u5305\uff0c\u53ef\u4ee5\u4f7f\u7528\u5d4c\u5165\u5f0fPython\u89e3\u91ca\u5668\u3001\u4f7f\u7528Python\u7684C API\u3001\u521b\u5efa\u5171\u4eab\u5e93\u6216\u4f7f\u7528SWIG\u7b49\u5de5\u5177\u3002\u4f7f\u7528\u5d4c\u5165\u5f0fPython\u89e3\u91ca\u5668\u53ef\u4ee5\u4f7fC\u7a0b\u5e8f\u76f4\u63a5\u8fd0\u884cPython\u811a\u672c\u3001Python\u7684C API\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u63a5\u53e3\u6765\u8c03\u7528Python\u4ee3\u7801\u3001\u521b\u5efa\u5171\u4eab\u5e93\u53ef\u4ee5\u8ba9C\u7a0b\u5e8f\u8c03\u7528Python\u7684\u6a21\u5757\u6216\u51fd\u6570\u3001SWIG\u53ef\u4ee5\u81ea\u52a8\u751f\u6210\u63a5\u53e3\u4ee3\u7801\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u8fdb\u884c\u6253\u5305\u548c\u8c03\u7528\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5d4c\u5165\u5f0fPython\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>\u5d4c\u5165\u5f0fPython\u89e3\u91ca\u5668\u662f\u4e00\u79cd\u76f4\u63a5\u5728C\u7a0b\u5e8f\u4e2d\u8fd0\u884cPython\u811a\u672c\u7684\u65b9\u5f0f\u3002\u8fd9\u79cd\u65b9\u5f0f\u7684\u6838\u5fc3\u662f\u901a\u8fc7Python\u7684C API\uff0c\u5c06Python\u89e3\u91ca\u5668\u5d4c\u5165\u5230C\u7a0b\u5e8f\u4e2d\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5b9e\u73b0\u5d4c\u5165\u5f0fPython\u89e3\u91ca\u5668\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521d\u59cb\u5316Python\u89e3\u91ca\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728C\u7a0b\u5e8f\u4e2d\u8c03\u7528Python\u811a\u672c\u7684\u7b2c\u4e00\u6b65\u662f\u521d\u59cb\u5316Python\u89e3\u91ca\u5668\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>Py_Initialize()<\/code>\u51fd\u6570\u5b9e\u73b0\u3002\u4e00\u65e6\u89e3\u91ca\u5668\u521d\u59cb\u5316\u5b8c\u6210\uff0c\u60a8\u5c31\u53ef\u4ee5\u6267\u884cPython\u4ee3\u7801\u4e86\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6267\u884cPython\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u60a8\u53ef\u4ee5\u4f7f\u7528<code>PyRun_SimpleString()<\/code>\u51fd\u6570\u6765\u6267\u884cPython\u4ee3\u7801\u3002\u8fd9\u4e2a\u51fd\u6570\u63a5\u53d7\u4e00\u4e2a\u5b57\u7b26\u4e32\u5f62\u5f0f\u7684Python\u4ee3\u7801\u5e76\u6267\u884c\u5b83\u3002\u4e3a\u4e86\u66f4\u590d\u6742\u7684\u64cd\u4f5c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>PyRun_String()<\/code>\u51fd\u6570\uff0c\u5b83\u53ef\u4ee5\u4ece\u6587\u4ef6\u3001\u5b57\u7b26\u4e32\u6216\u5176\u4ed6\u5bf9\u8c61\u4e2d\u6267\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5173\u95edPython\u89e3\u91ca\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5b8c\u6210\u6240\u6709\u7684Python\u4ee3\u7801\u6267\u884c\u4e4b\u540e\uff0c\u60a8\u9700\u8981\u5173\u95edPython\u89e3\u91ca\u5668\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>Py_FinalizeEx()<\/code>\u51fd\u6570\u6765\u5b8c\u6210\u3002\u8fd9\u4e2a\u6b65\u9aa4\u662f\u4e3a\u4e86\u786e\u4fddPython\u89e3\u91ca\u5668\u7684\u6e05\u7406\u5de5\u4f5c\u5df2\u7ecf\u5b8c\u6210\uff0c\u9632\u6b62\u8d44\u6e90\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528Python\u7684C API<\/p>\n<\/p>\n<p><p>Python\u7684C API\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\u96c6\uff0c\u5141\u8bb8C\u7a0b\u5e8f\u4e0ePython\u4ee3\u7801\u8fdb\u884c\u4ea4\u4e92\u3002\u901a\u8fc7C API\uff0c\u60a8\u53ef\u4ee5\u5728C\u7a0b\u5e8f\u4e2d\u8c03\u7528Python\u51fd\u6570\u3001\u64cd\u4f5cPython\u5bf9\u8c61\u7b49\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u7684C API\u7684\u4e00\u4e9b\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5f15\u5165Python\u5934\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u60a8\u7684C\u4ee3\u7801\u4e2d\uff0c\u60a8\u9700\u8981\u5f15\u5165Python\u5934\u6587\u4ef6\u3002\u901a\u5e38\u8fd9\u53ef\u4ee5\u901a\u8fc7<code>#include &lt;Python.h&gt;<\/code>\u6765\u5b8c\u6210\u3002\u8fd9\u4e2a\u5934\u6587\u4ef6\u5305\u542b\u4e86\u6240\u6709\u9700\u8981\u7684C API\u51fd\u6570\u548c\u6570\u636e\u7ed3\u6784\u7684\u5b9a\u4e49\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8c03\u7528Python\u51fd\u6570<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528C API\uff0c\u60a8\u53ef\u4ee5\u8c03\u7528Python\u51fd\u6570\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u60f3\u8c03\u7528\u4e00\u4e2aPython\u51fd\u6570\uff0c\u60a8\u53ef\u4ee5\u5148\u901a\u8fc7<code>PyImport_ImportModule()<\/code>\u5bfc\u5165Python\u6a21\u5757\uff0c\u7136\u540e\u4f7f\u7528<code>PyObject_GetAttrString()<\/code>\u83b7\u53d6Python\u51fd\u6570\u5bf9\u8c61\uff0c\u6700\u540e\u4f7f\u7528<code>PyObject_CallObject()<\/code>\u6765\u8c03\u7528\u8be5\u51fd\u6570\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406Python\u5bf9\u8c61<\/strong><\/p>\n<\/p>\n<p><p>Python\u7684C API\u63d0\u4f9b\u4e86\u8bb8\u591a\u51fd\u6570\u6765\u521b\u5efa\u3001\u8f6c\u6362\u548c\u64cd\u4f5cPython\u5bf9\u8c61\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>PyLong_FromLong()<\/code>\u521b\u5efa\u4e00\u4e2aPython\u6574\u6570\u5bf9\u8c61\uff0c\u6216\u4f7f\u7528<code>PyObject_AsCharBuffer()<\/code>\u5c06Python\u5b57\u7b26\u4e32\u5bf9\u8c61\u8f6c\u6362\u4e3aC\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u521b\u5efa\u5171\u4eab\u5e93<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u5c06Python\u4ee3\u7801\u7f16\u8bd1\u4e3a\u5171\u4eab\u5e93\uff0c\u60a8\u53ef\u4ee5\u5728C\u7a0b\u5e8f\u4e2d\u8c03\u7528\u8fd9\u4e9b\u5e93\u6765\u5b9e\u73b0Python\u4ee3\u7801\u7684\u529f\u80fd\u3002\u4ee5\u4e0b\u662f\u521b\u5efa\u5171\u4eab\u5e93\u7684\u4e00\u4e9b\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7f16\u5199Python\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u7f16\u5199\u4e00\u4e2aPython\u6a21\u5757\u3002\u8fd9\u53ef\u4ee5\u662f\u4e00\u4e2a\u5305\u542b\u51fd\u6570\u548c\u7c7b\u7684Python\u6587\u4ef6\u3002\u786e\u4fdd\u60a8\u7684\u6a21\u5757\u8bbe\u8ba1\u826f\u597d\uff0c\u5e76\u4e14\u6bcf\u4e2a\u51fd\u6570\u90fd\u80fd\u72ec\u7acb\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Cython\u6216\u5176\u4ed6\u5de5\u5177\u7f16\u8bd1Python\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u60a8\u53ef\u4ee5\u4f7f\u7528Cython\u5c06Python\u6a21\u5757\u7f16\u8bd1\u4e3aC\u4ee3\u7801\uff0c\u7136\u540e\u4f7f\u7528C\u7f16\u8bd1\u5668\u5c06\u5176\u7f16\u8bd1\u4e3a\u5171\u4eab\u5e93\u3002Cython\u5141\u8bb8\u60a8\u5728Python\u4ee3\u7801\u4e2d\u63d2\u5165C\u4ee3\u7801\uff0c\u8fd9\u6709\u52a9\u4e8e\u63d0\u9ad8\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5728C\u7a0b\u5e8f\u4e2d\u52a0\u8f7d\u5171\u4eab\u5e93<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u60a8\u7684C\u7a0b\u5e8f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>dlopen()<\/code>\u6216\u5176\u4ed6\u76f8\u5173\u51fd\u6570\u6765\u52a0\u8f7d\u5171\u4eab\u5e93\uff0c\u5e76\u4f7f\u7528<code>dlsym()<\/code>\u6765\u83b7\u53d6\u5e93\u4e2d\u7684\u51fd\u6570\u6307\u9488\uff0c\u6700\u540e\u901a\u8fc7\u8c03\u7528\u8fd9\u4e9b\u51fd\u6570\u6307\u9488\u6765\u6267\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u4f7f\u7528SWIG<\/p>\n<\/p>\n<p><p>SWIG\uff08Simplified Wrapper and Interface Generator\uff09\u662f\u4e00\u79cd\u5de5\u5177\uff0c\u53ef\u4ee5\u81ea\u52a8\u751f\u6210C\u4e0ePython\u4e4b\u95f4\u7684\u63a5\u53e3\u4ee3\u7801\u3002\u8fd9\u4f7f\u5f97\u5728C\u7a0b\u5e8f\u4e2d\u8c03\u7528Python\u4ee3\u7801\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528SWIG\u7684\u4e00\u4e9b\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7f16\u5199\u63a5\u53e3\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u4e3aPython\u6a21\u5757\u7f16\u5199\u4e00\u4e2aSWIG\u63a5\u53e3\u6587\u4ef6\u3002\u8be5\u6587\u4ef6\u63cf\u8ff0\u4e86C\u51fd\u6570\u548c\u6570\u636e\u7ed3\u6784\u7684\u63a5\u53e3\uff0c\u8fd9\u4e9b\u63a5\u53e3\u5c06\u66b4\u9732\u7ed9Python\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cSWIG\u751f\u6210\u63a5\u53e3\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528SWIG\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u4ece\u63a5\u53e3\u6587\u4ef6\u751f\u6210C\u548cPython\u63a5\u53e3\u4ee3\u7801\u3002SWIG\u4f1a\u81ea\u52a8\u751f\u6210\u6240\u6709\u5fc5\u8981\u7684\u4ee3\u7801\uff0c\u4ee5\u4fbf\u5728C\u7a0b\u5e8f\u548cPython\u4ee3\u7801\u4e4b\u95f4\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u8bd1\u751f\u6210\u7684\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528C\u7f16\u8bd1\u5668\u7f16\u8bd1\u751f\u6210\u7684C\u4ee3\u7801\uff0c\u5e76\u5c06\u5176\u4e0ePython\u89e3\u91ca\u5668\u94fe\u63a5\u3002\u5728Python\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5bfc\u5165\u751f\u6210\u7684\u6a21\u5757\u5e76\u8c03\u7528C\u51fd\u6570\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728C\u8bed\u8a00\u4e2d\u8c03\u7528Python\u4ee3\u7801\u5e76\u5c06\u5176\u6253\u5305\u662f\u4e00\u9879\u590d\u6742\u4f46\u6709\u8da3\u7684\u4efb\u52a1\u3002\u901a\u8fc7\u5d4c\u5165Python\u89e3\u91ca\u5668\u3001\u4f7f\u7528Python\u7684C API\u3001\u521b\u5efa\u5171\u4eab\u5e93\u6216\u4f7f\u7528SWIG\u7b49\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u70b9\u548c\u7f3a\u70b9\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u60a8\u90fd\u9700\u8981\u4ed4\u7ec6\u8003\u8651Python\u548cC\u4e4b\u95f4\u7684\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u3001\u5185\u5b58\u7ba1\u7406\u548c\u6027\u80fd\u95ee\u9898\u3002\u901a\u8fc7\u5bf9\u8fd9\u4e9b\u65b9\u9762\u7684\u6df1\u5165\u7406\u89e3\uff0c\u60a8\u53ef\u4ee5\u6210\u529f\u5730\u5728C\u8bed\u8a00\u4e2d\u8c03\u7528Python\u4ee3\u7801\uff0c\u5e76\u5728\u9879\u76ee\u4e2d\u5145\u5206\u5229\u7528\u8fd9\u4e24\u79cd\u8bed\u8a00\u7684\u4f18\u52bf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728C\u7a0b\u5e8f\u4e2d\u8c03\u7528Python\u811a\u672c\uff1f<\/strong><br \/>\u5728C\u7a0b\u5e8f\u4e2d\u8c03\u7528Python\u811a\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684C API\u3002\u60a8\u9700\u8981\u5728C\u4ee3\u7801\u4e2d\u5305\u542bPython.h\u5934\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528Py_Initialize()\u6765\u521d\u59cb\u5316Python\u89e3\u91ca\u5668\u3002\u901a\u8fc7PyImport_ImportModule()\u52a0\u8f7dPython\u6a21\u5757\uff0c\u4f7f\u7528PyObject_CallMethod()\u8c03\u7528\u7279\u5b9a\u51fd\u6570\u3002\u786e\u4fdd\u5728\u7f16\u8bd1\u65f6\u94fe\u63a5Python\u5e93\u3002<\/p>\n<p><strong>\u6253\u5305C\u8c03\u7528Python\u7684\u7a0b\u5e8f\u9700\u8981\u8003\u8651\u54ea\u4e9b\u4f9d\u8d56\uff1f<\/strong><br \/>\u5728\u6253\u5305C\u8c03\u7528Python\u7684\u7a0b\u5e8f\u65f6\uff0c\u9700\u8981\u786e\u4fdd\u6240\u6709\u4f9d\u8d56\u7684\u5e93\u90fd\u88ab\u6b63\u786e\u5305\u542b\u3002\u8fd9\u5305\u62ecPython\u89e3\u91ca\u5668\u672c\u8eab\u3001\u76f8\u5173\u7684Python\u5e93\u4ee5\u53caC\u7a0b\u5e8f\u6240\u9700\u7684\u4efb\u4f55\u5176\u4ed6\u52a8\u6001\u94fe\u63a5\u5e93\uff08.dll\u6216.so\u6587\u4ef6\uff09\u3002\u4f7f\u7528\u5de5\u5177\u5982CMake\u6216\u8005Makefile\u53ef\u4ee5\u5e2e\u52a9\u7ba1\u7406\u8fd9\u4e9b\u4f9d\u8d56\u5173\u7cfb\uff0c\u5e76\u786e\u4fdd\u5728\u4e0d\u540c\u73af\u5883\u4e2d\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u90e8\u7f72C\u8c03\u7528Python\u7684\u5e94\u7528\u7a0b\u5e8f\uff1f<\/strong><br \/>\u90e8\u7f72C\u8c03\u7528Python\u7684\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u53ef\u80fd\u9700\u8981\u4e0d\u540c\u7684\u6253\u5305\u7b56\u7565\u3002\u5728Windows\u4e0a\uff0c\u901a\u5e38\u4f7f\u7528\u53ef\u6267\u884c\u6587\u4ef6\u548cDLL\u6587\u4ef6\uff0c\u800c\u5728Linux\u4e0a\u5219\u53ef\u80fd\u9700\u8981\u5171\u4eab\u5e93\uff08.so\u6587\u4ef6\uff09\u3002\u786e\u4fdd\u5728\u6bcf\u4e2a\u5e73\u53f0\u4e0a\u6d4b\u8bd5\u7a0b\u5e8f\u7684\u517c\u5bb9\u6027\uff0c\u5e76\u8003\u8651\u4f7f\u7528Docker\u7b49\u5bb9\u5668\u6280\u672f\uff0c\u4ee5\u7b80\u5316\u8de8\u5e73\u53f0\u7684\u90e8\u7f72\u548c\u73af\u5883\u914d\u7f6e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728C\u8bed\u8a00\u4e2d\u8c03\u7528Python\u4ee3\u7801\u5e76\u5c06\u5176\u6253\u5305\uff0c\u53ef\u4ee5\u4f7f\u7528\u5d4c\u5165\u5f0fPython\u89e3\u91ca\u5668\u3001\u4f7f\u7528Python\u7684C API\u3001\u521b [&hellip;]","protected":false},"author":3,"featured_media":977946,"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\/977937"}],"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=977937"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/977937\/revisions"}],"predecessor-version":[{"id":977948,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/977937\/revisions\/977948"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/977946"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=977937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=977937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=977937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}