Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for uuid4 (0.01 sec)

  1. 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] = None
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  2. tests/test_inherited_custom_class.py

    import uuid
    
    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class MyUuid:
        def __init__(self, uuid_string: str):
            self.uuid = uuid_string
    
        def __str__(self):
            return self.uuid
    
        @property  # type: ignore
        def __class__(self):
            return uuid.UUID
    
        @property
        def __dict__(self):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  3. 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)
  4. tests/test_tutorial/test_extra_data_types/test_tutorial001.py

                                    "schema": {
                                        "title": "Item Id",
                                        "type": "string",
                                        "format": "uuid",
                                    },
                                    "name": "item_id",
                                    "in": "path",
                                }
                            ],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  5. 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)
  6. 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 Color
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top