コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 5 of about 5 for settings (0.004 sec.)
Settings and Environment Variables 12814
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 ... ns, for example secret keys, database credentials, credentials for email services, etc. Most of these settings are variable (can change), like database URLs. And many could be sensitive, like secrets. For this reason it's common to p ... ronment variable will be a str , and any conversion to a different type or any validation has to be done in code. Pydantic Settings Fortunately, Pydantic provides a great utility to handle these settings coming from environment variables with Pydantic: S ... ettings management . Install pydantic-settings First, make sure you create your virtual environment , activate it, and then install the pydantic-settings package: $ pip ...
https://man.mtool.work/fastapi/0.115/advanced/settings/
条件付き OpenAPI 8732
条件付き OpenAPI 必要であれば、設定と環境変数を利用して、環境に応じて条件付きでOpenAPIを構成することが可能です。また、完全にOpenAPIを無効にすることもできます。 セキュリティとAPI、およびドキュメントについて 本番環境においてドキュメントのUIを ... 成は、共通のPydanticの設定を使用して簡単に切り替えられます。 例えば、 Python 3.8+ from fastapi import FastAPI from pydantic_settings import BaseSettings class Settings ( BaseSettings ): openapi_url : str = "/openapi.json" settings = Settings () app = Fast ... API ( openapi_url = settings . openapi_url ) @app . get ( "/" ) def root (): return { "message" : "Hello World" } ここでは openapi_url の設定を、デフォ ...
https://man.mtool.work/fastapi/0.115/how-to/conditional-openapi/
Configure Swagger UI 8273
Configure Swagger UI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can configure some extra Swagger UI parameters . To configure them, pass the swagger_ui_pa ... needs. Disable Syntax Highlighting For example, you could disable syntax highlighting in Swagger UI. Without changing the settings, syntax highlighting is enabled by default: But you can disable it by setting syntaxHighlight to False : Python 3.8+ from ... setting a different value in the argument swagger_ui_parameters . For example, to disable deepLinking you could pass these settings to swagger_ui_parameters : Python 3.8+ from fastapi import FastAPI app = FastAPI ( swagger_ui_parameters = { "deepLinking" ... see all the other possible configurations you can use, read the official docs for Swagger UI parameters . JavaScript-only settings Swagger UI also allows other configurations to be JavaScript-only objects (for example, JavaScript functions). FastAPI als ...
https://man.mtool.work/fastapi/0.115/how-to/configure-swagger-ui/
Release Notes 8162
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 ... tutorial/request-forms.md . PR #13216 by @Joao-Pedro-P-Holanda . ? Update Portuguese translation for docs/pt/docs/advanced/settings.md . PR #13209 by @ceb10n . ? Add Portuguese translation for docs/pt/docs/tutorial/security/oauth2-jwt.md . PR #13205 by @ ... torial/dependencies/index.md . PR #11757 by @Joao-Pedro-P-Holanda . ? Add Portuguese translation for docs/pt/docs/advanced/settings.md . PR #11739 by @Joao-Pedro-P-Holanda . ? Add French translation for docs/fr/docs/learn/index.md . PR #11712 by @benjami ... s/de/docs/advanced/openapi-callbacks.md . PR #10710 by @nilslindemann . ? Add German translation for docs/de/docs/advanced/settings.md . PR #10709 by @nilslindemann . ? Add German translation for docs/de/docs/advanced/wsgi.md . PR #10713 by @nilslindeman ...
https://man.mtool.work/fastapi/0.115/release-notes/
環境変数 7923
環境変数 Tip もし、「環境変数」とは何か、それをどう使うかを既に知っている場合は、このセクションをスキップして構いません。 環境変数( env var とも呼ばれる)はPythonコードの 外側 、つまり OS に存在する変数で、Pythonから読み取ることができます。 ... ンはコード内で行う必要があります。 環境変数を使用して アプリケーション設定 を管理する方法については、 高度なユーザーガイド - Settings and Environment Variables で詳しく学べます。 PATH 環境変数 PATH という 特別な 環境変数があります。この環境変数は、OS(Linu ...
https://man.mtool.work/fastapi/0.115/environment-variables/
PREV 1 NEXT