- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 171 for dateTime (0.15 sec)
-
tests/test_serialize_response_dataclass.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Aug 26 13:56:47 UTC 2022 - 4.9K bytes - Viewed (0) -
docs_src/python_types/tutorial011_py310.py
from datetime import datetime from pydantic import BaseModel class User(BaseModel): id: int name: str = "John Doe" signup_ts: 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)
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 461 bytes - Viewed (0) -
tests/test_datetime_custom_encoder.py
from datetime import datetime, timezone from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel from .utils import needs_pydanticv1, needs_pydanticv2 @needs_pydanticv2 def test_pydanticv2(): from pydantic import field_serializer class ModelWithDatetimeField(BaseModel): dt_field: datetime @field_serializer("dt_field")
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
docs/uk/docs/tutorial/extra-data-types.md
* `datetime.datetime`: * Пайтонівський `datetime.datetime`. * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15T15:53:00+05:00`. * `datetime.date`: * Пайтонівський `datetime.date`. * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15`. * `datetime.time`: * Пайтонівський `datetime.time`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 5.8K bytes - Viewed (0) -
docs/em/docs/tutorial/extra-data-types.md
* 🐩 "⭐ 😍 🆔", ⚠ 🆔 📚 💽 & ⚙️. * 📨 & 📨 🔜 🎨 `str`. * `datetime.datetime`: * 🐍 `datetime.datetime`. * 📨 & 📨 🔜 🎨 `str` 💾 8️⃣6️⃣0️⃣1️⃣ 📁, 💖: `2008-09-15T15:53:00+05:00`. * `datetime.date`: * 🐍 `datetime.date`. * 📨 & 📨 🔜 🎨 `str` 💾 8️⃣6️⃣0️⃣1️⃣ 📁, 💖: `2008-09-15`. * `datetime.time`: * 🐍 `datetime.time`. * 📨 & 📨 🔜 🎨 `str` 💾 8️⃣6️⃣0️⃣1️⃣ 📁, 💖: `14:23:55.003`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 2.6K bytes - Viewed (0) -
docs/en/docs/tutorial/extra-data-types.md
* `datetime.datetime`: * A Python `datetime.datetime`. * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15T15:53:00+05:00`. * `datetime.date`: * Python `datetime.date`. * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15`. * `datetime.time`: * A Python `datetime.time`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 4.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/extra-data-types.md
* 在请求和响应中将以 `str` 表示。 * `datetime.datetime`: * 一个 Python `datetime.datetime`. * 在请求和响应中将表示为 ISO 8601 格式的 `str` ,比如: `2008-09-15T15:53:00+05:00`. * `datetime.date`: * Python `datetime.date`. * 在请求和响应中将表示为 ISO 8601 格式的 `str` ,比如: `2008-09-15`. * `datetime.time`: * 一个 Python `datetime.time`. * 在请求和响应中将表示为 ISO 8601 格式的 `str` ,比如: `14:23:55.003`. * `datetime.timedelta`: * 一个 Python `datetime.timedelta`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 3.9K bytes - Viewed (0) -
docs_src/python_types/tutorial011_py39.py
from datetime import datetime from typing import 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)
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 492 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001.py
from datetime import datetime, time, timedelta from typing import Union from uuid import UUID from fastapi import Body, FastAPI app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: datetime = Body(), end_datetime: datetime = Body(), process_after: timedelta = Body(), repeat_at: Union[time, None] = Body(default=None), ):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 755 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001_an.py
from datetime import datetime, time, timedelta from typing import Union from uuid import UUID from fastapi import Body, FastAPI from typing_extensions import Annotated app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()],
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 830 bytes - Viewed (0)