Results of 1 - 4 of about 4 for exist (0.002 sec.)
- Response - Change Status Code 12408
- Response - Change Status Code Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You probably read before that you can set a default Response Status Code . But in som
.... Use case For example, imagine that you want to return an HTTP status code of "OK" 200 by default. But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" 201 . But you still want to be able to filter and conv...def get_or_create_task ( task_id : str , response : Response ): if task_id not in tasks : tasks [ task_id ] = "This didn't exist before" response . status_code = status . HTTP_201_CREATED return tasks [ task_id ] And then you can return any object you... - https://man.mtool.work/fastapi/0.115/advanced/response-change-status-code/
- Repository Management Tasks 8488
- 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
...o put this PR in. Make sure you use a supported label from the latest-changes list of labels : breaking : Breaking Changes Existing code will break if they update the version without changing their code. This rarely happens, so this label is not frequ...ike vulnerabilities. It would almost never be used. feature : Features New features, adding support for things that didn't exist before. bug : Fixes Something that was supported didn't work, and this fixes it. There are many PRs that claim to be bug f... - https://man.mtool.work/fastapi/0.115/management-tasks/
- Bigger Applications - Multiple Files 8247
- Bigger Applications - Multiple Files Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . If you are building an application or a web API, it's rarely the case that you
...aginary file at app/routers/dependencies.py )... and from it, import the function get_token_header . But that file doesn't exist, our dependencies are in a file at app/dependencies.py . Remember how our app/file structure looks like: The two dots .. ,... - https://man.mtool.work/fastapi/0.115/tutorial/bigger-applications/
- Simple OAuth2 with Password and Bearer 7785
- Simple OAuth2 with Password and Bearer Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . Now let's build from the previous chapter and add the missing parts to have
...turn uses get_current_user as a dependency. Both of these dependencies will just return an HTTP error if the user doesn't exist, or if is inactive. So, in our endpoint, we will only get a user if the user exists, was correctly authenticated, and is a... - https://man.mtool.work/fastapi/0.115/tutorial/security/simple-oauth2/
PREV
1
NEXT