Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for pattern (0.16 sec)

  1. tests/test_security_oauth2_optional.py

            {
                "detail": [
                    {
                        "type": "string_pattern_mismatch",
                        "loc": ["body", "grant_type"],
                        "msg": "String should match pattern 'password'",
                        "input": "incorrect",
                        "ctx": {"pattern": "password"},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  2. tests/test_regex_deprecated_body.py

            {
                "detail": [
                    {
                        "type": "string_pattern_mismatch",
                        "loc": ["body", "q"],
                        "msg": "String should match pattern '^fixedquery$'",
                        "input": "nonregexquery",
                        "ctx": {"pattern": "^fixedquery$"},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py39.py

            {
                "detail": [
                    {
                        "type": "string_pattern_mismatch",
                        "loc": ["query", "item-query"],
                        "msg": "String should match pattern '^fixedquery$'",
                        "input": "nonregexquery",
                        "ctx": {"pattern": "^fixedquery$"},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  4. fastapi/params.py

                        "strict": strict,
                        "json_schema_extra": current_json_schema_extra,
                    }
                )
                kwargs["pattern"] = pattern or regex
            else:
                kwargs["regex"] = pattern or regex
                kwargs.update(**current_json_schema_extra)
            use_kwargs = {k: v for k, v in kwargs.items() if v is not _Unset}
    
            super().__init__(**use_kwargs)
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  5. docs_src/query_params_str_validations/tutorial004_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: str | None = Query(
            default=None, min_length=3, max_length=50, pattern="^fixedquery$"
        ),
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 335 bytes
    - Viewed (0)
  6. docs_src/query_params_str_validations/tutorial004_an.py

    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            Union[str, None], Query(min_length=3, max_length=50, pattern="^fixedquery$")
        ] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 410 bytes
    - Viewed (0)
  7. fastapi/param_functions.py

                """
            ),
        ] = None,
        pattern: Annotated[
            Optional[str],
            Doc(
                """
                RegEx pattern for strings.
                """
            ),
        ] = None,
        regex: Annotated[
            Optional[str],
            Doc(
                """
                RegEx pattern for strings.
                """
            ),
            deprecated(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  8. docs_src/query_params_str_validations/tutorial010_an.py

                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
                max_length=50,
                pattern="^fixedquery$",
                deprecated=True,
            ),
        ] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 664 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an.py

            {
                "detail": [
                    {
                        "type": "string_pattern_mismatch",
                        "loc": ["query", "item-query"],
                        "msg": "String should match pattern '^fixedquery$'",
                        "input": "nonregexquery",
                        "ctx": {"pattern": "^fixedquery$"},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  10. docs_src/query_params_str_validations/tutorial004.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Union[str, None] = Query(
            default=None, min_length=3, max_length=50, pattern="^fixedquery$"
        ),
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 367 bytes
    - Viewed (0)
Back to top