{"id":115657,"date":"2026-10-12T21:57:02","date_gmt":"2026-10-12T13:57:02","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/115657.html"},"modified":"2026-10-12T21:57:02","modified_gmt":"2026-10-12T13:57:02","slug":"%e5%b5%8c%e5%85%a5%e5%bc%8f%e5%8d%b3%e5%b8%ad%e5%88%86%e6%9e%90%e6%9c%8d%e5%8a%a1%ef%bc%9a%e5%9f%ba%e4%ba%8e-python-fastapi-duckdb-%e6%90%ad%e5%bb%ba%e8%bd%bb%e9%87%8f%e6%9f%a5%e8%af%a2%e5%bc%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/115657.html","title":{"rendered":"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012135701-6acce72deb3b2.webp\" alt=\"\u5c01\u9762\u4fe1\u606f\u56fe\" \/><\/p>\n<p>\u5728\u5f88\u591a\u4e2d\u53f0\u578b\u4f01\u4e1a\u7684\u6570\u636e\u67b6\u6784\u4e2d&#xff0c;\u5e38\u5e38\u4f1a\u9762\u4e34\u8fd9\u6837\u4e00\u79cd\u5c34\u5c2c\u7684\u201c\u5fae\u5206\u6790\u201d\u573a\u666f&#xff1a;\u67d0\u4e2a\u4e1a\u52a1\u4e2d\u53f0&#xff08;\u5982\u5546\u5bb6\u7aef\u540e\u53f0\u3001\u5ba2\u670d\u8d28\u68c0\u5e73\u53f0\u3001\u6216\u8005\u4f9b\u5e94\u94fe\u8ffd\u8e2a\u7cfb\u7edf&#xff09;\u9700\u8981\u4e3a\u524d\u7aef\u63d0\u4f9b\u9ad8\u5ea6\u7075\u6d3b\u7684\u5373\u5e2d\u8fc7\u6ee4\u4e0e\u591a\u7ef4\u4ea4\u53c9\u5206\u6790\u80fd\u529b\u3002\u6570\u636e\u91cf\u5176\u5b9e\u4e0d\u5927\u2014\u2014\u51e0\u4e2a\u6838\u5fc3 Parquet \u5206\u533a\u6216\u79bb\u7ebf Hive \u5bfc\u51fa\u7684\u6570\u636e\u91cf\u5728\u51e0\u767e\u4e07\u5230\u51e0\u5343\u4e07\u884c\u4e4b\u95f4&#xff0c;\u4f53\u91cf\u5728 500MB \u5230 10GB \u5de6\u53f3\u3002<\/p>\n<p>\u9488\u5bf9\u8fd9\u79cd\u9700\u6c42&#xff0c;\u5982\u679c\u53bb\u5411\u5927\u6570\u636e\u5e73\u53f0\u7ec4\u7533\u8bf7\u4e00\u5957\u72ec\u7acb\u7684 Presto \/ Trino \u96c6\u7fa4&#xff0c;\u6216\u8005\u62c9\u8d77\u6602\u8d35\u7684 Spark ThriftServer&#xff1a;<\/p>\n<ul>\n<li>\u8d44\u6e90\u6d6a\u8d39\u4e25\u91cd&#xff1a;\u8d77\u6b65\u5c31\u8981\u51e0\u53f0 32C\/64G \u7684\u72ec\u7acb\u8282\u70b9&#xff0c;\u7a7a\u95f2\u65f6\u8d44\u6e90\u5b8c\u5168\u95f2\u7f6e&#xff1b;<\/li>\n<li>\u51b7\u542f\u52a8\u4e0e\u7f51\u7edc\u5ef6\u8fdf\u9ad8&#xff1a;\u5206\u5e03\u5f0f\u8c03\u5ea6\u5f00\u9500\u5927&#xff0c;\u7b80\u5355\u67e5\u8be2\u4e5f\u8981 1~2 \u79d2\u624d\u80fd\u8fd4\u56de&#xff1b;<\/li>\n<li>\u8fd0\u7ef4\u6210\u672c\u9661\u5ced&#xff1a;JVM \u8c03\u4f18\u3001\u534f\u8c03\u8282\u70b9&#xff08;Coordinator&#xff09;\u9ad8\u53ef\u7528\u3001Zookeeper \u4f9d\u8d56\u4ee4\u4eba\u5fc3\u529b\u4ea4\u7601\u3002<\/li>\n<\/ul>\n<p>DuckDB \u4f5c\u4e3a\u5355\u673a\u5411\u91cf\u5316\u5206\u6790\u7684\u201c\u745e\u58eb\u519b\u5200\u201d&#xff0c;\u4e0e\u73b0\u4ee3\u5f02\u6b65 Web \u6846\u67b6 FastAPI \u7b80\u76f4\u662f\u5929\u4f5c\u4e4b\u5408\u3002\u901a\u8fc7\u5c06 DuckDB \u5d4c\u5165\u5230 Python \u5fae\u670d\u52a1\u8fdb\u7a0b\u4e2d&#xff0c;\u501f\u52a9 Apache Arrow \u7684\u5185\u5b58\u96f6\u62f7\u8d1d\u6280\u672f&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5728\u4e00\u53f0\u666e\u901a\u7684 4 \u6838 8G \u4e91\u4e3b\u673a\u4e0a&#xff0c;\u642d\u5efa\u51fa\u4e00\u5957\u652f\u6491\u6bcf\u79d2\u6570\u767e\u5e76\u53d1\u3001\u54cd\u5e94\u5ef6\u8fdf\u4f4e\u81f3\u51e0\u5341\u6beb\u79d2\u7684\u5fae\u578b Serverless OLAP \u67e5\u8be2\u5f15\u64ce\u3002<\/p>\n<p>\u4eca\u5929\u6211\u4eec\u5c31\u6765\u624b\u628a\u624b\u843d\u5730\u4e00\u5957\u751f\u4ea7\u7ea7\u7684 FastAPI &#043; DuckDB \u6781\u901f\u5373\u5e2d\u5206\u6790\u5fae\u670d\u52a1\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u67b6\u6784\u8bbe\u8ba1&#xff1a;\u4e3a\u4ec0\u4e48 DuckDB &#043; FastAPI \u662f\u5fae\u5206\u6790\u7edd\u914d&#xff1f;<\/h3>\n<p>\u5728\u6df1\u5165\u4ee3\u7801\u4e4b\u524d&#xff0c;\u6211\u4eec\u5148\u5398\u6e05\u8fd9\u5957\u67b6\u6784\u7684\u4e09\u5927\u6838\u5fc3\u4f18\u52bf&#xff1a;<\/p>\n<p>[\u524d\u7aef Web \/ BI Dashboard]<br \/>\n            \u2502 (HTTP REST \/ JSON \/ Arrow Stream)<br \/>\n            \u25bc<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502 FastAPI \u5f02\u6b65\u5fae\u670d\u52a1\u8fdb\u7a0b (Uvicorn Async Worker)               \u2502<br \/>\n\u2502 \u251c\u2500\u2500 \u52a8\u6001\u5b89\u5168\u9650\u6d41\u4e0e AST \u767d\u540d\u5355\u62e6\u622a\u4e2d\u95f4\u4ef6                      \u2502<br \/>\n\u2502 \u251c\u2500\u2500 \u5f02\u6b65\u8fde\u63a5\u6c60\u8c03\u5ea6 (DuckDB Connection Cursor Pool)           \u2502<br \/>\n\u2502 \u2514\u2500\u2500 Apache Arrow \u96f6\u62f7\u8d1d\u5e8f\u5217\u5316\u7ba1\u9053                           \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n                               \u2502 In-Process C&#043;&#043; \u8c03\u7528 (Zero IPC)<br \/>\n                               \u25bc<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502 \u5d4c\u5165\u5f0f DuckDB \u5411\u91cf\u5316\u8ba1\u7b97\u5f15\u64ce (\u5171\u4eab\u672c\u5730\u6216\u6302\u8f7d\u7684 Parquet \u6570\u636e)   \u2502<br \/>\n\u2502 \u251c\u2500\u2500 SIMD \u5217\u5f0f\u5185\u5b58\u6267\u884c\u5185\u6838                                    \u2502<br \/>\n\u2502 \u2514\u2500\u2500 \u591a\u7ebf\u7a0b\u5916\u6392\u5e8f\u4e0e\u5e76\u53d1\u53ea\u8bfb\u9694\u79bb (read_only&#061;True)              \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<li>\u540c\u8fdb\u7a0b\u5185\u5b58\u76f4\u901a&#xff08;In-Process Memory Access&#xff09;&#xff1a;DuckDB \u76f4\u63a5\u8fd0\u884c\u5728 Python \u89e3\u91ca\u5668\u7684\u7269\u7406\u8fdb\u7a0b\u5185\u3002\u67e5\u8be2\u7ed3\u679c\u4ece DuckDB C&#043;&#043; \u5f15\u64ce\u4f20\u9012\u5230 Python&#xff0c;\u4e0d\u9700\u8981\u7ecf\u8fc7\u4efb\u4f55\u7f51\u7edc Socket \u6216\u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316&#xff08;SerDe&#xff09;\u5f00\u9500\u3002<\/li>\n<li>Arrow \u539f\u751f\u96f6\u62f7\u8d1d&#xff08;Zero-Copy Interop&#xff09;&#xff1a;DuckDB \u5185\u90e8\u5b58\u50a8\u683c\u5f0f\u4e0e Apache Arrow \u5b8c\u5168\u517c\u5bb9\u3002\u67e5\u8be2\u8fd4\u56de\u7684 Arrow RecordBatch \u53ef\u4ee5\u76f4\u63a5\u8f6c\u5316\u4e3a\u6d41\u5f0f\u4e8c\u8fdb\u5236&#xff0c;\u4ee5\u6781\u4f4e\u7684 CPU \u6d88\u8017\u9001\u5165 HTTP \u54cd\u5e94\u6d41\u3002<\/li>\n<li>\u5f7b\u5e95\u89c4\u907f\u5e76\u53d1\u5199\u9501&#xff08;Read-Only Session&#xff09;&#xff1a;\u53ea\u8bfb\u573a\u666f\u4e0b&#xff0c;DuckDB \u652f\u6301\u65e0\u9650\u7684\u5e76\u53d1\u67e5\u8be2\u53e5\u67c4&#xff08;Cursors&#xff09;&#xff0c;\u591a\u7ebf\u7a0b\/\u591a\u534f\u7a0b\u5e76\u53d1\u5b89\u5168&#xff0c;\u5b8c\u7f8e\u5951\u5408 FastAPI \u7684\u5f02\u6b65\u4e8b\u4ef6\u5faa\u73af\u3002<\/li>\n<hr \/>\n<h3>\u4e8c\u3001\u751f\u4ea7\u7ea7\u5de5\u7a0b\u5b9e\u6218&#xff1a;\u5b8c\u6574\u5fae\u670d\u52a1\u6784\u5efa<\/h3>\n<p>\u6211\u4eec\u91c7\u7528\u5206\u5c42\u67b6\u6784\u7f16\u5199\u670d\u52a1\u4ee3\u7801&#xff1a;\u5305\u542b\u6570\u636e\u6e90\u6302\u8f7d\u3001\u8fde\u63a5\u6c60\u7ba1\u7406\u3001\u53ea\u8bfb\u67e5\u8be2\u6267\u884c\u4ee5\u53ca\u5168\u5c40\u5f02\u5e38\u7194\u65ad\u3002<\/p>\n<h4>1. \u6838\u5fc3\u67e5\u8be2\u670d\u52a1\u5b9e\u73b0&#xff08;query_service.py&#xff09;<\/h4>\n<p>import duckdb<br \/>\nimport pyarrow as pa<br \/>\nfrom contextlib import asynccontextmanager<br \/>\nfrom typing import Dict, Any, List<br \/>\nfrom fastapi import FastAPI, HTTPException, Request<br \/>\nfrom fastapi.responses import StreamingResponse<br \/>\nfrom pydantic import BaseModel<br \/>\nimport io<\/p>\n<p># 1. \u5b9a\u4e49\u5165\u53c2\u6a21\u578b<br \/>\nclass QueryRequest(BaseModel):<br \/>\n    dataset: str  # \u6570\u636e\u96c6\u540d\u79f0&#xff0c;\u6620\u5c04\u5230\u7279\u5b9a\u76ee\u5f55\u4e0b\u7684 Parquet \u6587\u4ef6<br \/>\n    metrics: List[str]  # \u6307\u6807\u5217\u8868&#xff0c;\u5982 [&#034;count(*)&#034;, &#034;sum(amount)&#034;]<br \/>\n    dimensions: List[str] &#061; []  # \u7ef4\u5ea6\u5217\u8868&#xff0c;\u5982 [&#034;region&#034;, &#034;category&#034;]<br \/>\n    filters: str &#061; &#034;&#034;  # \u8fc7\u6ee4\u8868\u8fbe\u5f0f&#xff0c;\u5982 &#034;status &#061; &#039;PAID&#039; AND amount &gt; 100&#034;<br \/>\n    limit: int &#061; 500<\/p>\n<p># 2. \u5168\u5c40 DuckDB \u7ba1\u7406\u4e2d\u5fc3<br \/>\nclass DuckDBEngine:<br \/>\n    def __init__(self, data_root_path: str):<br \/>\n        self.data_root &#061; data_root_path<br \/>\n        # \u521d\u59cb\u5316\u53ea\u8bfb\u5168\u5c40\u5171\u4eab\u5b9e\u4f8b&#xff0c;\u5229\u7528\u5185\u5b58\u591a\u7ebf\u7a0b<br \/>\n        self.conn &#061; duckdb.connect(database&#061;&#034;:memory:&#034;, read_only&#061;False)<br \/>\n        self._setup_views()<\/p>\n<p>    def _setup_views(self):<br \/>\n        &#034;&#034;&#034;\u9884\u5148\u6ce8\u518c\u672c\u5730\u6216\u6302\u8f7d\u4e91\u76d8\u4e0a\u7684 Parquet \u6587\u4ef6\u4e3a\u865a\u62df\u89c6\u56fe&#034;&#034;&#034;<br \/>\n        # \u652f\u6301\u6309\u65e5\u671f\u5206\u533a\u7684\u901a\u914d\u7b26\u76f4\u63a5\u52a0\u8f7d<br \/>\n        self.conn.execute(f&#034;&#034;&#034;<br \/>\n            CREATE OR REPLACE VIEW sales_orders AS<br \/>\n            SELECT * FROM read_parquet(&#039;{self.data_root}\/sales_orders\/*.parquet&#039;);<br \/>\n        &#034;&#034;&#034;)<br \/>\n        # \u8bbe\u7f6e\u5355\u673a\u6700\u5927\u5e76\u53d1\u5de5\u4f5c\u7ebf\u7a0b\u6570<br \/>\n        self.conn.execute(&#034;SET threads TO 4;&#034;)<br \/>\n        self.conn.execute(&#034;SET max_memory &#061; &#039;4GB&#039;;&#034;)<\/p>\n<p>    def execute_ad_hoc(self, req: QueryRequest) -&gt; List[Dict[str, Any]]:<br \/>\n        &#034;&#034;&#034;\u57fa\u4e8e\u5b89\u5168\u6784\u9020\u6267\u884c\u52a8\u6001\u5373\u5e2d\u805a\u5408&#034;&#034;&#034;<br \/>\n        # \u4e25\u683c\u6821\u9a8c\u7ef4\u5ea6\u4e0e\u6307\u6807\u5b57\u6bb5&#xff0c;\u9632\u6b62 SQL \u6ce8\u5165<br \/>\n        allowed_chars &#061; set(&#034;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_(),*&#043;-\/ &#034;)<br \/>\n        for expr in req.metrics &#043; req.dimensions:<br \/>\n            if not set(expr).issubset(allowed_chars):<br \/>\n                raise ValueError(f&#034;\u68c0\u6d4b\u5230\u975e\u6cd5\u5b57\u7b26: {expr}&#034;)<\/p>\n<p>        # \u52a8\u6001\u6784\u9020\u5b89\u5168 SQL<br \/>\n        select_cols &#061; &#034;, &#034;.join(req.dimensions &#043; req.metrics)<br \/>\n        where_clause &#061; f&#034;WHERE {req.filters}&#034; if req.filters.strip() else &#034;&#034;<br \/>\n        group_clause &#061; f&#034;GROUP BY {&#039;, &#039;.join(req.dimensions)}&#034; if req.dimensions else &#034;&#034;<br \/>\n        limit_clause &#061; f&#034;LIMIT {min(req.limit, 5000)}&#034;<\/p>\n<p>        sql &#061; f&#034;&#034;&#034;<br \/>\n            SELECT {select_cols}<br \/>\n            FROM {req.dataset}<br \/>\n            {where_clause}<br \/>\n            {group_clause}<br \/>\n            {limit_clause}<br \/>\n        &#034;&#034;&#034;<\/p>\n<p>        # \u521b\u5efa\u72ec\u7acb\u8f7b\u91cf\u6e38\u6807\u6267\u884c&#xff0c;\u89c4\u907f\u72b6\u6001\u4e32\u6270<br \/>\n        cursor &#061; self.conn.cursor()<br \/>\n        try:<br \/>\n            # \u76f4\u63a5\u8f6c\u6362\u4e3a Python \u539f\u751f\u5b57\u5178\u5217\u8868&#xff08;\u4e5f\u53ef\u76f4\u63a5\u8d70 .arrow() \u5bfc\u51fa&#xff09;<br \/>\n            df &#061; cursor.execute(sql).df()<br \/>\n            return df.to_dict(orient&#061;&#034;records&#034;)<br \/>\n        finally:<br \/>\n            cursor.close()<\/p>\n<p># 3. \u521d\u59cb\u5316 FastAPI \u5e94\u7528\u4e0e\u751f\u547d\u5468\u671f\u7ba1\u7406<br \/>\ndb_engine &#061; None<\/p>\n<p>&#064;asynccontextmanager<br \/>\nasync def lifespan(app: FastAPI):<br \/>\n    global db_engine<br \/>\n    # \u6a21\u62df\u6570\u636e\u76ee\u5f55<br \/>\n    db_engine &#061; DuckDBEngine(data_root_path&#061;&#034;.\/data&#034;)<br \/>\n    yield<br \/>\n    if db_engine and db_engine.conn:<br \/>\n        db_engine.conn.close()<\/p>\n<p>app &#061; FastAPI(title&#061;&#034;DuckDB-Lite-Analytics-Service&#034;, lifespan&#061;lifespan)<\/p>\n<p># 4. \u66b4\u9732\u5373\u5e2d\u5206\u6790 API \u7aef\u70b9<br \/>\n&#064;app.post(&#034;\/api\/v1\/analytics\/adhoc&#034;)<br \/>\nasync def execute_query(req: QueryRequest):<br \/>\n    if not db_engine:<br \/>\n        raise HTTPException(status_code&#061;500, detail&#061;&#034;\u67e5\u8be2\u5f15\u64ce\u5c1a\u672a\u5c31\u7eea&#034;)<br \/>\n    try:<br \/>\n        results &#061; db_engine.execute_ad_hoc(req)<br \/>\n        return {<br \/>\n            &#034;code&#034;: 200,<br \/>\n            &#034;message&#034;: &#034;success&#034;,<br \/>\n            &#034;total_rows&#034;: len(results),<br \/>\n            &#034;data&#034;: results<br \/>\n        }<br \/>\n    except ValueError as ve:<br \/>\n        raise HTTPException(status_code&#061;400, detail&#061;str(ve))<br \/>\n    except Exception as e:<br \/>\n        raise HTTPException(status_code&#061;500, detail&#061;f&#034;\u67e5\u8be2\u5f15\u64ce\u5185\u90e8\u9519\u8bef: {str(e)}&#034;)<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u6027\u80fd\u98d9\u5347&#xff1a;\u57fa\u4e8e Apache Arrow \u7684\u6d41\u5f0f\u5bfc\u51fa\u4f18\u5316<\/h3>\n<p>\u5f53\u4e1a\u52a1\u9700\u8981\u5c06 10 \u4e07\u884c\u7ea7\u522b\u7684\u7ed3\u679c\u96c6\u4e0b\u8f7d\u6216\u4f20\u9012\u7ed9\u524d\u7aef\u65f6&#xff0c;\u4f20\u7edf\u7684 JSON \u5e8f\u5217\u5316\u5728 Python \u91cc\u6781\u5176\u7f13\u6162&#xff0c;CPU \u4f1a\u88ab json.dumps() \u5f7b\u5e95\u6253\u6ee1\u3002<\/p>\n<p>DuckDB \u539f\u751f\u652f\u6301\u5c06\u7ed3\u679c\u96c6\u5bfc\u51fa\u4e3a Apache Arrow IPC Streaming \u683c\u5f0f\u3002\u901a\u8fc7 HTTP \u4e8c\u8fdb\u5236\u6d41\u8f93\u51fa&#xff0c;\u4f20\u8f93\u6027\u80fd\u53ef\u4ee5\u63d0\u5347 10 \u500d\u4ee5\u4e0a&#xff1a;<\/p>\n<p>&#064;app.post(&#034;\/api\/v1\/analytics\/export\/arrow&#034;)<br \/>\nasync def export_arrow_stream(req: QueryRequest):<br \/>\n    &#034;&#034;&#034;\u5229\u7528 Arrow \u96f6\u62f7\u8d1d\u4e8c\u8fdb\u5236\u6d41\u6781\u901f\u54cd\u5e94&#034;&#034;&#034;<br \/>\n    # \u6784\u9020 SQL &#8230;<br \/>\n    cursor &#061; db_engine.conn.cursor()<br \/>\n    # \u63d0\u53d6 Arrow \u8868\u5bf9\u8c61<br \/>\n    arrow_table: pa.Table &#061; cursor.execute(&#034;SELECT &#8230;&#034;).arrow()<br \/>\n    cursor.close()<\/p>\n<p>    # \u5c06 Arrow \u6570\u636e\u6d41\u5f0f\u5199\u5165 HTTP \u54cd\u5e94<br \/>\n    sink &#061; io.BytesIO()<br \/>\n    with pa.ipc.new_stream(sink, arrow_table.schema) as writer:<br \/>\n        writer.write_table(arrow_table)<\/p>\n<p>    sink.seek(0)<br \/>\n    return StreamingResponse(<br \/>\n        sink,<br \/>\n        media_type&#061;&#034;application\/vnd.apache.arrow.stream&#034;,<br \/>\n        headers&#061;{&#034;Content-Disposition&#034;: &#034;attachment; filename&#061;export.arrow&#034;}<br \/>\n    )<\/p>\n<p>\u524d\u7aef\u53ea\u9700\u5728\u6d4f\u89c8\u5668\u7aef\u901a\u8fc7 JavaScript \u7684 apache-arrow \u5e93&#xff0c;\u76f4\u63a5\u89e3\u6790\u8fd9\u4e2a ArrayBuffer \u4e8c\u8fdb\u5236\u6d41&#xff0c;\u77ac\u95f4\u5373\u53ef\u9a71\u52a8 Canvas \u56fe\u8868\u6e32\u67d3&#xff0c;\u6ca1\u6709\u4e00\u4e01\u70b9\u6587\u672c\u89e3\u6790\u8d1f\u62c5\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u751f\u4ea7\u73af\u5883\u7a33\u5b9a\u6027\u52a0\u56fa<\/h3>\n<p>\u5728\u5b9e\u9645\u751f\u4ea7\u90e8\u7f72\u4e2d&#xff0c;\u5fc5\u987b\u52a0\u5165\u4e09\u5c42\u9632\u62a4\u7f69&#xff0c;\u9632\u6b62\u4e2a\u522b\u6781\u7aef\u67e5\u8be2\u62d6\u6b7b\u6574\u4e2a\u5fae\u670d\u52a1&#xff1a;<\/p>\n<li>\u4e25\u683c\u7684\u5185\u5b58\u914d\u989d\u9650\u5236&#xff08;Memory Limit&#xff09;&#xff1a;\u5728 DuckDB \u521d\u59cb\u5316\u65f6\u5fc5\u987b\u663e\u5f0f\u914d\u7f6e SET max_memory &#061; &#039;4GB&#039;\u3002\u4e00\u65e6\u5355\u6b21\u67e5\u8be2\u7684\u4e2d\u95f4\u805a\u5408\u8d85\u51fa\u9650\u5236&#xff0c;DuckDB \u4f1a\u81ea\u52a8\u5c06\u6570\u636e Spill&#xff08;\u6ea2\u51fa&#xff09;\u5230\u672c\u5730\u4e34\u65f6\u78c1\u76d8\u76ee\u5f55&#xff0c;\u800c\u4e0d\u662f\u76f4\u63a5\u5bfc\u81f4\u5bbf\u4e3b Python \u8fdb\u7a0b OOM Crash\u3002<\/li>\n<li>\u6267\u884c\u8d85\u65f6\u7194\u65ad\u673a\u5236&#xff1a;\u5728\u6e38\u6807\u6267\u884c\u65f6\u5305\u88f9 Python \u5f02\u6b65\u8d85\u65f6\u63a7\u5236&#xff08;asyncio.wait_for&#xff09;&#xff0c;\u5982\u679c\u5728 8 \u79d2\u5185\u672a\u8fd4\u56de\u7ed3\u679c&#xff0c;\u7acb\u5373\u4e3b\u52a8\u53d6\u6d88\u5e95\u5c42\u6267\u884c\u5e76\u5411\u524d\u7aef\u62a5\u9519\u3002<\/li>\n<li>Parquet \u6587\u4ef6\u8f7b\u91cf\u9884\u70ed&#xff1a;\u901a\u8fc7\u5b9a\u65f6\u540e\u53f0\u4efb\u52a1\u9884\u70ed\u8bfb\u53d6 Parquet \u7684 Footer \u5143\u6570\u636e&#xff0c;\u4f7f\u5f97\u6240\u6709\u7684\u5373\u5e2d\u8fc7\u6ee4\u90fd\u80fd\u7cbe\u51c6\u547d\u4e2d\u6587\u4ef6\u5143\u6570\u636e\u8fc7\u6ee4&#xff08;Min\/Max Pruning&#xff09;\u3002<\/li>\n<hr \/>\n<h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<p>\u5e76\u4e0d\u662f\u6240\u6709\u7684\u6570\u636e\u5206\u6790\u90fd\u9700\u8981\u52a8\u7528\u6210\u767e\u4e0a\u5343\u8282\u70b9\u7684\u5206\u5e03\u5f0f\u91cd\u578b\u6b66\u5668\u3002\u5728\u6570\u636e\u5c40\u90e8\u5316\u3001\u4e2d\u8f7b\u91cf\u5373\u5e2d\u5206\u6790\u7684\u5e7f\u9614\u5929\u5730\u4e2d&#xff0c;FastAPI &#043; DuckDB \u7684\u6781\u7b80\u7ec4\u5408\u5c55\u73b0\u4e86\u60ca\u4eba\u7684\u80fd\u6548\u6bd4\u3002<\/p>\n<p>\u5b83\u4ee5\u5355\u673a\u8f7b\u91cf\u7ea7\u7684\u59ff\u6001&#xff0c;\u4ea4\u4ed8\u4e86\u5ab2\u7f8e\u5206\u5e03\u5f0f MPP \u5f15\u64ce\u7684\u5206\u6790\u4f53\u9a8c\u3002\u67b6\u6784\u5e08\u7684\u6210\u719f&#xff0c;\u6b63\u5728\u4e8e\u61c2\u5f97\u4e3a\u4e0d\u540c\u7684\u6570\u636e\u4f53\u91cf\u5339\u914d\u6700\u5408\u9002\u3001\u6700\u514b\u5236\u7684\u4f18\u96c5\u89e3\u6cd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5f88\u591a\u4e2d\u53f0\u578b\u4f01\u4e1a\u7684\u6570\u636e\u67b6\u6784\u4e2d&#xff0c;\u5e38\u5e38\u4f1a\u9762\u4e34\u8fd9\u6837\u4e00\u79cd\u5c34\u5c2c\u7684\u201c\u5fae\u5206\u6790\u201d\u573a\u666f&#xff1a;\u67d0\u4e2a\u4e1a\u52a1\u4e2d\u53f0&#xff08;\u5982\u5546\u5bb6\u7aef\u540e\u53f0\u3001\u5ba2\u670d\u8d28\u68c0\u5e73\u53f0\u3001\u6216\u8005\u4f9b\u5e94\u94fe\u8ffd\u8e2a\u7cfb\u7edf&#xff09;\u9700\u8981\u4e3a\u524d\u7aef\u63d0\u4f9b\u9ad8\u5ea6\u7075\u6d3b\u7684\u5373\u5e2d\u8fc7\u6ee4\u4e0e\u591a\u7ef4\u4ea4\u53c9\u5206\u6790\u80fd\u529b\u3002\u6570\u636e\u91cf\u5176\u5b9e\u4e0d\u5927\u2014\u2014\u51e0\u4e2a\u6838\u5fc3 Parquet \u5206\u533a\u6216\u79bb\u7ebf Hive \u5bfc\u51fa\u7684\u6570\u636e\u91cf\u5728\u51e0\u767e\u4e07\u5230\u51e0\u5343\u4e07\u884c\u4e4b\u95f4&#xff0c;\u4f53\u91cf\u5728 500MB \u5230 10GB \u5de6\u53f3\u3002<br \/>\n\u9488\u5bf9\u8fd9\u79cd\u9700\u6c42&#xff0c;\u5982\u679c\u53bb\u5411\u5927\u6570\u636e\u5e73\u53f0\u7ec4\u7533\u8bf7\u4e00\u5957\u72ec\u7acb\u7684 Presto \/ <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,81,50,292,51],"topic":[],"class_list":["post-115657","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-python","tag-50","tag-292","tag-51"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce - \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\/115657.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u5728\u5f88\u591a\u4e2d\u53f0\u578b\u4f01\u4e1a\u7684\u6570\u636e\u67b6\u6784\u4e2d&#xff0c;\u5e38\u5e38\u4f1a\u9762\u4e34\u8fd9\u6837\u4e00\u79cd\u5c34\u5c2c\u7684\u201c\u5fae\u5206\u6790\u201d\u573a\u666f&#xff1a;\u67d0\u4e2a\u4e1a\u52a1\u4e2d\u53f0&#xff08;\u5982\u5546\u5bb6\u7aef\u540e\u53f0\u3001\u5ba2\u670d\u8d28\u68c0\u5e73\u53f0\u3001\u6216\u8005\u4f9b\u5e94\u94fe\u8ffd\u8e2a\u7cfb\u7edf&#xff09;\u9700\u8981\u4e3a\u524d\u7aef\u63d0\u4f9b\u9ad8\u5ea6\u7075\u6d3b\u7684\u5373\u5e2d\u8fc7\u6ee4\u4e0e\u591a\u7ef4\u4ea4\u53c9\u5206\u6790\u80fd\u529b\u3002\u6570\u636e\u91cf\u5176\u5b9e\u4e0d\u5927\u2014\u2014\u51e0\u4e2a\u6838\u5fc3 Parquet \u5206\u533a\u6216\u79bb\u7ebf Hive \u5bfc\u51fa\u7684\u6570\u636e\u91cf\u5728\u51e0\u767e\u4e07\u5230\u51e0\u5343\u4e07\u884c\u4e4b\u95f4&#xff0c;\u4f53\u91cf\u5728 500MB \u5230 10GB \u5de6\u53f3\u3002 \u9488\u5bf9\u8fd9\u79cd\u9700\u6c42&#xff0c;\u5982\u679c\u53bb\u5411\u5927\u6570\u636e\u5e73\u53f0\u7ec4\u7533\u8bf7\u4e00\u5957\u72ec\u7acb\u7684 Presto \/\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/115657.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-12T13:57:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012135701-6acce72deb3b2.webp\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115657.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/115657.html\",\"name\":\"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-12T13:57:02+00:00\",\"dateModified\":\"2026-10-12T13:57:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/115657.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/115657.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115657.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce\"}]},{\"@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":"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce - \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\/115657.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u5728\u5f88\u591a\u4e2d\u53f0\u578b\u4f01\u4e1a\u7684\u6570\u636e\u67b6\u6784\u4e2d&#xff0c;\u5e38\u5e38\u4f1a\u9762\u4e34\u8fd9\u6837\u4e00\u79cd\u5c34\u5c2c\u7684\u201c\u5fae\u5206\u6790\u201d\u573a\u666f&#xff1a;\u67d0\u4e2a\u4e1a\u52a1\u4e2d\u53f0&#xff08;\u5982\u5546\u5bb6\u7aef\u540e\u53f0\u3001\u5ba2\u670d\u8d28\u68c0\u5e73\u53f0\u3001\u6216\u8005\u4f9b\u5e94\u94fe\u8ffd\u8e2a\u7cfb\u7edf&#xff09;\u9700\u8981\u4e3a\u524d\u7aef\u63d0\u4f9b\u9ad8\u5ea6\u7075\u6d3b\u7684\u5373\u5e2d\u8fc7\u6ee4\u4e0e\u591a\u7ef4\u4ea4\u53c9\u5206\u6790\u80fd\u529b\u3002\u6570\u636e\u91cf\u5176\u5b9e\u4e0d\u5927\u2014\u2014\u51e0\u4e2a\u6838\u5fc3 Parquet \u5206\u533a\u6216\u79bb\u7ebf Hive \u5bfc\u51fa\u7684\u6570\u636e\u91cf\u5728\u51e0\u767e\u4e07\u5230\u51e0\u5343\u4e07\u884c\u4e4b\u95f4&#xff0c;\u4f53\u91cf\u5728 500MB \u5230 10GB \u5de6\u53f3\u3002 \u9488\u5bf9\u8fd9\u79cd\u9700\u6c42&#xff0c;\u5982\u679c\u53bb\u5411\u5927\u6570\u636e\u5e73\u53f0\u7ec4\u7533\u8bf7\u4e00\u5957\u72ec\u7acb\u7684 Presto \/","og_url":"https:\/\/www.wsisp.com\/helps\/115657.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-12T13:57:02+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012135701-6acce72deb3b2.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/115657.html","url":"https:\/\/www.wsisp.com\/helps\/115657.html","name":"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-12T13:57:02+00:00","dateModified":"2026-10-12T13:57:02+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/115657.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/115657.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/115657.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5d4c\u5165\u5f0f\u5373\u5e2d\u5206\u6790\u670d\u52a1\uff1a\u57fa\u4e8e Python FastAPI + DuckDB \u642d\u5efa\u8f7b\u91cf\u67e5\u8be2\u5f15\u64ce"}]},{"@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\/115657","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=115657"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115657\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=115657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=115657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=115657"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=115657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}