- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for __class__ (0.23 sec)
-
fastapi/security/http.py
auto_error: bool = True, ): self.model: HTTPBaseModel = HTTPBaseModel( scheme=scheme, description=description ) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error def make_authenticate_headers(self) -> dict[str, str]: return {"WWW-Authenticate": f"{self.model.scheme.title()}"}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 13.2K bytes - Viewed (0) -
tests/test_generic_parameterless_depends.py
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]): return {"cls": dep.__class__.__name__} client = TestClient(app) def test_generic_parameterless_depends(): response = client.get("/a")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
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): """Spoof a missing __dict__ by raising TypeError, this is how asyncpg.pgroto.pgproto.UUID behaves"""Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 1.8K bytes - Viewed (0) -
fastapi/security/open_id_connect_url.py
), ] = True, ): self.model = OpenIdConnectModel( openIdConnectUrl=openIdConnectUrl, description=description ) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error def make_not_authenticated_error(self) -> HTTPException: return HTTPException( status_code=HTTP_401_UNAUTHORIZED,Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.1K bytes - Viewed (0) -
fastapi/params.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 26.3K bytes - Viewed (0) -
fastapi/security/api_key.py
self.model: APIKey = APIKey( **{"in": location}, name=name, description=description, ) self.scheme_name = scheme_name or self.__class__.__name__ def make_not_authenticated_error(self) -> HTTPException: """ The WWW-Authenticate header is not standardized for API Key authentication butRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 9.6K bytes - Viewed (1) -
fastapi/dependencies/utils.py
annotation=use_annotation, ) assert ( field_info.default == Undefined or field_info.default == RequiredParam ), ( f"`{field_info.__class__.__name__}` default value cannot be set in" f" `Annotated` for {param_name!r}. Set the default value with `=` instead." ) if value is not inspect.Signature.empty:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 37.6K bytes - Viewed (3) -
fastapi/security/oauth2.py
), ] = True, ): self.model = OAuth2Model( flows=cast(OAuthFlowsModel, flows), description=description ) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error def make_not_authenticated_error(self) -> HTTPException: """ The OAuth 2 specification doesn't define the challenge that should be used,Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 22K bytes - Viewed (0)