Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IMDB (0.01 sec)

  1. docs_src/query_params_str_validations/tutorial015_an_py39.py

    data = {
        "isbn-9781529046137": "The Hitchhiker's Guide to the Galaxy",
        "imdb-tt0371724": "The Hitchhiker's Guide to the Galaxy",
        "isbn-9781439512982": "Isaac Asimov: The Complete Stories, Vol. 2",
    }
    
    
    def check_valid_id(id: str):
        if not id.startswith(("isbn-", "imdb-")):
            raise ValueError('Invalid ID format, it must start with "isbn-" or "imdb-"')
        return id
    
    
    @app.get("/items/")
    async def read_items(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 01 22:02:35 UTC 2025
    - 781 bytes
    - Viewed (0)
  2. docs_src/query_params_str_validations/tutorial015_an_py310.py

    data = {
        "isbn-9781529046137": "The Hitchhiker's Guide to the Galaxy",
        "imdb-tt0371724": "The Hitchhiker's Guide to the Galaxy",
        "isbn-9781439512982": "Isaac Asimov: The Complete Stories, Vol. 2",
    }
    
    
    def check_valid_id(id: str):
        if not id.startswith(("isbn-", "imdb-")):
            raise ValueError('Invalid ID format, it must start with "isbn-" or "imdb-"')
        return id
    
    
    @app.get("/items/")
    async def read_items(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 01 22:02:35 UTC 2025
    - 768 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py

                "detail": [
                    {
                        "type": "value_error",
                        "loc": ["query", "id"],
                        "msg": 'Value error, Invalid ID format, it must start with "isbn-" or "imdb-"',
                        "input": "wtf-yes",
                        "ctx": {"error": {}},
                    }
                ]
            }
        )
    
    
    def test_openapi_schema(client: TestClient):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 5K bytes
    - Viewed (0)
Back to top