- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for __call__ (0.36 sec)
-
docs_src/dependencies/tutorial011_an_py39.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/")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 544 bytes - Viewed (0)