- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,086 for str (0.06 sec)
-
fastapi/_compat.py
def get_model_definitions( *, flat_models: Set[Union[Type[BaseModel], Type[Enum]]], model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str], ) -> Dict[str, Any]: definitions: Dict[str, Dict[str, Any]] = {} for model in flat_models: m_schema, m_definitions, m_nested_models = model_process_schema(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:36:32 UTC 2024 - 23.4K bytes - Viewed (0) -
tests/test_skip_defaults.py
class SubModel(BaseModel): a: Optional[str] = "foo" class Model(BaseModel): x: Optional[int] = None sub: SubModel class ModelSubclass(Model): y: int z: int = 0 w: Optional[int] = None class ModelDefaults(BaseModel): w: Optional[str] = None x: Optional[str] = None y: str = "y" z: str = "z"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_response_model_data_filter_no_inheritance.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.7K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py310/main.py
"bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: str | None = None @app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: Annotated[str, Header()]): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.1K bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_an.py
from typing_extensions import Annotated app = FastAPI() class CommonHeaders(BaseModel): model_config = {"extra": "forbid"} 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: Annotated[CommonHeaders, Header()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 486 bytes - Viewed (0) -
docs/em/docs/tutorial/metadata.md
โซ๏ธ โ ๐ โ 1๏ธโฃ ๐ ๐ ๐. ๐ ๐ ๐ช ๐: * `name` (**โ**): `str` โฎ๏ธ ๐ ๐ ๐ โ๏ธ `tags` ๐ข ๐ *โก ๐ ๏ธ* & `APIRouter`โ. * `description`: `str` โฎ๏ธ ๐ ๐ ๐. โซ๏ธ ๐ช โ๏ธ โ & ๐ ๐ฆ ๐ฉบ ๐. * `externalDocs`: `dict` ๐ฌ ๐ข ๐งพ โฎ๏ธ: * `description`: `str` โฎ๏ธ ๐ ๐ ๐ข ๐ฉบ. * `url` (**โ**): `str` โฎ๏ธ ๐ ๐ข ๐งพ. ### โ ๐ ๐ โก๏ธ ๐ ๐ ๐ผ โฎ๏ธ ๐ `users` & `items`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.1K bytes - Viewed (0) -
schema/callbacks_test.go
if err != nil { t.Fatalf("failed to parse user with callback, got error %v", err) } for _, str := range []string{"BeforeSave", "AfterCreate"} { if !reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) { t.Errorf("%v should be true", str) } } for _, str := range []string{"BeforeCreate", "BeforeUpdate", "AfterUpdate", "AfterSave", "BeforeDelete", "AfterDelete", "AfterFind"} {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 939 bytes - Viewed (0) -
docs_src/body_multiple_params/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 class User(BaseModel): username: str full_name: str | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item, user: User):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 446 bytes - Viewed (0) -
tests/main.py
@app.get("/path/param/{item_id}") def get_path_param_id(item_id: Optional[str] = Path()): return item_id @app.get("/path/param-minlength/{item_id}") def get_path_param_min_length(item_id: str = Path(min_length=3)): return item_id @app.get("/path/param-maxlength/{item_id}") def get_path_param_max_length(item_id: str = Path(max_length=3)): return item_id
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 4.3K bytes - Viewed (0) -
docs_src/body_nested_models/tutorial006_py310.py
from fastapi import FastAPI from pydantic import BaseModel, HttpUrl app = FastAPI() class Image(BaseModel): url: HttpUrl name: str class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() images: list[Image] | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 475 bytes - Viewed (0)