- Sort Score
- Result 10 results
- Languages All
Results 461 - 470 of 1,977 for Fastapi (0.06 sec)
-
docs_src/query_param_models/tutorial001_an.py
from typing import List from fastapi import FastAPI, Query from pydantic import BaseModel, Field from typing_extensions import Annotated, Literal app = FastAPI() class FilterParams(BaseModel): limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: List[str] = [] @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 478 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_pv1_an_py39.py
from fastapi import FastAPI, Query from pydantic import BaseModel, Field from typing_extensions import Annotated, Literal app = FastAPI() class FilterParams(BaseModel): class Config: extra = "forbid" limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 497 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_pv1_py39.py
from fastapi import FastAPI, Query from pydantic import BaseModel, Field from typing_extensions import Literal app = FastAPI() class FilterParams(BaseModel): class Config: extra = "forbid" limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 476 bytes - Viewed (0) -
docs_src/header_param_models/tutorial001_py39.py
from typing import Union from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: Union[str, None] = None traceparent: Union[str, None] = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: CommonHeaders = Header()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 390 bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial002_pv1_an_py39.py
from typing import Annotated, Union from fastapi import Cookie, FastAPI from pydantic import BaseModel app = FastAPI() class Cookies(BaseModel): class Config: extra = "forbid" session_id: str fatebook_tracker: Union[str, None] = None googall_tracker: Union[str, None] = None @app.get("/items/") async def read_items(cookies: Annotated[Cookies, Cookie()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 406 bytes - Viewed (0) -
docs_src/dependencies/tutorial011.py
from fastapi import Depends, FastAPI app = FastAPI() class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 504 bytes - Viewed (0) -
docs/pt/docs/how-to/extending-openapi.md
### **FastAPI** Normal Primeiro, escreva toda a sua aplicação **FastAPI** normalmente: ```Python hl_lines="1 4 7-9" {!../../docs_src/extending_openapi/tutorial001.py!} ``` ### Gerar o esquema OpenAPI
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 22 17:40:08 UTC 2024 - 3.4K bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial001_py39.py
from typing import Union from fastapi import FastAPI, status from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post("/items/", response_model=Item, status_code=status.HTTP_201_CREATED) async def create_item(item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 401 bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial002_pv1_an.py
from typing import Union from fastapi import Cookie, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Cookies(BaseModel): class Config: extra = "forbid" session_id: str fatebook_tracker: Union[str, None] = None googall_tracker: Union[str, None] = None @app.get("/items/") async def read_items(cookies: Annotated[Cookies, Cookie()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 435 bytes - Viewed (0) -
docs/en/docs/reference/dependencies.md
Dependencies are handled mainly with the special function `Depends()` that takes a callable. Here is the reference for it and its parameters. You can import it directly from `fastapi`: ```python from fastapi import Depends ``` ::: fastapi.Depends ## `Security()` For many scenarios, you can handle security (authorization, authentication, etc.) with dependencies, using `Depends()`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 671 bytes - Viewed (0)