- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for __call__ (0.17 sec)
-
docs_src/dependencies/tutorial011.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/")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 504 bytes - Viewed (0)