Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Carnes (5.39 sec)

  1. tests/test_regex_deprecated_params.py

    from fastapi import FastAPI, Query
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(DeprecationWarning):
    
            @app.get("/items/")
            async def read_items(
                q: Annotated[str | None, Query(regex="^fixedquery$")] = None,
            ):
                if q:
                    return f"Hello {q}"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.5K bytes
    - Viewed (0)
Back to top