コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 5 of about 5 for GZip (0.001 sec.)
Custom Request and APIRoute class 11876
Custom Request and APIRoute class Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . In some cases, you may want to override the logic used by the Request and APIRout ... this section. Use cases Some use cases include: Converting non-JSON request bodies to JSON (e.g. msgpack ). Decompressing gzip-compressed request bodies. Automatically logging all request bodies. Handling custom request body encodings Let's see how ... to make use of a custom Request subclass to decompress gzip requests. And an APIRoute subclass to use that custom request class. Create a custom GzipRequest class Tip This is a toy e ... xample to demonstrate how it works, if you need Gzip support, you can use the provided GzipMiddleware . First, we create a GzipRequest class, which will overwrite the Request. ...
https://man.mtool.work/fastapi/0.115/how-to/custom-request-and-route/
Advanced Middleware 10332
Advanced Middleware Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . In the main tutorial you read how to add Custom Middleware to your application. And then you al ... d_hosts=["*"] or omit the middleware. If an incoming request does not validate correctly then a 400 response will be sent. GZipMiddleware Handles GZip responses for any request that includes "gzip" in the Accept-Encoding header. The middleware will h ... andle both standard and streaming responses. Python 3.8+ from fastapi import FastAPI from fastapi.middleware.gzip import GZipMiddleware app = FastAPI () app . add_middleware ( GZipMiddleware , minimum_size = 1000 , compresslevel = 5 ) @ ... app . get ( "/" ) async def main (): return "somebigcontent" The following arguments are supported: minimum_size - Do not GZip responses that are smaller than this minimum size in bytes. Defaults to 500 . compresslevel - Used during GZip compression ...
https://man.mtool.work/fastapi/0.115/advanced/middleware/
Middleware 9431
Middleware There are several middlewares available provided by Starlette directly. Read more about them in the FastAPI docs for Middleware . ::: fastapi.middleware.cors.CORSMiddleware It can be imported from fastapi : from fastapi.middlewar ... e.cors import CORSMiddleware ::: fastapi.middleware.gzip.GZipMiddleware It can be imported from fastapi : from fastapi.middleware.gzip import GZipMiddleware ::: fastapi.middleware ...
https://man.mtool.work/fastapi/0.115/reference/middleware/
機能 7225
機能 FastAPIの機能 FastAPI は以下の機能をもちます: オープンスタンダード準拠 API作成のための OpenAPI 。これは、 path operations の宣言、パラメータ、ボディリクエスト、セキュリティなどを含んでいます。 JSONスキーマ を使用したデータモデルのドキュ ... ポート プロセス内バックグラウンドタスク 起動およびシャットダウンイベント httpx に基づいて構築されたテストクライアント CORS 、GZip、静的ファイル、ストリーミング応答 セッションとCookie のサポート テストカバレッジ100% 型アノテーション100%のコードベース Pyd ...
https://man.mtool.work/fastapi/0.115/features/
代替ツールから受けたインスピレーションと比較 7059
代替ツールから受けたインスピレーションと比較 何が FastAPI にインスピレーションを与えたのか、他の代替ツールと比較してどうか、そしてそこから何を学んだのかについて。 はじめに FastAPI は、代替ツールのこれまでの働きがなければ存在しなかったでしょ ... プロセスのバックグラウンドタスク。 起動およびシャットダウンイベント。 requestsに基づいて構築されたテストクライアント。 CORS、GZip、静的ファイル、ストリーミング応答。 セッションとクッキーのサポート。 100%のテストカバレッジ。 100%の型注釈付きコードベース。 ...
https://man.mtool.work/fastapi/0.115/alternatives/
PREV 1 NEXT