- Sort Score
- Result 10 results
- Languages All
Results 251 - 260 of 479 for unifon (0.09 sec)
-
docs_src/query_params_str_validations/tutorial008.py
from typing import Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Union[str, None] = Query( default=None, title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 466 bytes - Viewed (0) -
docs_src/dependencies/tutorial001_an.py
from typing import Union from fastapi import Depends, FastAPI from typing_extensions import Annotated 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 commons @app.get("/users/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 502 bytes - Viewed (0) -
docs_src/separate_openapi_schemas/tutorial002.py
from typing import List, Union from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: Union[str, None] = None app = FastAPI(separate_input_output_schemas=False) @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> List[Item]: return [ Item( name="Portal Gun",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 524 bytes - Viewed (0) -
docs_src/query_params/tutorial004.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 468 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001.py
from datetime import datetime, time, timedelta from typing import Union from uuid import UUID from fastapi import Body, FastAPI app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: datetime = Body(), end_datetime: datetime = Body(), process_after: timedelta = Body(), repeat_at: Union[time, None] = Body(default=None), ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 755 bytes - Viewed (0) -
.gitattributes
# Always check-out / check-in files with LF line endings. * text=auto eol=lf hack/verify-flags/known-flags.txt merge=union test/test_owners.csv merge=union **/zz_generated.*.go linguist-generated=true **/types.generated.go linguist-generated=true **/generated.pb.go linguist-generated=true **/generated.proto **/types_swagger_doc_generated.go linguist-generated=true api/openapi-spec/*.json linguist-generated=true
Registered: Fri Nov 01 09:05:11 UTC 2024 - Last Modified: Mon Oct 28 20:33:50 UTC 2024 - 510 bytes - Viewed (0) -
docs_src/dataclasses/tutorial003.py
from dataclasses import field # (1) from typing import List, Union from fastapi import FastAPI from pydantic.dataclasses import dataclass # (2) @dataclass class Item: name: str description: Union[str, None] = None @dataclass class Author: name: str items: List[Item] = field(default_factory=list) # (3) app = FastAPI()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Jul 31 14:09:15 UTC 2024 - 1.4K bytes - Viewed (0) -
docs_src/dependencies/tutorial004.py
from typing import Union from fastapi import Depends, FastAPI 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/") async def read_items(commons: CommonQueryParams = Depends()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 639 bytes - Viewed (0) -
docs_src/response_model/tutorial004_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 627 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001_an.py
from typing import Union from uuid import UUID from fastapi import Body, FastAPI from typing_extensions import Annotated app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()], repeat_at: Annotated[Union[time, None], Body()] = None, ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 830 bytes - Viewed (0)