- Sort Score
- Result 10 results
- Languages All
Results 411 - 420 of 1,074 for Str (0.01 sec)
-
docs_src/sql_databases/tutorial001_py310.py
from sqlmodel import Field, Session, SQLModel, create_engine, select class Hero(SQLModel, table=True): id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) age: int | None = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}" connect_args = {"check_same_thread": False}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.7K bytes - Viewed (0) -
docs_src/dataclasses/tutorial003.py
@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() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: List[Item]): # (5)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Jul 31 14:09:15 UTC 2024 - 1.4K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0) -
fastapi/exceptions.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 4.9K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_an_py310.py
from sqlmodel import Field, Session, SQLModel, create_engine, select class Hero(SQLModel, table=True): id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) age: int | None = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}" connect_args = {"check_same_thread": False}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.7K bytes - Viewed (0) -
tests/test_response_code_no_body.py
from pydantic import BaseModel app = FastAPI() class JsonApiResponse(JSONResponse): media_type = "application/vnd.api+json" class Error(BaseModel): status: str title: str class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a", status_code=204, response_class=JsonApiResponse,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.2K bytes - Viewed (0) -
docs/em/docs/python-types.md
//// π―ββοΈ πΌ π β π `item` πͺ `int` βοΈ `str`. #### π² `None` π πͺ π£ π π² πͺ βοΈ π, π `str`, βοΈ π β«οΈ πͺ `None`. π 3οΈβ£.6οΈβ£ & π (β π 3οΈβ£.1οΈβ£0οΈβ£) π πͺ π£ β«οΈ π & βοΈ `Optional` βͺοΈβ‘οΈ `typing` πΉ. ```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` βοΈ `Optional[str]` β©οΈ `str` π β‘οΈ π¨βπ¨ βΉ π π β πβ π πͺ π€ π π² π§ `str`, πβ β«οΈ πͺ π€ `None` πββοΈ.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.4K bytes - Viewed (0) -
docs_src/bigger_applications/app_an_py39/routers/items.py
@router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db: raise HTTPException(status_code=404, detail="Item not found") return {"name": fake_items_db[item_id]["name"], "item_id": item_id} @router.put( "/{item_id}", tags=["custom"], responses={403: {"description": "Operation forbidden"}}, ) async def update_item(item_id: str): if item_id != "plumbus":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1011 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial005_py310.py
from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item = Body( openapi_examples={ "normal": { "summary": "A normal example",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 26 18:03:13 UTC 2023 - 1.3K bytes - Viewed (0) -
docs/ko/docs/tutorial/encoder.md
κ°μ λ°©μμΌλ‘ μ΄ λ°μ΄ν°λ² μ΄μ€λ Pydantic λͺ¨λΈ(μμ±μ΄ μλ κ°μ²΄)μ λ°μ§ μκ³ , `dict` λ§μ λ°μ΅λλ€. μ΄λ₯Ό μν΄ `jsonable_encoder` λ₯Ό μ¬μ©ν μ μμ΅λλ€. Pydantic λͺ¨λΈκ³Ό κ°μ κ°μ²΄λ₯Ό λ°κ³ JSON νΈν κ°λ₯ν λ²μ μΌλ‘ λ°νν©λλ€: ```Python hl_lines="5 22" {!../../docs_src/encoder/tutorial001.py!} ``` μ΄ μμλ Pydantic λͺ¨λΈμ `dict`λ‘, `datetime` νμμ `str`λ‘ λ³νν©λλ€.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.9K bytes - Viewed (0)