Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 776 for typing (0.03 sec)

  1. fastapi/_compat/shared.py

    import sys
    import types
    import typing
    import warnings
    from collections import deque
    from collections.abc import Mapping, Sequence
    from dataclasses import is_dataclass
    from typing import (
        Annotated,
        Any,
        Union,
    )
    
    from fastapi.types import UnionType
    from pydantic import BaseModel
    from pydantic.version import VERSION as PYDANTIC_VERSION
    from starlette.datastructures import UploadFile
    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. docs/en/docs/tutorial/extra-models.md

    It will be defined in OpenAPI with `anyOf`.
    
    To do that, use the standard Python type hint <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    /// note
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  3. docs/en/docs/python-types.md

    To declare those types and the internal types, you can use the standard Python module `typing`. It exists specifically to support these type hints.
    
    #### Newer versions of Python { #newer-versions-of-python }
    
    The syntax using `typing` is **compatible** with all versions, from Python 3.6 to the latest ones, including Python 3.9, Python 3.10, etc.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 15.6K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/extra-models.md

    Dies wird in OpenAPI mit `anyOf` definiert.
    
    Um das zu tun, verwenden Sie den Standard-Python-Typhinweis <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    /// note | Hinweis
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8K bytes
    - Viewed (0)
  5. fastapi/security/http.py

    import binascii
    from base64 import b64decode
    from typing import Annotated, Optional
    
    from annotated_doc import Doc
    from fastapi.exceptions import HTTPException
    from fastapi.openapi.models import HTTPBase as HTTPBaseModel
    from fastapi.openapi.models import HTTPBearer as HTTPBearerModel
    from fastapi.security.base import SecurityBase
    from fastapi.security.utils import get_authorization_scheme_param
    from pydantic import BaseModel
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  6. docs_src/query_params_str_validations/tutorial013_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[list, Query()] = []):
        query_items = {"q": q}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 210 bytes
    - Viewed (0)
  7. docs/ru/docs/python-types.md

    Чтобы объявлять эти типы и их внутренние типы, вы можете использовать стандартный модуль Python `typing`. Он существует специально для поддержки подсказок типов.
    
    #### Новые версии Python { #newer-versions-of-python }
    
    Синтаксис с использованием `typing` **совместим** со всеми версиями, от Python 3.6 до самых новых, включая Python 3.9, Python 3.10 и т.д.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 24.4K bytes
    - Viewed (0)
  8. docs_src/header_params/tutorial002_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Header
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        strange_header: Annotated[str | None, Header(convert_underscores=False)] = None,
    ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 261 bytes
    - Viewed (0)
  9. docs_src/query_params_str_validations/tutorial012_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[list[str], Query()] = ["foo", "bar"]):
        query_items = {"q": q}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 227 bytes
    - Viewed (0)
  10. docs_src/security/tutorial006_an_py39.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    from fastapi.security import HTTPBasic, HTTPBasicCredentials
    
    app = FastAPI()
    
    security = HTTPBasic()
    
    
    @app.get("/users/me")
    def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 361 bytes
    - Viewed (0)
Back to top