{"id":344353,"date":"2021-02-11T04:05:10","date_gmt":"2021-02-10T20:05:10","guid":{"rendered":"http:\/\/4563.org\/?p=344353"},"modified":"2021-02-11T04:05:10","modified_gmt":"2021-02-10T20:05:10","slug":"fastapi-%e7%8e%a9%e8%85%bb%e4%ba%86%ef%bc%8c%e5%85%a8%e5%bc%82%e6%ad%a5%e3%80%81%e6%b3%a8%e8%a7%a3%e5%bc%8f%e3%80%81%e6%94%af%e6%8c%81-openapi%e3%80%81%e5%b8%a6%e5%8f%82%e6%95%b0%e9%aa%8c%e8%af%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=344353","title":{"rendered":"FastAPI \u73a9\u817b\u4e86\uff0c\u5168\u5f02\u6b65\u3001\u6ce8\u89e3\u5f0f\u3001\u652f\u6301 OpenAPI\u3001\u5e26\u53c2\u6570\u9a8c\u8bc1\u7684\u6846\u67b6\u8fd8\u6709\u5565\uff0c\u4e0d\u9650\u8bed\u8a00"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  FastAPI \u73a9\u817b\u4e86\uff0c\u5168\u5f02\u6b65\u3001\u6ce8\u89e3\u5f0f\u3001\u652f\u6301 OpenAPI\u3001\u5e26\u53c2\u6570\u9a8c\u8bc1\u7684\u6846\u67b6\u8fd8\u6709\u5565\uff0c\u4e0d\u9650\u8bed\u8a00               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wdhwg001 <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5982\u9898\uff0c\u6700\u8fd1\u4e00\u76f4\u5728\u5199 FastAPI\uff0c\u6709\u70b9\u817b\u4e86\uff0c\u60f3\u79c1\u5e95\u4e0b\u73a9\u70b9\u65b0\u7684\uff0c\u4e5f\u60f3\u62d3\u5bbd\u4e00\u4e0b\u89c6\u91ce\u3002<\/p>\n<p>\u4e0d\u9650\u8bed\u8a00\u7684\u8bdd\uff0c\u8fd8\u6709\u54ea\u4e2a Web \u6846\u67b6\u53ef\u4ee5\u505a\u5230\uff1a<\/p>\n<ul>\n<li>\u5168 Async \/ Await\uff0c\u7528\u540c\u6b65\u7684\u5199\u6cd5\u5199\u5f02\u6b65<\/li>\n<li>Annotation \u5f0f\u7684 API \u58f0\u660e\u5199\u6cd5\uff0c\u8fd9\u4e2a\u662f\u4e2a\u4eba\u7231\u597d\uff0c\u4e0d\u559c\u6b22\u96c6\u4e2d\u5f0f\u7684\u8def\u7531<\/li>\n<li>\u652f\u6301\u81ea\u52a8\u751f\u6210 OpenAPI \u8fdb\u884c\u8c03\u8bd5<\/li>\n<li>\u4f9d\u8d56\u6ce8\u5165\u5f0f\u7684\u53c2\u6570\uff0c\u81ea\u52a8\u9a8c\u8bc1\u8fdb\u5165 API \u7684\u8bf7\u6c42<\/li>\n<li>\u6700\u597d\u6709\u5168\u5f02\u6b65\u7684 ORM\uff0cFastAPI \u91cc\u6211\u7528\u7684\u662f Tortoise-ORM\uff0c\u901a\u8baf\u5c42\u662f\u5f02\u6b65\u7684\uff0c\u800c\u4e0d\u662f\u540c\u6b65\u7ebf\u7a0b\u6c60\u3002<\/li>\n<li>\u6700\u597d\u6027\u80fd\u6bd4 FastAPI \u9ad8\u4e00\u4e9b\uff0c\u66f4\u6162\u7684\u5c31\u4e0d\u8003\u8651\u4e86<\/li>\n<\/ul><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>17<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5307381\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : laike9m <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u81ea\u5df1\u64b8                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307382\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tabris17 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u77e5\u9053\u4e3a\u5565\uff0cPython \u4e0b\u51e0\u4e2a\u53f7\u79f0\u9ad8\u6027\u80fd\u7684 web \u6846\u67b6\uff08 Sanic \u3001FastAPI \uff09\uff0c\u5728 techempower \u8dd1\u5206\u90fd\u4f4e\u5f97\u5413\u4eba                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307383\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jtsai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             .net core                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307384\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wdhwg001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @tabris17 \u672c\u8eab\u8bed\u8a00\u6027\u80fd\u4f4e\u5427\uff0cASGI \u4e5f\u5c31\u6bd4 WSGI \u5feb\u4e00\u500d\u5de6\u53f3\u3002<br \/>\u5012\u662f Spring \u548c Gin \u7684\u8dd1\u5206\u5f88\u4f4e\u8fd9\u4ef6\u4e8b\u8ba9\u6211\u86ee\u60ca\u8bb6\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307385\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wdhwg001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jtsai \u679c\u7136\u5bf9\u6807\u7684\u53ea\u6709 C#\u5417\uff0c\u611f\u89c9\u9999\u662f\u771f\u7684\u9999\uff0c\u4f46\u662f\u56fd\u5185\u4e5f\u786e\u5b9e\u51b7\u95e8\u4e86\u70b9\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307386\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : iConnect <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u73b0\u4ee3\u6846\u67b6\u90fd\u662f\u6709\u6808\u6a21\u5f0f\uff0c\u4e0d\u662f event loop \u6a21\u5f0f\uff0c\u8fd9\u4e24\u5f20\u6a21\u5f0f\u6df7\u5408\uff0c\u5f88\u5bb9\u6613\u641e\u6d46\u7cca\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307387\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shuimugan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             NestJS                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307388\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8981\u4e0d\u4f60\u770b\u770b actix-web \uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307389\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wdhwg001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liuhan907 \u4f46\u662f diesel \u662f\u540c\u6b65\u7ebf\u7a0b\u6c60\u7684\u2026\u5c31\u6709\u70b9\u53ef\u60dc\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307390\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wdhwg001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @iConnect \u6709\u6808\u6a21\u5f0f\u5728 web \u73af\u5883\u4e0b\u6bd4\u4e0d\u8fc7\u65e0\u6808\u5427\uff1f\u6bd5\u7adf web \u573a\u666f\u4e0b io \u5bc6\u96c6\u800c\u8ba1\u7b97\u4e0d\u5bc6\u96c6\uff0c\u6709\u6808\u4f1a\u7834\u574f\u9884\u6d4b\u5e76\u4e14\u9700\u8981\u9891\u7e41\u5207\u6808\u548c\u5206\u914d\u5185\u5b58\u3002<\/p>\n<p>\u4ee5\u53ca\uff0c\u4e3b\u6253\u6709\u6808\u6a21\u5f0f\u7684\u73b0\u4ee3\u8bed\u8a00\u53ea\u6709 go \u6765\u7740\uff1f                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307391\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ericls <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @tabris17 Python \u6846\u67b6\u53ea\u80fd\u5728\u6027\u80fd\u4e0a\u51cf\u5206 \u53ea\u8981\u6709\u6846\u67b6 \u5c31\u6709 overhead \u6027\u80fd\u5e94\u8be5\u662f server \u505a\u7684\u4e8b\u60c5\u3002 \u4f46\u662f\u8fd9\u4e1d\u6beb\u4e0d\u5f71\u54cd\u4f60\u8d5a\u94b1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307392\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ericls <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u81ea\u5df1\u5199\u4e00\u4e2a\u5e94\u8be5\u5f88\u5bb9\u6613 \u53e6\u5916\u5c31\u50cf\u6211\u8bf4\u7684 \u6846\u67b6\u65e0\u5173\u6027\u80fd \u90fd\u662f asgi \u7684 overhead.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307393\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wdhwg001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @shuimugan NestJS \u4e4b\u524d\u8bd5\u7528\u8fc7\uff0c\u4f46\u662f\u73b0\u5728\u770b\u5230\u5b83\u5df2\u7ecf\u8fd9\u4e48\u5b8c\u5584\u4e86\u8fd8\u662f\u6709\u70b9\u60ca\u8bb6\uff0c\u603b\u7684\u6765\u8bf4\u5b83\u7684\u751f\u6001\u73af\u5883\u662f\u6bd4 FastAPI \u66f4\u597d\u7684\u3002<\/p>\n<p>\u529f\u80fd\u65b9\u9762\u6709\u6211\u4e4b\u524d\u5f88\u75db\u70b9\u7684 Session \u652f\u6301\u4e00\u7c7b\u7684\uff0c\u529f\u80fd\u66f4\u5b8c\u6574\u4e00\u4e9b\u3002<\/p>\n<p>\u8dd1\u5206\u65b9\u9762\u5927\u81f4\u6bd4 FastAPI \u9ad8\u7ea6 20%\uff0c\u800c\u4e14\u56e0\u4e3a\u662f V8\uff0c\u6240\u4ee5\u903b\u8f91\u590d\u6742\u4e86\u7684\u8bdd\u6027\u80fd\u4f1a\u7529\u7684\u66f4\u5f00\u4e00\u4e9b\u3002<\/p>\n<p>ORM \u65b9\u9762 TypeORM \u4e5f\u6ee1\u8db3\u9700\u6c42\uff0c\u529f\u80fd\u6bd4 Tortoise-ORM \u66f4\u9f50\u5168\uff0c\u6bd4\u5982\u8fc1\u79fb\u4e00\u7c7b\u7684\u4e5f\u90fd\u6709\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u5acc\u5f03 TypeScript \u5404\u79cd JS \u7684\u667a\u969c\u9057\u4ea7\u90fd\u6709\u8fd9\u4e00\u70b9\u7684\u8bdd\uff0cNestJS \u5df2\u7ecf\u53ef\u4ee5\u76f4\u63a5\u66ff\u4ee3 FastAPI \u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307394\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shuimugan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wdhwg001 NestJS \u6284 Java \u7684 Spring \u90a3\u4e00\u5957\uff0c\u5404\u79cd\u6ce8\u5165\uff0c\u8fd9\u4e9b\u6ce8\u5165\u90fd\u662f\u5355\u4f8b\uff0c\u6240\u4ee5\u6210\u5458\u53d8\u91cf\u4e00\u822c\u4e0d\u4f1a\u505a\u5199\u64cd\u4f5c\u3002\u4f46\u662f\u8fd9\u79cd\u6ce8\u5165\u7684\u73a9\u6cd5\u548c\u76f4\u63a5\u8d70 Class \u7684 static \u51fd\u6570\u8c03\u7528\u6ca1\u5565\u533a\u522b\uff0c\u770b\u4e0d\u51fa\u591a\u6709\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff0c\u76ee\u524d\u770b\u5230\u8fd9\u4e48\u505a\u7684\u597d\u5904\u5c31\u662f\u505a\u5355\u5143\u6d4b\u8bd5\u53ef\u4ee5\u968f\u610f Mock\uff0c\u4ee5\u53ca\u5728\u542f\u52a8\u7684\u65f6\u5019\u9884\u5148\u5b9e\u4f8b\u5316\u5bf9\u8c61\uff0c\u907f\u514d\u6d8c\u8fdb\u6765\u7684\u524d\u51e0\u4e2a\u8bf7\u6c42\u6162\u4e00\u4e22\u4e22\u3002<\/p>\n<p>\u6211\u6700\u8fd1\u624d\u505a\u5b8c\u4e00\u4e2a\u57fa\u4e8e Node \u7684\u4ee3\u7406\u7f51\u5173\u7684\u9009\u578b\uff0c\u53ef\u4ee5\u7ed9\u4e00\u4e9b\u6027\u80fd\u4e0a\u7684\u6570\u636e\u3002<\/p>\n<p>\u73af\u5883\uff1a<br \/>CPU\uff1a8700k \u9ed8\u9891<br \/>\u5185\u5b58\uff1a4x16G C19 2666 \u9891\u7387<br \/>\u7cfb\u7edf\uff1aManjaro 20.2.1<br \/>Node \u7248\u672c\uff1a14.15.4<\/p>\n<p>\u5199\u4e00\u4e2a hello work \u63a5\u53e3\uff0c\u5355 Node \u8fdb\u7a0b\u8fd0\u884c\uff0c\u540c\u65f6\u7528 wrk 1 \u4e2a\u7ebf\u7a0b\u53bb\u538b\u6d4b<\/p>\n<p>\u7eaf\u5185\u7f6e HTTP \u5e93\uff1aQPS 3.8~3.9w, \u5185\u5b58\u5360\u7528 56~58MB<br \/>Fastify\uff1aQPS 3.8~4w, \u5185\u5b58\u5360\u7528 58~62MB\uff0c\u5f00\u4e86\u63a7\u5236\u53f0\u65e5\u5fd7 QPS \u5728 2.2w \u5de6\u53f3<br \/>NestJS(Fastify \u9002\u914d\u5668\uff0c\u4f7f\u7528\u5355\u4f8b\u6ce8\u5165\u7684 Service)\uff1aQPS 3.6w \uff0c\u5185\u5b58\u5360\u7528 63MB \u5de6\u53f3<br \/>NestJS(Fastify \u9002\u914d\u5668\uff0c\u4f7f\u7528\u4e86{ scope: Scope.REQUEST }\u53c2\u6570\u6ce8\u5165\u7684 Service\uff0c\u5373\u4e00\u4e2a\u8bf7\u6c42\u5b9e\u4f8b\u5316\u4e00\u4e2a\u5bf9\u8c61)\uff1aQPS 2.2w \uff0c\u5185\u5b58\u5360\u7528 81~105MB<br \/>NestJS(Fastify \u9002\u914d\u5668\uff0c\u4e0d\u4f7f\u7528\u6ce8\u5165 Service\uff0c\u81ea\u5df1 new Service)\uff1aQPS 3.1w \uff0c\u5185\u5b58\u5360\u7528 62MB<br \/>NestJS(Fastify \u9002\u914d\u5668\uff0c\u4e0d\u4f7f\u7528\u6ce8\u5165 Service\uff0c\u76f4\u63a5\u628a Service \u7684\u51fd\u6570\u5f04\u6210 static \u6765\u8c03\u7528)\uff1aQPS 3.6w \uff0c\u5185\u5b58\u5360\u7528 59~60MB<\/p>\n<p>\u7ed3\u8bba\u5c31\u662f\u63a8\u8350\u4f7f\u7528 Fastify \u7684\u9002\u914d\u5668\uff0c\u5c3d\u91cf\u8d70\u5b83\u7684\u6ce8\u5165\u65b9\u5f0f\uff0c\u6bd4\u8f83\u5de5\u7a0b\u5316\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307395\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wdhwg001 \u786e\u5b9e\u76ee\u524d Diesel \u662f\u540c\u6b65\u7684\u6bd4\u8f83\u9057\u61be\uff0c\u5982\u679c\u8981\u5b8c\u5168\u6ee1\u8db3\u4f60\u63d0\u7684\u9700\u6c42\u7684\u770b\u6765\u770b\u53bb\u8c8c\u4f3c\u8fd8\u771f\u5c31\u53ea\u6709 ASP.NET Core \u624d\u80fd\u6ee1\u8db3\u4e86\u3002EFCore \u662f\u771f\u7684\u597d\u7528\uff0c\u800c\u4e14.NET6.0 \u5fae\u8f6f\u4e5f\u5728\u7740\u624b\u6539\u5584\u6027\u80fd\u95ee\u9898\u3002\u76ee\u6807\u662f\u6301\u5e73 Dapper \u4f46\u662f\u6709\u70b9\u96be\u611f\u89c9\uff0c\u4e0d\u8fc7\u76ee\u524d\u7684\u6027\u80fd\u7528\u4e8e Web \u670d\u52a1\u6211\u611f\u89c9\u7edd\u5bf9\u662f\u591f\u7528\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307396\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wdhwg001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liuhan907 .net 5 + EF \u7684\u8dd1\u5206\u5927\u81f4\u4e0a\u6bd4 NestJS + TypeORM \u5feb\u4e00\u500d\u5de6\u53f3\uff0c\u4f46\u6211\u67e5\u5230 EF \u5728\u591a\u8868\u65f6\u6027\u80fd\u53ef\u80fd\u4f1a\u88ab Dapper \u7529\u5f00 8 \u500d\uff1f<\/p>\n<p>\u6211\u60f3\u77e5\u9053\u4e00\u4e0b\u5177\u4f53\u7684\u60c5\u51b5\u662f\u600e\u6837\u7684\uff0c\u4ee5\u53ca\u5728\u590d\u6742\u573a\u666f\u4e0b EF \u548c TypeORM \u8fd9\u6837\u7684\u4e1c\u897f\u76f8\u6bd4\u4f53\u9a8c\u5982\u4f55\u3002<\/p>\n<p>\u786e\u5b9e\uff0c\u8de8\u8bed\u8a00\u518d\u8de8\u6846\u67b6\u7684\u5bf9\u6bd4\u663e\u5f97\u6709\u4e9b\u5947\u602a\uff0c\u4e0d\u8fc7\u65e2\u7136\u53ea\u6709\u8fd9\u4fe9\uff0c\u5e76\u4e14 TS \u7684\u8bed\u6cd5\u98ce\u683c\u4e5f\u5f88 C#\uff0c\u6240\u4ee5\u8fd8\u662f\u6bd4\u4e00\u4e0b\u597d\u4e86\u3002<\/p>\n<p>\u6211\u8fd9\u8fb9\u4f5c\u4e3a\u57fa\u7840\u7684\u5bf9\u6bd4\uff0c\u6211\u53ef\u4ee5\u9996\u5148\u786e\u5b9a EF \u7684 LINQ \u5728\u7528 Lambda \u8bed\u6cd5\u7684\u65f6\u5019\u540a\u9524 TypeORM \u7684 QueryBuilder\uff0c\u611f\u89c9\u5c31\u50cf\u5728\u64cd\u4f5c pandas \u4e00\u6837\u65b9\u4fbf\u3002\u4f46\u4f60\u4e0d\u662f\u7b2c\u4e00\u4e2a\u548c\u6211\u63d0\u5230 EF \u6027\u80fd\u5b58\u5728\u95ee\u9898\u7684\uff0c\u7136\u800c\u5927\u5bb6\u90fd\u8bed\u7109\u4e0d\u8be6\uff0c.net \u793e\u533a\u5728\u5bfb\u627e\u7b54\u6848\u7684\u65f6\u5019\u53c8\u7ecf\u5e38\u4f1a\u627e\u5230\u8fc7\u671f\u5185\u5bb9\uff0c\u6240\u4ee5\u8fd9\u65b9\u9762\u5982\u679c\u80fd\u8bf4\u7684\u66f4\u8be6\u7ec6\u4e00\u4e9b\u7684\u8bdd\u5c31\u518d\u597d\u4e0d\u8fc7\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5307397\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wdhwg001 \u5176\u5b9e\u5f88\u591a\u65f6\u5019\u8bf4 ef \u6027\u80fd\u5b58\u5728\u95ee\u9898\uff0c\u5e76\u4e0d\u662f\u8bf4\u771f\u7684\u6709\u5f88\u7cdf\u7684\u6027\u80fd\uff0c\u800c\u662f\u5728\u8bf4\u8fd9\u4e2a\u4e1c\u897f\u76f8\u5bf9 dapper \u6027\u80fd\u5dee\u3002\u53e6\u5916 ef \u5728\u7b2c\u4e00\u6b21\u67e5\u8be2\u7684\u65f6\u5019\u56e0\u4e3a\u8981\u505a\u4ee3\u7801\u751f\u6210\uff0c\u540c\u65f6\u9ed8\u8ba4\u67e5\u8be2\u4f1a\u8ddf\u8e2a\u6570\u636e\u53d8\u5316\uff0c\u56e0\u6b64\u6027\u80fd\u76f8\u5bf9 ADO \u5f53\u7136\u662f\u5dee\u3002\u4f46\u662f\u4e00\u4e9b\u4eba\u53ea\u6d4b\u8bd5\u4e86\u7b80\u5355\u7684\u67e5\u8be2\uff0c\u4e5f\u4e0d\u9884\u70ed\uff0c\u6240\u4ee5\u5c31\u5f97\u51fa ef \u6027\u80fd\u6bd4\u8f83\u5dee\u3002\u867d\u7136\u786e\u5b9e\u6709\u5dee\u8ddd\u4e0d\u8fc7\u6839\u636e\u6d4b\u8bd5\u4e5f\u5c31\u4ec5\u4ec5\u76f8\u5bf9 ADO \u635f\u5931 30%\u800c\u5df2\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>FastAPI \u73a9\u817b\u4e86\uff0c\u5168\u5f02\u6b65\u3001\u6ce8&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/344353"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=344353"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/344353\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344353"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}