Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for TYPES (0.03 sec)

  1. fastapi/_compat/shared.py

    # Copy from Pydantic v2, compatible with v1
    if sys.version_info < (3, 10):
        WithArgsTypes: tuple[Any, ...] = (typing._GenericAlias, types.GenericAlias)  # type: ignore[attr-defined]
    else:
        WithArgsTypes: tuple[Any, ...] = (
            typing._GenericAlias,  # type: ignore[attr-defined]
            types.GenericAlias,
            types.UnionType,
        )  # pyright: ignore[reportAttributeAccessIssue]
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. tests/test_compat.py

        # TODO: in theory this would allow declaring types that could be lists of bytes
        # to be read from files and other types, but I'm not even sure it's a good idea
        # to support it as a first class "feature"
        assert is_bytes_sequence_annotation(Union[list[str], list[bytes]])
    
    
    def test_is_uploadfile_sequence_annotation():
        # For coverage
        # TODO: in theory this would allow declaring types that could be lists of UploadFile
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  3. pyproject.toml

        "email-validator >=2.0.0",
        # Uvicorn with uvloop
        "uvicorn[standard] >=0.12.0",
        # # Settings management
        "pydantic-settings >=2.0.0",
        # # Extra Pydantic data types
        "pydantic-extra-types >=2.0.0",
    ]
    
    standard-no-fastapi-cloud-cli = [
        "fastapi-cli[standard-no-fastapi-cloud-cli] >=0.0.8",
        # For the test client
        "httpx >=0.23.0,<1.0.0",
        # For templates
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

    def is_union_of_base_models(field_type: Any) -> bool:
        """Check if field type is a Union where all members are BaseModel subclasses."""
        from fastapi.types import UnionType
    
        origin = get_origin(field_type)
    
        # Check if it's a Union type (covers both typing.Union and types.UnionType in Python 3.10+)
        if origin is not Union and origin is not UnionType:
            return False
    
        union_args = get_args(field_type)
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
  5. tests/test_tutorial/test_settings/test_app03.py

    import importlib
    from types import ModuleType
    
    import pytest
    from fastapi.testclient import TestClient
    from pytest import MonkeyPatch
    
    
    @pytest.fixture(
        name="mod_path",
        params=[
            pytest.param("app03_py39"),
            pytest.param("app03_an_py39"),
        ],
    )
    def get_mod_path(request: pytest.FixtureRequest):
        mod_path = f"docs_src.settings.{request.param}"
        return mod_path
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_cookie_params/test_tutorial001.py

    import importlib
    from types import ModuleType
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="mod",
        params=[
            "tutorial001_py39",
            pytest.param("tutorial001_py310", marks=needs_py310),
            "tutorial001_an_py39",
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_mod(request: pytest.FixtureRequest):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4K bytes
    - Viewed (0)
  7. 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)
  8. tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

    import importlib
    from types import ModuleType
    
    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_py310
    
    
    @pytest.fixture(
        name="mod",
        params=[
            pytest.param("tutorial001_py39"),
            pytest.param("tutorial001_py310", marks=needs_py310),
        ],
    )
    def get_mod(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.openapi_callbacks.{request.param}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial005.py

    import importlib
    from types import ModuleType
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="mod",
        params=[
            pytest.param("tutorial005_py39"),
            pytest.param("tutorial005_py310", marks=needs_py310),
            pytest.param("tutorial005_an_py39"),
            pytest.param("tutorial005_an_py310", marks=needs_py310),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  10. docs/en/docs/release-notes.md

        * <a href="https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/" target="_blank"><code>pydantic-extra-types</code></a> - for extra types to be used with Pydantic.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top