- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TypeVar (0.04 sec)
-
tests/test_generic_parameterless_depends.py
from typing import TypeVar from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from typing_extensions import Annotated app = FastAPI() T = TypeVar("T") Dep = Annotated[T, Depends()] class A: pass class B: pass @app.get("/a") async def a(dep: Dep[A]): return {"cls": dep.__class__.__name__} @app.get("/b") async def b(dep: Dep[B]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:52:56 UTC 2024 - 1.8K bytes - Viewed (0) -
fastapi/concurrency.py
from typing import AsyncGenerator, ContextManager, TypeVar import anyio from anyio import CapacityLimiter from starlette.concurrency import iterate_in_threadpool as iterate_in_threadpool # noqa from starlette.concurrency import run_in_threadpool as run_in_threadpool # noqa from starlette.concurrency import ( # noqa run_until_first_complete as run_until_first_complete, ) _T = TypeVar("_T") @asynccontextmanager
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Dec 25 17:57:35 UTC 2023 - 1.4K bytes - Viewed (0) -
fastapi/types.py
import types from enum import Enum from typing import Any, Callable, Dict, Set, Type, TypeVar, Union from pydantic import BaseModel DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any]) UnionType = getattr(types, "UnionType", Union) ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 12 00:29:03 UTC 2023 - 383 bytes - Viewed (0) -
fastapi/datastructures.py
from typing import ( Any, BinaryIO, Callable, Dict, Iterable, Optional, Type, TypeVar, cast, ) from fastapi._compat import ( PYDANTIC_V2, CoreSchema, GetJsonSchemaHandler, JsonSchemaValue, with_info_plain_validator_function, ) from starlette.datastructures import URL as URL # noqa: F401 from starlette.datastructures import Address as Address # noqa: F401
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 5.6K bytes - Viewed (0)