- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for a_uuid (0.04 sec)
-
tests/test_inherited_custom_class.py
with pytest.raises(TypeError): vars(asyncpg_uuid) return {"fast_uuid": asyncpg_uuid} class SomeCustomClass(BaseModel): model_config = {"arbitrary_types_allowed": True} a_uuid: MyUuid @field_serializer("a_uuid") def serialize_a_uuid(self, v): return str(v) @app.get("/get_custom_class") def return_some_user():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py
from __future__ import annotations import uuid from dataclasses import dataclass, field from typing import Union from dirty_equals import IsUUID from fastapi import FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot @dataclass class Item: id: uuid.UUID name: str price: float tags: list[str] = field(default_factory=list) description: Union[str, None] = NoneRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.1K bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001_py39.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: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 755 bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.3K bytes - Viewed (0) -
docs/es/docs/tutorial/extra-data-types.md
* Validación de datos. * Anotación y documentación automática. ## Otros tipos de datos { #other-data-types } Aquí hay algunos de los tipos de datos adicionales que puedes usar: * `UUID`: * Un "Identificador Universalmente Único" estándar, común como un ID en muchas bases de datos y sistemas. * En requests y responses se representará como un `str`. * `datetime.datetime`:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 2.9K bytes - Viewed (0) -
fastapi/encoders.py
IPv6Interface, IPv6Network, ) from pathlib import Path, PurePath from re import Pattern from types import GeneratorType from typing import Annotated, Any, Callable, Optional, Union from uuid import UUID from annotated_doc import Doc from fastapi.exceptions import PydanticV1NotSupportedError from fastapi.types import IncEx from pydantic import BaseModel from pydantic.color import ColorRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 10.7K bytes - Viewed (0) -
docs/ru/docs/advanced/response-directly.md
Например, вы не можете поместить Pydantic-модель в `JSONResponse`, не преобразовав её сначала в `dict` с помощью преобразования всех типов данных (таких как `datetime`, `UUID` и т.д.) в совместимые с JSON типы. В таких случаях вы можете использовать `jsonable_encoder` для преобразования данных перед передачей их в ответ: {* ../../docs_src/response_directly/tutorial001_py310.py hl[5:6,20:21] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/api/engine/SearchEngineApiManager.java
package org.codelibs.fess.api.engine; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.Locale; import java.util.UUID; import org.apache.catalina.connector.ClientAbortException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.codelibs.core.io.CopyUtil;
Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Fri Nov 28 16:29:12 UTC 2025 - 12.9K bytes - Viewed (0) -
docs/pt/docs/advanced/response-directly.md
Por exemplo, você não pode colocar um modelo do Pydantic em uma `JSONResponse` sem antes convertê-lo em um `dict` com todos os tipos de dados (como `datetime`, `UUID`, etc) convertidos para tipos compatíveis com JSON. Para esses casos, você pode usar o `jsonable_encoder` para converter seus dados antes de repassá-los para a resposta:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.5K bytes - Viewed (0) -
docs/de/docs/advanced/response-directly.md
Sie können beispielsweise kein Pydantic-Modell in eine `JSONResponse` einfügen, ohne es zuvor in ein `dict` zu konvertieren, bei dem alle Datentypen (wie `datetime`, `UUID`, usw.) in JSON-kompatible Typen konvertiert wurden. In diesen Fällen können Sie den `jsonable_encoder` verwenden, um Ihre Daten zu konvertieren, bevor Sie sie an eine Response übergeben:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.7K bytes - Viewed (0)