コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 10 of about 18 for standard (0.005 sec.)
Using Dataclasses 14001
Using Dataclasses Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . FastAPI is built on top of Pydantic , and I have been showing you how to use Pydantic models to d ... ataclasses . So, even with the code above that doesn't use Pydantic explicitly, FastAPI is using Pydantic to convert those standard dataclasses to Pydantic's own flavor of dataclasses. And of course, it supports the same: data validation data serializati ... For example, if you have errors with the automatically generated API documentation. In that case, you can simply swap the standard dataclasses with pydantic.dataclasses , which is a drop-in replacement: Python 3.8+ from dataclasses import field # (1) fr ... me" : "Lonely Night" , "description" : "The mostests lonliest nightiest of allest" , }, ], }, ] We still import field from standard dataclasses . pydantic.dataclasses is a drop-in replacement for dataclasses . The Author dataclass includes a list of Item ...
https://man.mtool.work/fastapi/0.115/advanced/dataclasses/
手動デプロイ 10586
手動デプロイ FastAPI を手動でデプロイすることもできます。 以下の様なASGI対応のサーバをインストールする必要があります: Uvicorn Uvicorn , uvloopとhttptoolsを基にした高速なASGIサーバ。 $ pip install "uvicorn[standard]" ---> 100% 豆知識 standard ...
https://man.mtool.work/fastapi/0.115/deployment/manually/
Release Notes 10586
Release Notes Latest Changes 0.115.11 Fixes ? Add docs examples and tests (support) for Annotated custom validations, like AfterValidator , revert #13440 . PR #13442 by @tiangolo . New docs: Query Parameters and String Validations - Custom ... t.ci] pre-commit autoupdate. PR #12046 by @pre-commit-ci[bot] . ? Update coverage config files. PR #12035 by @tiangolo . ? Standardize shebang across shell scripts. PR #11942 by @gitworkflows . ⬆ Update sqlalchemy requirement from <1.4.43,>=1.3.18 to >=1 ... nore warning from attrs in Trio. PR #11949 by @tiangolo . 0.112.0 Breaking Changes ♻️ Add support for pip install "fastapi[standard]" with standard dependencies and python -m fastapi . PR #11935 by @tiangolo . Summary Install with: pip install "fastapi[s ... tandard]" Other Changes This adds support for calling the CLI as: python -m fastapi And it upgrades fastapi-cli[standard] >=0.0.5 . Technical Details Before this, fastapi would include the standard dependencies, with Uvicorn and the fastapi-cl ...
https://man.mtool.work/fastapi/0.115/release-notes/
Virtual Environments 9934
Virtual Environments Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . When you work in Python projects you probably should use a virtual environment (or a similar m ... and versions your program needs in a file (for example requirements.txt or pyproject.toml ). pip uv $ pip install "fastapi[standard]" ---> 100% If you have uv : $ uv pip install "fastapi[standard]" ---> 100% Install from requirements.txt If you have a re ... pip install -r requirements.txt ---> 100% requirements.txt A requirements.txt with some packages could look like: fastapi[standard]==0.113.0 pydantic==2.8.0 Run Your Program After you activated the virtual environment, you can run your program, and it w ... of having all the packages you install. When you run: // Don't run this now, it's just an example ? $ pip install "fastapi[standard]" ---> 100% That will download a compressed file with the FastAPI code, normally from PyPI . It will also download files f ...
https://man.mtool.work/fastapi/0.115/virtual-environments/
Lifespan Events 8647
Lifespan Events Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define logic (code) that should be executed before the application starts up . This means t ... ded after whatever is on that file, without overwriting the previous contents. Tip Notice that in this case we are using a standard Python open() function that interacts with a file. So, it involves I/O (input/output), that requires "waiting" for things ... to be written to disk. But open() doesn't use async and await . So, we declare the event handler function with standard def instead of async def . startup and shutdown together There's a high chance that the logic for your startup and shutdow ...
https://man.mtool.work/fastapi/0.115/advanced/events/
GraphQL 8647
GraphQL Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . As FastAPI is based on the ASGI standard, it's very easy to integrate any GraphQL library also compatible w ...
https://man.mtool.work/fastapi/0.115/how-to/graphql/
Server Workers - Gunicorn と Uvicorn 8441
Server Workers - Gunicorn と Uvicorn 前回のデプロイメントのコンセプトを振り返ってみましょう: セキュリティ - HTTPS 起動時の実行 再起動 レプリケーション(実行中のプロセス数) メモリ 開始前の事前ステップ ここまでのドキュメントのチュートリアルで ... icornから送られてきたデータをASGI標準に変換する役割を担います。 GunicornとUvicornをインストールする $ pip install "uvicorn[standard]" gunicorn ---> 100% これによりUvicornと(高性能を得るための)標準( standard )の追加パッケージとGunicornの両方がインスト ...
https://man.mtool.work/fastapi/0.115/deployment/server-workers/
Advanced Middleware 8218
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 ... Handles GZip responses for any request that includes "gzip" in the Accept-Encoding header. The middleware will handle both standard and streaming responses. Python 3.8+ from fastapi import FastAPI from fastapi.middleware.gzip import GZipMiddleware app = ...
https://man.mtool.work/fastapi/0.115/advanced/middleware/
Sub Applications - Mounts 8218
Sub Applications - Mounts Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . If you need to have two independent FastAPI applications, with their own independent Open ... subapi ) Sub-application Then, create your sub-application, and its path operations . This sub-application is just another standard FastAPI application, but this is the one that will be "mounted": Python 3.8+ from fastapi import FastAPI app = FastAPI () ...
https://man.mtool.work/fastapi/0.115/advanced/sub-applications/
Async Tests 8012
Async Tests Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You have already seen how to test your FastAPI applications using the provided TestClient . Up to now, ... he TestClient does some magic inside to call the asynchronous FastAPI application in your normal def test functions, using standard pytest. But that magic doesn't work anymore when we're using it inside asynchronous functions. By running our tests asynch ...
https://man.mtool.work/fastapi/0.115/advanced/async-tests/
PREV 1 2 NEXT