- Sort Score
- Result 10 results
- Languages All
Results 241 - 250 of 479 for unifon (0.08 sec)
-
docs_src/header_params/tutorial002_an.py
from typing import Union from fastapi import FastAPI, Header from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( strange_header: Annotated[ Union[str, None], Header(convert_underscores=False) ] = None, ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 317 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial011_an.py
from typing import List, Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[List[str], None], Query()] = None): query_items = {"q": q}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 272 bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/schemas.py
from typing import Any, List, Union import peewee from pydantic import BaseModel from pydantic.utils import GetterDict class PeeweeGetterDict(GetterDict): def get(self, key: Any, default: Any = None): res = getattr(self._obj, key, default) if isinstance(res, peewee.ModelSelect): return list(res) return res class ItemBase(BaseModel): title: str description: Union[str, None] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 868 bytes - Viewed (0) -
docs_src/query_params/tutorial006b.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 301 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial009_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 327 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:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 349 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[Union[str, None], Query(min_length=3, max_length=50)] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 372 bytes - Viewed (0) -
docs/ru/docs/tutorial/query-params-str-validations.md
```Python q: str ``` вместо: ```Python q: Union[str, None] = None ``` Но у нас query-параметр определён как `Query`. Например: //// tab | Annotated ```Python q: Annotated[Union[str, None], Query(min_length=3)] = None ``` //// //// tab | без Annotated ```Python q: Union[str, None] = Query(default=None, min_length=3) ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 37.5K bytes - Viewed (0) -
docs_src/encoder/tutorial001.py
from datetime import datetime from typing import Union from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from pydantic import BaseModel fake_db = {} class Item(BaseModel): title: str timestamp: datetime description: Union[str, None] = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item): json_compatible_item_data = jsonable_encoder(item)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 461 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial001_an_py39.py
from typing import Annotated, Union 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")], q: Annotated[Union[str, None], Query(alias="item-query")] = None, ): results = {"item_id": item_id} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 388 bytes - Viewed (0)