コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 6 of about 6 for cache (0.004 sec.)
Settings and Environment Variables 13179
Settings and Environment Variables Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . In many cases your application could need some external settings or configuratio ... The main app file Now we create a dependency that returns a new config.Settings() . Python 3.9+ from functools import lru_cache from typing import Annotated from fastapi import Depends , FastAPI from .config import Settings app = FastAPI () @lru_cach ... tings . items_per_user , } ? Other versions and variants Python 3.8+ Python 3.8+ - non-Annotated from functools import lru_cache from fastapi import Depends , FastAPI from typing_extensions import Annotated from .config import Settings app = FastAPI ( ... ) @lru_cache def get_settings (): return Settings () @app . get ( "/info" ) async def info ( settings : Annotated [ Settings , Depends ...
https://man.mtool.work/fastapi/0.115/advanced/settings/
コンテナ内のFastAPI - Docker 8847
コンテナ内のFastAPI - Docker FastAPIアプリケーションをデプロイする場合、一般的なアプローチは Linuxコンテナ・イメージ をビルドすることです。 基本的には Docker を用いて行われます。生成されたコンテナ・イメージは、いくつかの方法のいずれかでデプ ... Dockerfile プレビュー ? FROM python:3.9 WORKDIR /code COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY ./app /code/app CMD [ "uvicorn" , "app.main:app" , "--host" , "0.0.0.0" , "-- ... # (1) FROM python:3.9 # (2) WORKDIR /code # (3) COPY ./requirements.txt /code/requirements.txt # (4) RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # (5) COPY ./app /code/app # (6) CMD [ "uvicorn" , "app.main:app" , "--host" , "0. ... ッシュ を使用し、次のステップでもキャッシュを有効にします。 要件ファイルにあるパッケージの依存関係をインストールします --no-cache-dir オプションはダウンロードしたパッケージをローカルに保存しないように pip に指示します。これは、同じパッケージをインストー ...
https://man.mtool.work/fastapi/0.115/deployment/docker/
Extending OpenAPI 8426
Extending OpenAPI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . There are some cases where you might need to modify the generated OpenAPI schema. In this section ... o-margin/logo-teal.png" } app . openapi_schema = openapi_schema return app . openapi_schema app . openapi = custom_openapi Cache the OpenAPI schema You can use the property .openapi_schema as a "cache", to store your generated schema. That way, your a ... won't have to generate the schema every time a user opens your API docs. It will be generated only once, and then the same cached schema will be used for the next requests. Python 3.8+ from fastapi import FastAPI from fastapi.openapi.utils import get_ ...
https://man.mtool.work/fastapi/0.115/how-to/extending-openapi/
サブ依存関係 8225
サブ依存関係 サブ依存関係 を持つ依存関係を作成することができます。 それらは必要なだけ 深く することができます。 FastAPI はそれらを解決してくれます。 最初の依存関係「依存可能なもの」 以下のような最初の依存関係(「依存可能なもの」)を作成する ... じリクエストの各ステップ(おそらく複数回)で依存関係を呼び出す必要があることがわかっている場合、 Depens を使用する際に、 use_cache=False というパラメータを設定することができます。 async def needy_dependency ( fresh_value : str = Depends ( get_value , us ... e_cache = False )): return { "fresh_value" : fresh_value } まとめ ここで使われている派手な言葉は別にして、 依存性注入 システムは非 ...
https://man.mtool.work/fastapi/0.115/tutorial/dependencies/sub-dependencies/
Release Notes 8116
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 ... nline-snapshot for tests. PR #12189 by @tiangolo . 0.114.1 Refactors ⚡️ Improve performance in request body parsing with a cache for internal model fields. PR #12184 by @tiangolo . Docs ? Remove duplicate line in docs for docs/en/docs/environment-vari ... ocs/az/learn/index.md . PR #11192 by @vusallyv . Internal ? Update FastAPI People. PR #11387 by @tiangolo . ⬆ Bump actions/cache from 3 to 4. PR #10988 by @dependabot[bot] . ⬆ Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.14. PR #11318 by @depen ... @tiangolo . ? Fix logic for when to install and use MkDocs Insiders. PR #11372 by @tiangolo . ? Do not use Python packages cache for publish. PR #11366 by @tiangolo . ? Add CI to test sdists for redistribution (e.g. Linux distros). PR #11365 by @tiang ...
https://man.mtool.work/fastapi/0.115/release-notes/
External Links and Articles 8006
External Links and Articles FastAPI has a great community constantly growing. There are many posts, articles, tools, and projects, related to FastAPI . Here's an incomplete list of some of them. Tip If you have an article, project, tool, or ... - termpair by @cs01 . ★ 1588 - coronavirus-tracker-api by @ExpDev07 . ★ 1546 - piccolo by @piccolo-orm . ★ 1478 - fastapi-cache by @long2ice . ★ 1467 - openapi-python-client by @openapi-generators . ★ 1462 - fastapi-crudrouter by @awtkns . ★ 1418 - a ...
https://man.mtool.work/fastapi/0.115/external-links/
PREV 1 NEXT