- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 36 for __name__ (0.12 sec)
-
docs_src/wsgi/tutorial001.py
from fastapi import FastAPI from fastapi.middleware.wsgi import WSGIMiddleware from flask import Flask, request from markupsafe import escape flask_app = Flask(__name__) @flask_app.route("/") def flask_main(): name = request.args.get("name", "World") return f"Hello, {escape(name)} from Flask!" app = FastAPI() @app.get("/v2") def read_main(): return {"message": "Hello World"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue May 09 14:32:00 UTC 2023 - 443 bytes - Viewed (0) -
docs/ja/docs/tutorial/debugging.md
## `uvicorn` の実行 FastAPIアプリケーション上で、`uvicorn` を直接インポートして実行します: ```Python hl_lines="1 15" {!../../docs_src/debugging/tutorial001.py!} ``` ### `__name__ == "__main__"` について `__name__ == "__main__"` の主な目的は、ファイルが次のコマンドで呼び出されたときに実行されるコードを用意することです: <div class="termy"> ```console $ python myapp.py ``` </div> ただし、次のように、別のファイルからインポートされるときには呼び出されません: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
fastapi/security/api_key.py
**{"in": APIKeyIn.query}, # type: ignore[arg-type] name=name, description=description, ) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error async def __call__(self, request: Request) -> Optional[str]: api_key = request.query_params.get(self.model.name) if not api_key:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 23 22:29:18 UTC 2024 - 9.1K bytes - Viewed (0) -
fastapi/params.py
self.dependency = dependency self.use_cache = use_cache def __repr__(self) -> str: attr = getattr(self.dependency, "__name__", type(self.dependency).__name__) cache = "" if self.use_cache else ", use_cache=False" return f"{self.__class__.__name__}({attr}{cache})" class Security(Depends): def __init__( self, dependency: Optional[Callable[..., Any]] = None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 18:06:20 UTC 2024 - 27.5K bytes - Viewed (0) -
ci/official/utilities/rename_and_verify_wheels.sh
"$python" -c 'import tensorflow as tf; t1=tf.constant([1,2,3,4]); t2=tf.constant([5,6,7,8]); print(tf.add(t1,t2).shape)' "$python" -c 'import sys; import tensorflow as tf; sys.exit(0 if "keras" in tf.keras.__name__ else 1)' fi # Import tf nightly wheel built with numpy2 from PyPI in numpy1 env for testing. # This aims to maintain TF compatibility with NumPy 1.x until 2025 b/361369076. if [[ "$TFCI_WHL_NUMPY_VERSION" == 1 ]]; then
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Oct 02 21:18:17 UTC 2024 - 4.3K bytes - Viewed (0) -
tensorflow/api_template.__init__.py
# the __path__ so that "from tensorflow.foo import bar" works. # We're using bitwise, but there's nothing special about that. _API_MODULE = _sys.modules[__name__].bitwise _tf_api_dir = _os.path.dirname(_os.path.dirname(_API_MODULE.__file__)) _current_module = _sys.modules[__name__] if not hasattr(_current_module, "__path__"): __path__ = [_tf_api_dir] elif _tf_api_dir not in __path__: __path__.append(_tf_api_dir)
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Oct 02 22:16:02 UTC 2024 - 6.8K bytes - Viewed (0) -
fastapi/security/http.py
description: Optional[str] = None, auto_error: bool = True, ): self.model = HTTPBaseModel(scheme=scheme, description=description) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error async def __call__( self, request: Request ) -> Optional[HTTPAuthorizationCredentials]: authorization = request.headers.get("Authorization")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 19 09:47:28 UTC 2024 - 13.2K bytes - Viewed (0) -
tensorflow/api_template_v1.__init__.py
# the __path__ so that "from tensorflow.foo import bar" works. # We're using bitwise, but there's nothing special about that. _API_MODULE = _sys.modules[__name__].bitwise # pylint: disable=undefined-variable _current_module = _sys.modules[__name__] _tf_api_dir = _os.path.dirname(_os.path.dirname(_API_MODULE.__file__)) if not hasattr(_current_module, "__path__"): __path__ = [_tf_api_dir] elif _tf_api_dir not in __path__:
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Oct 02 22:16:02 UTC 2024 - 7.5K 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 async def __call__(self, request: Request) -> Optional[str]: authorization = request.headers.get("Authorization") if not authorization:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 2.7K bytes - Viewed (0) -
ci/official/utilities/convert_msys_paths_to_win_paths.py
var_str = '\n'.join(f'{k}="{v}"' for k, v in converted_vars.items()) # The string can then be piped into `source`, to re-set the # 'converted' variables. print(var_str) if __name__ == '__main__': parser = argparse.ArgumentParser(description=( 'Convert MSYS paths in environment variables to Windows paths.')) parser.add_argument('--blacklist', nargs='*',
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Aug 07 23:01:25 UTC 2024 - 2.5K bytes - Viewed (0)