- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 82 for __all__ (0.04 seconds)
-
docs_src/dependencies/tutorial011_py310.py
from fastapi import Depends, FastAPI app = FastAPI() class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 504 bytes - Click Count (0) -
docs_src/dependencies/tutorial011_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 544 bytes - Click Count (0) -
fastapi/security/api_key.py
location=APIKeyIn.query, name=name, scheme_name=scheme_name, description=description, auto_error=auto_error, ) async def __call__(self, request: Request) -> str | None: api_key = request.query_params.get(self.model.name) return self.check_api_key(api_key) class APIKeyHeader(APIKeyBase): """Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 9.6K bytes - Click Count (1) -
fastapi/security/open_id_connect_url.py
return HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers={"WWW-Authenticate": "Bearer"}, ) async def __call__(self, request: Request) -> str | None: authorization = request.headers.get("Authorization") if not authorization: if self.auto_error: raise self.make_not_authenticated_error()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 16 10:16:48 GMT 2026 - 3.1K bytes - Click Count (0) -
tests/test_custom_middleware_exception.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.8K bytes - Click Count (0) -
docs/tr/docs/advanced/advanced-dependencies.md
Class'ın kendisini değil (zaten callable'dır), o class'ın bir instance'ını. Bunu yapmak için `__call__` adında bir method tanımlarız: {* ../../docs_src/dependencies/tutorial011_an_py310.py hl[12] *} Bu durumda, ek parametreleri ve alt-dependency'leri kontrol etmek için **FastAPI**'nin kullanacağı şey bu `__call__` olacaktır; ayrıca daha sonra *path operation function* içindeki parametreye bir değer geçmek için çağrılacak olan da budur.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 10K bytes - Click Count (0) -
docs/ru/docs/advanced/advanced-dependencies.md
В Python есть способ сделать экземпляр класса «вызываемым» объектом. Не сам класс (он уже является вызываемым), а экземпляр этого класса. Для этого объявляем метод `__call__`: {* ../../docs_src/dependencies/tutorial011_an_py310.py hl[12] *} В этом случае именно `__call__` **FastAPI** использует для проверки дополнительных параметров и подзависимостей, и именно он будет вызван, чтобы позже передать значение параметру в вашей *функции-обработчике пути*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 14.1K bytes - Click Count (0) -
docs/en/docs/advanced/advanced-dependencies.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 9K bytes - Click Count (0) -
fastapi/security/oauth2.py
""" return HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers={"WWW-Authenticate": "Bearer"}, ) async def __call__(self, request: Request) -> str | None: authorization = request.headers.get("Authorization") if not authorization: if self.auto_error: raise self.make_not_authenticated_error()Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Mar 24 16:32:10 GMT 2026 - 23.6K bytes - Click Count (0) -
docs/es/docs/advanced/advanced-dependencies.md
No la clase en sí (que ya es un callable), sino una instance de esa clase. Para hacer eso, declaramos un método `__call__`: {* ../../docs_src/dependencies/tutorial011_an_py310.py hl[12] *} En este caso, este `__call__` es lo que **FastAPI** usará para comprobar parámetros adicionales y sub-dependencias, y es lo que llamará para pasar un valor al parámetro en tu *path operation function* más adelante.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 9.7K bytes - Click Count (0)