- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 585 for union (0.63 sec)
-
docs_src/dependencies/tutorial004_an.py
from typing import Union from fastapi import Depends, FastAPI from typing_extensions import Annotated app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 689 bytes - Viewed (0) -
.github/actions/people/app/main.py
class Labels(BaseModel): nodes: List[LabelNode] class ReviewNode(BaseModel): author: Union[Author, None] = None state: str class Reviews(BaseModel): nodes: List[ReviewNode] class PullRequestNode(BaseModel): number: int labels: Labels author: Union[Author, None] = None title: str createdAt: datetime state: str comments: Comments
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
docs_src/dependency_testing/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import Depends, FastAPI from fastapi.testclient import TestClient app = FastAPI() async def common_parameters( q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.5K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial011_py39.py
from typing import Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items(q: Union[list[str], None] = Query(default=None)): query_items = {"q": q}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 221 bytes - Viewed (0) -
docs_src/response_model/tutorial003_01.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class BaseUser(BaseModel): username: str email: EmailStr full_name: Union[str, None] = None class UserIn(BaseUser): password: str @app.post("/user/") async def create_user(user: UserIn) -> BaseUser:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 349 bytes - Viewed (0) -
docs/em/docs/tutorial/query-params-str-validations.md
{!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!} ``` đĸ đĸ `q` đ `Union[str, None]` (âī¸ `str | None` đ 3ī¸âŖ.1ī¸âŖ0ī¸âŖ), đ â đ âĢī¸ đ `str` âī¸ đĒ `None`, & đ, đĸ đ˛ `None`, FastAPI đ đ âĢī¸ đĢ â. !!! note FastAPI đ đ đ đ˛ `q` đĢ â âŠī¸ đĸ đ˛ `= None`. `Union` `Union[str, None]` đ â đ đ¨âđ¨ đ¤ đ đ đâđĻē & đ â. ## đ đŦ
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.9K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial001.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 271 bytes - Viewed (0) -
docs_src/response_model/tutorial002.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: Union[str, None] = None # Don't do this in production! @app.post("/user/") async def create_user(user: UserIn) -> UserIn:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 350 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial002.py
from typing import List, Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: List[str] = [] @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 413 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial014_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( hidden_query: Annotated[Union[str, None], Query(include_in_schema=False)] = None, ): if hidden_query: return {"hidden_query": hidden_query} else:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 344 bytes - Viewed (0)