Results of 1 - 10 of about 10 for once (0.005 sec.)
- Virtual Environments 13282
- 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
...g on a Python project for the first time , create a virtual environment inside your project . Tip You only need to do this once per project , not every time you work. venv uv To create a virtual environment, you can use the venv module that comes wit...sion. Many exotic errors while installing a package are solved by just upgrading pip first. Tip You would normally do this once , right after you create the virtual environment. Make sure the virtual environment is active (with the command above) and.... Tip If you used uv to create the virtual environment, it already did this for you, you can skip this step. ? Tip Do this once , right after you create the virtual environment. $ echo "*" > .venv/.gitignore What that command means echo "*" : will "p... - https://man.mtool.work/fastapi/0.115/virtual-environments/
- Repository Management Tasks 10529
- Repository Management Tasks These are the tasks that can be performed to manage the FastAPI repository by team members . Tip This section is useful only to a handful of people, team members with permissions to manage the repository. You can
...ranslation for and then the translated file path. For example: ? Add Spanish translation for `docs/es/docs/teleporting.md` Once the PR is merged, a GitHub Action ( latest-changes ) will use the PR title to update the latest changes automatically. So,...y in pyproject.toml . So, things that would affect final users, they would end up receiving the upgrade in their code base once they update. But this is not for upgrades to internal dependencies used for development, testing, docs, etc. Those interna...GitHub Discussions managing the translations for that language to notify people that there's a new translation to review. Once a native speaker comes, reviews the PR, and approves it, the GitHub Action will come and remove the awaiting-review label,... - https://man.mtool.work/fastapi/0.115/management-tasks/
- Settings and Environment Variables 9671
- 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
...env_file = ".env" Tip The model_config attribute is used just for Pydantic configuration. You can read more at Pydantic: Concepts: Configuration . Python 3.8+ from pydantic import BaseSettings class Settings ( BaseSettings ): app_name : str = "Aweso...Pydantic Settings class, and set the value to the filename with the dotenv file we want to use. Creating the Settings only once with lru_cache Reading a file from disk is normally a costly (slow) operation, so you probably want to do it only once and...nv file for each request. ⚠️ But as we are using the @lru_cache decorator on top, the Settings object will be created only once, the first time it's called. ✔️ Python 3.9+ from functools import lru_cache from fastapi import Depends , FastAPI from typ... - https://man.mtool.work/fastapi/0.115/advanced/settings/
- Extending OpenAPI 9028
- 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
...t way, your application 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....logo-teal.png" } app . openapi_schema = openapi_schema return app . openapi_schema app . openapi = custom_openapi Check it Once you go to http://127.0.0.1:8000/redoc you will see that you are using your custom logo (in this example, FastAPI 's logo):... - https://man.mtool.work/fastapi/0.115/how-to/extending-openapi/
- Lifespan Events 8616
- 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
...hat this code will be executed once , before the application starts receiving requests . The same way, you can define logic (code) that should be executed whe...n the application is shutting down . In this case, this code will be executed once , after having handled possibly many requests . Because this code is executed before the application starts taking request... - https://man.mtool.work/fastapi/0.115/advanced/events/
- Development - Contributing 8616
- Development - Contributing Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . First, you might want to see the basic ways to help FastAPI and get help . Developing If
...completion with: $ typer --install-completion zsh completion installed in /home/user/.bashrc. Completion will take effect once you restart the terminal. Docs Structure The documentation uses MkDocs . And there are extra tools/scripts in place to han...lready mentioned above, you can use the ./scripts/docs.py with the live command to preview the results (or mkdocs serve ). Once you are done, you can also test it all as it would look online, including all the other languages. To do that, first build... - https://man.mtool.work/fastapi/0.115/contributing/
- Header Parameter Models 7758
- Header Parameter Models Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . If you have a group of related header parameters , you can create a Pydantic model to decla
...ld allow you to re-use the model in multiple places and also to declare validations and metadata for all the parameters at once. ? Note This is supported since FastAPI version 0.115.0 . ? Header Parameters with a Pydantic Model Declare the header par... - https://man.mtool.work/fastapi/0.115/tutorial/header-param-models/
- Testing Dependencies with Overrides 7329
- Testing Dependencies with Overrides Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . Overriding dependencies during testing There are some scenarios where you might
...it might take some extra time than if you had a fixed mock user for tests. You probably want to test the external provider once, but not necessarily call it for every test that runs. In this case, you can override the dependency that calls that provi... - https://man.mtool.work/fastapi/0.115/advanced/testing-dependencies/
- Release Notes 7329
- 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
...docs/advanced/security/oauth2-scopes.md . PR #12263 by @ceb10n . ? Add Portuguese translation for docs/pt/docs/deployment/concepts.md . PR #12219 by @marcelomarkus . ? Add Portuguese translation for docs/pt/docs/how-to/conditional-openapi.md . PR #12...rsion yet. It's just a checkpoint. ? Refactors ♻️ Refactor deciding if embed body fields, do not overwrite fields, compute once per router, refactor internals in preparation for Pydantic models in Form , Query and others. PR #12117 by @tiangolo . Int...docs/de/docs/deployment/manually.md . PR #10738 by @nilslindemann . ? Add German translation for docs/de/docs/deployment/concepts.md . PR #10744 by @nilslindemann . ? Update German translation for docs/de/docs/features.md . PR #10284 by @nilslindema... - https://man.mtool.work/fastapi/0.115/release-notes/
- Request Files 7133
- Request Files Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define files to be uploaded by the client using File . Info To receive uploaded files, first
...le. E.g., await myfile.seek(0) would go to the start of the file. This is especially useful if you run await myfile.read() once and then need to read the contents again. close() : Closes the file. As all these methods are async methods, you need to "... - https://man.mtool.work/fastapi/0.115/tutorial/request-files/
PREV
1
NEXT