Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for dep_a (0.01 sec)

  1. tests/benchmarks/test_general_performance.py

        "notes": ["x" * 50, "y" * 50, "z" * 50],
    }
    
    LARGE_PAYLOAD: dict[str, Any] = {"items": LARGE_ITEMS, "metadata": LARGE_METADATA}
    
    
    def dep_a():
        return 40
    
    
    def dep_b(a: Annotated[int, Depends(dep_a)]):
        return a + 2
    
    
    class ItemIn(BaseModel):
        name: str
        value: int
    
    
    class ItemOut(BaseModel):
        name: str
        value: int
        dep: int
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 20:40:26 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial008.py

    import pytest
    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="module",
        params=[
            "tutorial008_py39",
            # Fails with `NameError: name 'DepA' is not defined`
            pytest.param("tutorial008_an_py39", marks=pytest.mark.xfail),
        ],
    )
    def get_module(request: pytest.FixtureRequest):
        mod_name = f"docs_src.dependencies.{request.param}"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.4K bytes
    - Viewed (0)
Back to top