- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 230 for dependentes (0.1 sec)
-
docs/en/docs/reference/request.md
You can import it directly from `fastapi`: ```python from fastapi import Request ``` /// tip When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`. ///
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 518 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b_an.py
from fastapi.testclient import TestClient from docs_src.dependencies.tutorial008b_an import app client = TestClient(app) def test_get_no_item(): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found"} def test_owner_error(): response = client.get("/items/plumbus") assert response.status_code == 400, response.text
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 700 bytes - Viewed (0) -
docs_src/dependencies/tutorial012.py
async def verify_key(x_key: str = Header()): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key app = FastAPI(dependencies=[Depends(verify_token), Depends(verify_key)]) @app.get("/items/") async def read_items(): return [{"item": "Portal Gun"}, {"item": "Plumbus"}] @app.get("/users/") async def read_users():
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 696 bytes - Viewed (0) -
docs/extensions/s3zip/examples/aws-js/package.json
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Thu Jun 10 15:17:03 UTC 2021 - 139 bytes - Viewed (0) -
docs_src/dependencies/tutorial006_an.py
async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key @app.get("/items/", dependencies=[Depends(verify_token), Depends(verify_key)]) async def read_items():
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 643 bytes - Viewed (0) -
docs_src/dependencies/tutorial006_an_py39.py
async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key @app.get("/items/", dependencies=[Depends(verify_token), Depends(verify_key)]) async def read_items():
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 633 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b_an_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008b_an_py39 import app client = TestClient(app) return client @needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 918 bytes - Viewed (0) -
.github/workflows/publish.yml
with: python-version: "3.10" # Issue ref: https://github.com/actions/setup-python/issues/436 # cache: "pip" # cache-dependency-path: pyproject.toml - name: Install build dependencies run: pip install build - name: Build distribution env: TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }} run: python -m build - name: Publish
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Oct 04 11:57:23 UTC 2024 - 1K bytes - Viewed (0) -
docs/fr/docs/alternatives.md
conçu pour profiter des hautes performances fournies par des outils comme Uvicorn, Starlette et Sanic. Le système d'injection de dépendances exige le pré-enregistrement des dépendances et les dépendances sont résolues sur la base des types déclarés. Ainsi, il n'est pas possible de déclarer plus d'un "composant" qui fournit un certain type.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 27.6K bytes - Viewed (0) -
docs_src/dependencies/tutorial012_an.py
async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key app = FastAPI(dependencies=[Depends(verify_token), Depends(verify_key)]) @app.get("/items/") async def read_items(): return [{"item": "Portal Gun"}, {"item": "Plumbus"}] @app.get("/users/") async def read_users():
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 756 bytes - Viewed (0)