- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 355 for unicos (0.21 sec)
-
docs_src/header_param_models/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Header from pydantic import BaseModel 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/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 451 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial002_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: 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}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 407 bytes - Viewed (0) -
docs_src/pydantic_v1_in_v2/tutorial003_an_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel as BaseModelV2 from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: Union[str, None] = None size: float class ItemV2(BaseModelV2): name: str description: Union[str, None] = None size: float app = FastAPI() @app.post("/items/", response_model=ItemV2)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 445 bytes - Viewed (0) -
src/main/java/jcifs/internal/smb1/ServerMessageBlock.java
* @param dstIndex the starting offset in the buffer * @param unicode true to use Unicode encoding, false for OEM encoding * @return the number of bytes written */ protected int writeString(final String str, final byte[] dst, int dstIndex, final boolean unicode) { final int start = dstIndex; if (unicode) { // Unicode requires word alignmentRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 38.9K bytes - Viewed (0) -
tests/test_required_noneable.py
from typing import Union from fastapi import Body, FastAPI, Query from fastapi.testclient import TestClient app = FastAPI() @app.get("/query") def read_query(q: Union[str, None]): return q @app.get("/explicit-query") def read_explicit_query(q: Union[str, None] = Query()): return q @app.post("/body-embed") def send_body_embed(b: Union[str, None] = Body(embed=True)): return b
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat May 14 19:08:31 UTC 2022 - 1.5K bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import Cookie, FastAPI from pydantic import BaseModel app = FastAPI() class Cookies(BaseModel): session_id: str fatebook_tracker: Union[str, None] = None googall_tracker: Union[str, None] = None @app.get("/items/") async def read_items(cookies: Annotated[Cookies, Cookie()]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 362 bytes - Viewed (0) -
docs_src/dataclasses_/tutorial002_py39.py
from dataclasses import dataclass, field from typing import Union from fastapi import FastAPI @dataclass class Item: name: str price: float tags: list[str] = field(default_factory=list) description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 543 bytes - Viewed (0) -
docs_src/request_files/tutorial001_02_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[Union[bytes, None], File()] = None): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: Union[UploadFile, None] = None): if not file:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 524 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial003_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: Union[float, None] = None tags: set[str] = set() @app.post( "/items/", response_model=Item, summary="Create an item",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 512 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial004_py39.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item = Body( examples=[ { "name": "Foo",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 824 bytes - Viewed (0)