- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for __call__ (0.06 sec)
-
docs_src/dependencies/tutorial011_an.py
from typing_extensions import Annotated 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/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 554 bytes - Viewed (0) -
docs/pt/docs/advanced/advanced-dependencies.md
Em Python existe uma maneira de fazer com que uma instância de uma classe seja um "chamável". Não propriamente a classe (que já é um chamável), mas a instância desta classe. Para fazer isso, nós declaramos o método `__call__`: //// tab | Python 3.9+ ```Python hl_lines="12" {!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="11"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.1K bytes - Viewed (0) -
fastapi/security/oauth2.py
flows=cast(OAuthFlowsModel, flows), description=description ) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error async def __call__(self, request: Request) -> Optional[str]: authorization = request.headers.get("Authorization") if not authorization: if self.auto_error: raise HTTPException(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 23 18:30:18 UTC 2024 - 21.1K bytes - Viewed (0) -
tests/test_custom_middleware_exception.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 25 21:44:40 UTC 2022 - 2.8K bytes - Viewed (0) -
fastapi/dependencies/utils.py
if inspect.isclass(call): return False dunder_call = getattr(call, "__call__", None) # noqa: B004 return inspect.iscoroutinefunction(dunder_call) def is_async_gen_callable(call: Callable[..., Any]) -> bool: if inspect.isasyncgenfunction(call): return True dunder_call = getattr(call, "__call__", None) # noqa: B004 return inspect.isasyncgenfunction(dunder_call)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 34.7K bytes - Viewed (0) -
fastapi/applications.py
) self.add_route(self.redoc_url, redoc_html, include_in_schema=False) async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: if self.root_path: scope["root_path"] = self.root_path await super().__call__(scope, receive, send) def add_api_route( self, path: str, endpoint: Callable[..., Any],
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:52:31 UTC 2024 - 172.2K bytes - Viewed (0) -
tensorflow/api_template_v1.__init__.py
contrib = _LazyLoader("contrib", globals(), "tensorflow.contrib", _CONTRIB_WARNING) # The templated code that replaces the placeholder above sometimes # sets the __all__ variable. If it does, we have to be sure to add # "contrib". if "__all__" in vars(): vars()["__all__"].append("contrib") from tensorflow.python.platform import flags # The "app" module will be imported as part of the placeholder section above.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Oct 02 22:16:02 UTC 2024 - 7.5K bytes - Viewed (0) -
internal/s3select/json/record.go
} } else if arr, ok := value.ToArray(); ok { v = arr } else { return nil, fmt.Errorf("unsupported sql value %v and type %v", value, value.GetTypeString()) } name = strings.ReplaceAll(name, "*", "__ALL__") r.KVS = append(r.KVS, jstream.KV{Key: name, Value: v}) return r, nil } // WriteCSV - encodes to CSV data. func (r *Record) WriteCSV(writer io.Writer, opts sql.WriteCSVOpts) error { var csvRecord []string
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/api_template.__init__.py
try: del python except NameError: pass try: del core except NameError: pass try: del compiler except NameError: pass
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Oct 02 22:16:02 UTC 2024 - 6.8K bytes - Viewed (0) -
RELEASE.md
Note that this feature is only available with Python 3.7 or higher. * Improve the informativeness of error messages raised by Keras `Layer.__call__()`, by adding the full list of argument values passed to the layer in every exception. * Introduce the `tf.compat.v1.keras.utils.track_tf1_style_variables`
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Oct 22 14:33:53 UTC 2024 - 735.3K bytes - Viewed (0)