{"id":55443,"date":"2025-08-13T22:25:08","date_gmt":"2025-08-13T14:25:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/55443.html"},"modified":"2025-08-13T22:25:08","modified_gmt":"2025-08-13T14:25:08","slug":"fastapi%e5%88%9d%e6%ac%a1%e5%85%a5%e9%97%a8%ef%bc%882025-08-11%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/55443.html","title":{"rendered":"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09"},"content":{"rendered":"<p>2025-08-11\u521d\u6b21\u4e86\u89e3<br \/>\n2025-08-12\u589e\u52a0\u4e86async\u548capirouter\u548c\u6570\u636e\u6821\u9a8c<br \/>\n2025-08-13\u66f4\u65b0\u4e86 url\u4e2d\u7684 path query\u53c2\u6570\u83b7\u53d6,\u6dfb\u52a0architecture<\/p>\n<h2>\u4e00\u4e2a\u5178\u578b\u7684fastapi\u9879\u76ee\u7684architecture<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142445-689ca02d6f501.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4e4b\u524d\u7528\u8fc7django\u3001flask&#xff0c;\u60f3\u7740\u4e0d\u7528\u5b66\u4e60fastapi\u5427&#xff0c;\u53ef\u662f\u7a81\u7136\u6709\u4e00\u5929&#xff0c;\u4e5f\u8bb8\u5c31\u662f\u4eca\u5929&#xff0c;\u5927\u6a21\u578b\u7ed9\u751f\u6210\u7684\u4ee3\u7801\u7adf\u7136\u76f4\u63a5\u662ffastapi\u7684\u4e86&#xff0c;\u8fd9\u65f6\u5019\u4e0d\u4e86\u89e3\u4e5f\u4e0d\u884c\u4e86\u3002<\/p>\n<p>fastapi\u6709\u5982\u4e0b\u7279\u70b9&#xff1a;<br \/>\n1\u3001\u81ea\u5e26swagger\u7684openapi<br \/>\n2\u3001\u53ef\u4ee5\u4f7f\u7528async\u5b9a\u4e49\u7684\u8def\u7531\u51fd\u6570<br \/>\n3\u3001APIRouter\u7c7b\u4f3c\u4e8eflask blueprint<br \/>\n4\u3001\u6570\u636e\u6a21\u578b\u89e3\u6790\u548c\u6821\u9a8c<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142448-689ca0303f74a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>uvicorn main:app &#8211;reload<\/p>\n<p>fastapi\u770b\u8d77\u6765\u548cflask\u5f88\u7c7b\u4f3c&#xff0c;\u4ee4\u6211\u6709\u70b9\u7591\u60d1\u7684\u5c31\u662fasync\u4e86\u3002<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142449-689ca03171d38.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>fasatapi how-to?<\/h2>\n<h3>\u5982\u4f55\u83b7\u53d6url path\u53c2\u6570&#xff1f;<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142451-689ca03309b17.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u5982\u4f55\u83b7\u53d6url query\u53c2\u6570&#xff1f;<\/h3>\n<p>\u622a\u56fe\u4e2d\u7684user_message\u5c31\u662fquery\u53c2\u6570<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142451-689ca033a9fac.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u5982\u4f55\u83b7\u53d6Form\u6570\u636e&#xff1f;<\/h3>\n<p>from fastapi import Form<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142451-689ca033e6942.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u7279\u6027&#xff1a;async<\/h2>\n<p>\u4ece\u6765\u6ca1\u6709\u4f7f\u7528\u8fc7fastapi\u7684\u4eba&#xff0c;\u4e00\u5b9a\u4f1a\u8be7\u5f02async def\u5b9a\u4e49\u7684\u8def\u7531\u51fd\u6570&#xff0c;\u4e3a\u4ec0\u4e48\u8981\u5728def\u524d\u9762\u52a0\u4e0a\u4e00\u4e2aasync\u5462&#xff1f;\u5176\u5b9e\u8fd9\u4e2aasync\u6b63\u597d\u662ffastapi\u7684\u7cbe\u534e\u3002<\/p>\n<h2>\u7279\u6027&#xff1a;\u81ea\u5e26swagger<\/h2>\n<p>http:\/\/127.0.0.1:8000\/docs#\/<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142452-689ca0346626d.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>uvicorn main:app &#8211;reload<\/h2>\n<h2>def vs async<\/h2>\n<p>\u540c\u6b65\u7684\u8def\u7531\u51fd\u6570\u4f1a\u88ab\u653e\u5230\u7ebf\u7a0b\u6c60\u4e2d\u8fd0\u884c&#xff0c;\u4f46\u7ebf\u7a0b\u6570\u6709\u9650&#xff0c;\u8fd9\u79cd\u5199\u6cd5\u53ef\u4ee5\u7528\u4f46\u4e0d\u63a8\u8350<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142455-689ca0374a90b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\nasync def \u5b9a\u4e49\u7684\u8def\u7531\u51fd\u6570\u4f1a\u8fd0\u884c\u5728\u4e8b\u4ef6\u5faa\u73af\u7ebf\u7a0b<\/p>\n<p><span class=\"token decorator annotation punctuation\">&#064;app<span class=\"token punctuation\">.<\/span>get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/bad&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">async<\/span> <span class=\"token keyword\">def<\/span> <span class=\"token function\">bad_endpoint<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    time<span class=\"token punctuation\">.<\/span>sleep<span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u274c \u540c\u6b65\u963b\u585e, \u7ed3\u679c&#xff1a;\u6574\u4e2a\u4e8b\u4ef6\u5faa\u73af\u88ab\u5361\u4f4f 5 \u79d2&#xff0c;\u65e0\u6cd5\u8c03\u5ea6\u5176\u4ed6\u534f\u7a0b\u3002<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;msg&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;done&#034;<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4f7f\u7528await asyncio.sleep(5)&#xff0c;\u8bbf\u95ee\/demo\u8fd8\u662f5\u79d2\u540e\u624d\u4f1a\u54cd\u5e94&#xff0c;\u4f46\u662f\u4e3b\u7ebf\u7a0b\u4e0d\u4f1a\u88ab\u5b8c\u5168\u963b\u585e&#xff0c;\u4e3b\u7ebf\u7a0b\u8fd8\u4f1a\u53bb\u5904\u7406\u5176\u4ed6\u8c03\u7528\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142457-689ca039dd48e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>await \u4e0d\u662f\u201c\u540e\u53f0\u8fd0\u884c\u201d&#xff0c;\u800c\u662f\u201c\u6302\u8d77&#043;\u6062\u590d\u201d<\/p>\n<p>\u274c \u9519\u8bef\u7406\u89e3&#xff1a;await \u662f\u201c\u542f\u52a8\u4e00\u4e2a\u540e\u53f0\u4efb\u52a1&#xff0c;\u7136\u540e\u7ee7\u7eed\u201d<\/p>\n<p>\u2705 \u6b63\u786e\u7406\u89e3&#xff1a;await \u662f\u201c\u6211\u5728\u8fd9\u91cc\u7b49&#xff0c;\u4f46\u6211\u5141\u8bb8\u522b\u4eba\u5148\u8fd0\u884c&#xff0c;\u7b49\u5b8c\u4e86\u6211\u518d\u7ee7\u7eed\u201d<\/p>\n<h2>fastapi\u4e2d\u7684APIRouter\u7c7b\u4f3c\u4e8eflask\u4e2d\u7684blueprint<\/h2>\n<p><span class=\"token keyword\">from<\/span> fastapi <span class=\"token keyword\">import<\/span> APIRouter<\/p>\n<p>router <span class=\"token operator\">&#061;<\/span> APIRouter<span class=\"token punctuation\">(<\/span>prefix<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/v2&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token decorator annotation punctuation\">&#064;router<span class=\"token punctuation\">.<\/span>get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/info&#034;<\/span><span class=\"token punctuation\">,<\/span> response_class<span class=\"token operator\">&#061;<\/span>JSONResponse<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">async<\/span> <span class=\"token keyword\">def<\/span> <span class=\"token function\">v2_info<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">import<\/span> asyncio<br \/>\n    <span class=\"token keyword\">await<\/span> asyncio<span class=\"token punctuation\">.<\/span>sleep<span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> JSONResponse<span class=\"token punctuation\">(<\/span>content<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;message&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;This is a v2 info endpoint.&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>app<span class=\"token punctuation\">.<\/span>include_router<span class=\"token punctuation\">(<\/span>router<span class=\"token punctuation\">)<\/span><\/p>\n<h2>fastapi\u7684\u6570\u636e\u6a21\u578b\u89e3\u6790<\/h2>\n<p>class Item(BaseModel):<br \/>\nname: str<\/p>\n<p>&#064;router.post(\u201c\/items\/\u201d, response_class&#061;JSONResponse)<br \/>\nasync def create_item(item: Item):<br \/>\n# item to json<br \/>\nitem_json &#061; item.model_dump_json()<br \/>\nprint(f&#034;Received item: {item_json}&#034;)<\/p>\n<p>return JSONResponse(content&#061;{&#034;message&#034;: &#034;Item created successfully&#034;, &#034;item&#034;: item_json})<\/p>\n<p>\u9ed8\u8ba4\u884c\u4e3a&#xff1a;Pydantic \u6a21\u578b\u53ea\u4ece JSON \u89e3\u6790&#xff0c;\u4e5f\u5c31\u662f\u8bf4\u524d\u7aef\u8981\u4f7f\u7528application\/json<\/p>\n<hr \/>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142458-689ca03a9c234.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\nfastapi vs django vs flask&#xff0c; which one is the better one? please don\u2019t care about it, just choose one ,and write your code.<\/p>\n<h2>python types<\/h2>\n<p>https:\/\/fastapi.tiangolo.com\/python-types\/<\/p>\n<hr \/>\n<p>\u5b66\u4e60fastapi\u7684\u53e6\u4e00\u4e2a\u76ee\u7684\u5c31\u662f\u4f5c\u4e3alangchain\\\\langgraph\u7684\u6258\u7ba1\u8005&#xff0c;\u770bgithub\u4e0a\u9762\u6709\u51e0\u4e2a\u811a\u624b\u67b6&#xff0c;\u540e\u9762\u4e5f\u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b<\/p>\n<p>https:\/\/github.com\/wassim249\/fastapi-langgraph-agent-production-ready-template<br \/>\nhttps:\/\/github.com\/JoshuaC215\/agent-service-toolkit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb403\u6b21\u3002\u6458\u8981\uff1a\u4f5c\u8005\u539f\u672c\u719f\u6089Django\u548cFlask\uff0c\u8ba4\u4e3a\u65e0\u9700\u5b66\u4e60FastAPI\uff0c\u4f46\u53d1\u73b0AI\u751f\u6210\u7684\u4ee3\u7801\u5df2\u8f6c\u5411FastAPI\uff0c\u4e0d\u5f97\u4e0d\u63a5\u89e6\u3002FastAPI\u4e0eFlask\u7c7b\u4f3c\uff0c\u4f46\u5f02\u6b65(async)\u7279\u6027\u5e26\u6765\u65b0\u7684\u5b66\u4e60\u70b9\u3002<\/p>\n","protected":false},"author":2,"featured_media":55433,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[72,81],"topic":[],"class_list":["post-55443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-fastapi","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/55443.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb403\u6b21\u3002\u6458\u8981\uff1a\u4f5c\u8005\u539f\u672c\u719f\u6089Django\u548cFlask\uff0c\u8ba4\u4e3a\u65e0\u9700\u5b66\u4e60FastAPI\uff0c\u4f46\u53d1\u73b0AI\u751f\u6210\u7684\u4ee3\u7801\u5df2\u8f6c\u5411FastAPI\uff0c\u4e0d\u5f97\u4e0d\u63a5\u89e6\u3002FastAPI\u4e0eFlask\u7c7b\u4f3c\uff0c\u4f46\u5f02\u6b65(async)\u7279\u6027\u5e26\u6765\u65b0\u7684\u5b66\u4e60\u70b9\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/55443.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-13T14:25:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142445-689ca02d6f501.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55443.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/55443.html\",\"name\":\"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-13T14:25:08+00:00\",\"dateModified\":\"2025-08-13T14:25:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/55443.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/55443.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55443.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/55443.html","og_locale":"zh_CN","og_type":"article","og_title":"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb403\u6b21\u3002\u6458\u8981\uff1a\u4f5c\u8005\u539f\u672c\u719f\u6089Django\u548cFlask\uff0c\u8ba4\u4e3a\u65e0\u9700\u5b66\u4e60FastAPI\uff0c\u4f46\u53d1\u73b0AI\u751f\u6210\u7684\u4ee3\u7801\u5df2\u8f6c\u5411FastAPI\uff0c\u4e0d\u5f97\u4e0d\u63a5\u89e6\u3002FastAPI\u4e0eFlask\u7c7b\u4f3c\uff0c\u4f46\u5f02\u6b65(async)\u7279\u6027\u5e26\u6765\u65b0\u7684\u5b66\u4e60\u70b9\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/55443.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-13T14:25:08+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813142445-689ca02d6f501.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/55443.html","url":"https:\/\/www.wsisp.com\/helps\/55443.html","name":"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-13T14:25:08+00:00","dateModified":"2025-08-13T14:25:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/55443.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/55443.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/55443.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"fastapi\u521d\u6b21\u5165\u95e8\uff082025-08-11\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/55443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=55443"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/55443\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/55433"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=55443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=55443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=55443"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=55443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}