- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 699 for typings (0.16 sec)
-
docs_src/generate_clients/tutorial001.py
from typing import List from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str @app.post("/items/", response_model=ResponseMessage) async def create_item(item: Item): return {"message": "item received"} @app.get("/items/", response_model=List[Item]) async def get_items():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 04 22:02:18 GMT 2022 - 519 bytes - Viewed (0) -
docs_src/response_model/tutorial001_py39.py
from typing import Any, 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.post("/items/", response_model=Item) async def create_item(item: Item) -> Any: return item @app.get("/items/", response_model=list[Item])
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 556 bytes - Viewed (0) -
docs_src/body_updates/tutorial001.py
from typing import List, Union from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: Union[str, None] = None description: Union[str, None] = None price: Union[float, None] = None tax: float = 10.5 tags: List[str] = [] items = { "foo": {"name": "Foo", "price": 50.2},
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 906 bytes - Viewed (0) -
docs/ja/docs/tutorial/extra-models.md
OpenAPIでは`anyOf`で定義されます。 そのためには、標準的なPythonの型ヒント<a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>を使用します: ```Python hl_lines="1 14 15 18 19 20 33" {!../../../docs_src/extra_models/tutorial003.py!} ``` ## モデルのリスト 同じように、オブジェクトのリストのレスポンスを宣言することができます。 そのためには、標準のPythonの`typing.List`を使用する: ```Python hl_lines="1 20"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 15 15:36:32 GMT 2024 - 6.7K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001.py
from typing import Union from fastapi import FastAPI, Path 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 = Path(title="The ID of the item to get", ge=0, le=1000), q: Union[str, None] = None,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 596 bytes - Viewed (0) -
docs_src/python_types/tutorial011.py
from datetime import datetime from typing import List, Union from pydantic import BaseModel class User(BaseModel): id: int name: str = "John Doe" signup_ts: Union[datetime, None] = None friends: List[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Sep 02 15:56:35 GMT 2023 - 498 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010.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, alias="item-query", title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, max_length=50, pattern="^fixedquery$", deprecated=True,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 574 bytes - Viewed (0) -
docs/en/docs/tutorial/extra-models.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.7K bytes - Viewed (1) -
ci/official/containers/linux_arm64/jax.requirements.txt
# REQUIREMENTS_FILE=jax.requirements.txt setuptools wheel cloudpickle colorama>=0.4.4 matplotlib pillow>=9.1.0 rich absl-py portpicker six opt-einsum auditwheel typing_extensions importlib_metadata>=4.6 numpy==1.26.0;python_version=="3.12" numpy==1.23.4;python_version=="3.11" numpy==1.22.4;python_version<"3.11" scipy==1.11.2;python_version=="3.12" scipy==1.9.2;python_version=="3.11"
Plain Text - Registered: Tue May 07 12:40:20 GMT 2024 - Last Modified: Tue Jan 30 20:02:17 GMT 2024 - 570 bytes - Viewed (0) -
pyproject.toml
"Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Libraries", "Topic :: Software Development", "Typing :: Typed", "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: AsyncIO", "Framework :: FastAPI", "Framework :: Pydantic", "Framework :: Pydantic :: 1",
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.3K bytes - Viewed (0)