コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 10 of about 21 for different (0.002 sec.)
Virtual Environments 13327
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 ... virtual environments, how to create them and use them, you might want to skip this section. ? Tip A virtual environment is different than an environment variable . An environment variable is a variable in the system that can be used by programs. A virtual ... a new virtual environment in a directory called .venv . .venv or other name You could create the virtual environment in a different directory, but there's a convention of calling it .venv . Activate the Virtual Environment Activate the new virtual enviro ... package, you use the one from your virtual environment and not any other that could be installed globally, probably with a different version than what you need. Check the Virtual Environment is Active Check that the virtual environment is active (the prev ...
https://man.mtool.work/fastapi/0.115/virtual-environments/
Settings and Environment Variables 10976
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 ... gs, as they are external to Python and have to be compatible with other programs and the rest of the system (and even with different operating systems, as Linux, Windows, macOS). That means that any value read in Python from an environment variable will b ... e 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 ... ons, and possibly default values. You can use all the same validation features and tools you use for Pydantic models, like different data types and additional validations with Field() . Pydantic v2 Pydantic v1 Python 3.8+ from fastapi import FastAPI from ...
https://man.mtool.work/fastapi/0.115/advanced/settings/
Additional Responses in OpenAPI 10198
Additional Responses in OpenAPI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . Warning This is a rather advanced topic. If you are starting with FastAPI , you mig ... lidationError" } } } } } } } Additional media types for the main response You can use this same responses parameter to add different media types for the same main response. For example, you can add an additional media type of image/png , declaring that yo ... ere goes my hero" } Note Notice that you have to return the image using a FileResponse directly. Info Unless you specify a different media type explicitly in your responses parameter, FastAPI will assume the response has the same media type as the main re ... ch response inside your responses parameter. Including description , headers , content (inside of this is that you declare different media types and JSON Schemas), and links . ...
https://man.mtool.work/fastapi/0.115/advanced/additional-responses/
How To - Recipes 10198
How To - Recipes Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . Here you will see different recipes or "how to" guides for several topics . Most of these ideas wo ...
https://man.mtool.work/fastapi/0.115/how-to/
Repository Management Tasks 9674
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 ... em to change the original content, for example with obvious additional documentation sections. The translation doesn't use different Markdown structures, for example adding HTML tags when the original didn't have them. The "admonition" sections, like tip ... e docs should include a source example file, not write Python directly in Markdown. If the source example(s) file can have different syntax for Python 3.8, 3.9, 3.10, there should be different versions of the file, and they should be shown in tabs in the ...
https://man.mtool.work/fastapi/0.115/management-tasks/
Repository Management 9420
Repository Management Here's a short description of how the FastAPI repository is managed and maintained. Owner I, @tiangolo , am the creator and owner of the FastAPI repository. ? I normally give the final review to each PR before merging ... ions on the project, I'm the BDFL . ? Team There's a team of people that help manage and maintain the project. ? They have different levels of permissions and specific instructions . Some of the tasks they can perform include: Adding labels to PRs. Editin ...
https://man.mtool.work/fastapi/0.115/management/
Bigger Applications - Multiple Files 9420
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 ... Router in our app, not in any other code that uses it. So, for example, other projects could use the same APIRouter with a different authentication method. Include a path operation We can also add path operations directly to the FastAPI app. Here we do it ... l the submodules, using the correct paths (and prefixes) and the correct tags: Include the same router multiple times with different prefix You can also use .include_router() multiple times with the same router using different prefixes. This could be usef ... ul, for example, to expose the same API under different prefixes, e.g. /api/v1 and /api/latest . This is an advanced usage that you might not really need, but it's there in case ...
https://man.mtool.work/fastapi/0.115/tutorial/bigger-applications/
Response - Change Status Code 8642
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 ... e cases you need to return a different status code than the default. Use case For example, imagine that you want to return an HTTP status code of "OK" 200 by def ...
https://man.mtool.work/fastapi/0.115/advanced/response-change-status-code/
GraphQL 8642
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 ... gn closest to FastAPI's design, it's all based on type annotations . Depending on your use case, you might prefer to use a different library, but if you asked me, I would probably suggest you try Strawberry . Here's a small preview of how you could integr ...
https://man.mtool.work/fastapi/0.115/how-to/graphql/
Generate Clients 8118
Generate Clients 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 OpenAPI specification, you get automatic compatibility with many tools, ... advantage that is not necessarily obvious is that you can generate clients (sometimes called SDKs ) for your API, for many different programming languages . OpenAPI Client Generators There are many tools to generate clients from OpenAPI . A common tool is ... ompletion: FastAPI App with Tags In many cases your FastAPI app will be bigger, and you will probably use tags to separate different groups of path operations . For example, you could have a section for items and another section for users , and they could ...
https://man.mtool.work/fastapi/0.115/advanced/generate-clients/
PREV 1 2 3 NEXT