- Sort Score
- Result 10 results
- Languages All
Results 1381 - 1390 of 1,916 for FastApi (0.05 sec)
-
docs_src/path_params/tutorial005_py39.py
from enum import Enum from fastapi import FastAPI class ModelName(str, Enum): alexnet = "alexnet" resnet = "resnet" lenet = "lenet" app = FastAPI() @app.get("/models/{model_name}") async def get_model(model_name: ModelName): if model_name is ModelName.alexnet: return {"model_name": model_name, "message": "Deep Learning FTW!"} if model_name.value == "lenet":
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 546 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial006_an_py39.py
from typing import Annotated from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( *, item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: str, size: Annotated[float, Query(gt=0, lt=10.5)], ): results = {"item_id": item_id} if q: results.update({"q": q}) if size: results.update({"size": size})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Aug 28 23:39:15 UTC 2024 - 447 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial008_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query( title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ] = None, ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 511 bytes - Viewed (0) -
docs/ru/docs/how-to/custom-request-and-route.md
Например, если вы хотите прочитать или изменить тело запроса до того, как оно будет обработано вашим приложением. /// danger | Опасность Это «продвинутая» возможность. Если вы только начинаете работать с **FastAPI**, возможно, стоит пропустить этот раздел. /// ## Сценарии использования { #use-cases } Некоторые сценарии:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Dec 11 21:25:03 UTC 2025 - 7.2K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/sub-dependencies.md
# Sub-dependencies { #sub-dependencies } You can create dependencies that have **sub-dependencies**. They can be as **deep** as you need them to be. **FastAPI** will take care of solving them. ## First dependency "dependable" { #first-dependency-dependable } You could create a first dependency ("dependable") like: {* ../../docs_src/dependencies/tutorial005_an_py310.py hl[8:9] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.7K bytes - Viewed (0) -
tests/main.py
import http from typing import Optional from fastapi import FastAPI, Path, Query external_docs = { "description": "External API documentation.", "url": "https://docs.example.com/api-general", } app = FastAPI(openapi_external_docs=external_docs) @app.api_route("/api_route") def non_operation(): return {"message": "Hello World"} def non_decorated_route(): return {"message": "Hello World"}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 4.5K bytes - Viewed (0) -
docs/pt/docs/how-to/configure-swagger-ui.md
Para configurá-los, passe o argumento `swagger_ui_parameters` ao criar o objeto da aplicação `FastAPI()` ou para a função `get_swagger_ui_html()`. `swagger_ui_parameters` recebe um dicionário com as configurações passadas diretamente para o Swagger UI. O FastAPI converte as configurações para **JSON** para torná-las compatíveis com JavaScript, pois é disso que o Swagger UI precisa.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.2K bytes - Viewed (0) -
tests/test_param_include_in_schema.py
from typing import Optional import pytest from fastapi import Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient app = FastAPI() @app.get("/hidden_cookie") async def hidden_cookie( hidden_cookie: Optional[str] = Cookie(default=None, include_in_schema=False), ): return {"hidden_cookie": hidden_cookie} @app.get("/hidden_header") async def hidden_header(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 7.4K bytes - Viewed (0) -
docs_src/dataclasses_/tutorial002_py39.py
from dataclasses import dataclass, field from typing import Union from fastapi import FastAPI @dataclass class Item: name: str price: float tags: list[str] = field(default_factory=list) description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 543 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"]) async def read_items():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 537 bytes - Viewed (0)