- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 85 for Escape (0.45 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"}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue May 09 14:32:00 GMT 2023 - 443 bytes - Viewed (0) -
tests/test_dependency_cache.py
@app.get("/scope-counter") async def get_scope_counter( count: int = Security(dep_counter), scope_count_1: int = Security(dep_counter, scopes=["scope"]), scope_count_2: int = Security(dep_counter, scopes=["scope"]), ): return { "counter": count, "scope_counter_1": scope_count_1, "scope_counter_2": scope_count_2, } client = TestClient(app)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Aug 23 13:30:24 GMT 2022 - 2.7K bytes - Viewed (0) -
docs/de/docs/advanced/security/oauth2-scopes.md
Und die Abhängigkeitsfunktion `get_current_active_user` kann auch Unterabhängigkeiten deklarieren, nicht nur mit `Depends`, sondern auch mit `Security`. Ihre eigene Unterabhängigkeitsfunktion (`get_current_user`) und weitere Scope-Anforderungen deklarierend. In diesem Fall erfordert sie den Scope `me` (sie könnte mehr als einen Scope erfordern). !!! note "Hinweis"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:26:08 GMT 2024 - 22.8K bytes - Viewed (0) -
docs_src/security/tutorial005_py310.py
return encoded_jwt async def get_current_user( security_scopes: SecurityScopes, token: str = Depends(oauth2_scheme) ): if security_scopes.scopes: authenticate_value = f'Bearer scope="{security_scopes.scope_str}"' else: authenticate_value = "Bearer" credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.1K bytes - Viewed (0) -
docs_src/security/tutorial005_an_py310.py
async def get_current_user( security_scopes: SecurityScopes, token: Annotated[str, Depends(oauth2_scheme)] ): if security_scopes.scopes: authenticate_value = f'Bearer scope="{security_scopes.scope_str}"' else: authenticate_value = "Bearer" credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.2K bytes - Viewed (0) -
docs/de/docs/how-to/custom-request-and-route.md
Ein `Request` hat ein `request.scope`-Attribut, welches einfach ein Python-`dict` ist, welches die mit dem Request verbundenen Metadaten enthält. Ein `Request` hat auch ein `request.receive`, welches eine Funktion ist, die den Hauptteil des Requests empfängt. Das `scope`-`dict` und die `receive`-Funktion sind beide Teil der ASGI-Spezifikation.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:18:23 GMT 2024 - 5.2K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py
import os from pathlib import Path import pytest from fastapi.testclient import TestClient @pytest.fixture(scope="module") def client(): static_dir: Path = Path(os.getcwd()) / "static" print(static_dir) static_dir.mkdir(exist_ok=True) from docs_src.custom_docs_ui.tutorial002 import app with TestClient(app) as client: yield client static_dir.rmdir()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py
import os from pathlib import Path import pytest from fastapi.testclient import TestClient @pytest.fixture(scope="module") def client(): static_dir: Path = Path(os.getcwd()) / "static" print(static_dir) static_dir.mkdir(exist_ok=True) from docs_src.custom_docs_ui.tutorial001 import app with TestClient(app) as client: yield client static_dir.rmdir()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_an_py310.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_py310.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 8.4K bytes - Viewed (0)