Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for regex (0.16 sec)

  1. tests/test_regex_deprecated_body.py

                "detail": [
                    {
                        "ctx": {"pattern": "^fixedquery$"},
                        "loc": ["body", "q"],
                        "msg": 'string does not match regex "^fixedquery$"',
                        "type": "value_error.str.regex",
                    }
                ]
            }
        )
    
    
    @needs_py310
    def test_openapi_schema():
        client = get_client()
        response = client.get("/openapi.json")
    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)
  2. tests/test_regex_deprecated_params.py

                "detail": [
                    {
                        "ctx": {"pattern": "^fixedquery$"},
                        "loc": ["query", "q"],
                        "msg": 'string does not match regex "^fixedquery$"',
                        "type": "value_error.str.regex",
                    }
                ]
            }
        )
    
    
    @needs_py310
    def test_openapi_schema():
        client = get_client()
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. docs_src/query_params_str_validations/tutorial004_an_py310_regex.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            str | None, Query(min_length=3, max_length=50, regex="^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
    - 366 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. 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)
  6. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an.py

                    {
                        "ctx": {"pattern": "^fixedquery$"},
                        "loc": ["query", "item-query"],
                        "msg": 'string does not match regex "^fixedquery$"',
                        "type": "value_error.str.regex",
                    }
                ]
            }
        )
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    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)
  7. .github/workflows/latest-changes.yml

            with:
              token: ${{ secrets.GITHUB_TOKEN }}
              latest_changes_file: docs/en/docs/release-notes.md
              latest_changes_header: '## Latest Changes'
              end_regex: '^## '
              debug_logs: true
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 09 14:57:33 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  8. docs/fr/docs/tutorial/query-params-str-validations.md

    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial003.py!}
    ```
    
    ## Ajouter des validations par expressions régulières
    
    On peut définir une <abbr title="Une expression régulière, regex ou regexp est une suite de caractères qui définit un pattern de correspondance pour les chaînes de caractères.">expression régulière</abbr> à laquelle le paramètre doit correspondre :
    
    ```Python hl_lines="10"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 27 18:53:21 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/cors.md

    默认情况下,这个 `CORSMiddleware` 实现所使用的默认参数较为保守,所以你需要显式地启用特定的源、方法或者 headers,以便浏览器能够在跨域上下文中使用它们。
    
    支持以下参数:
    
    * `allow_origins` - 一个允许跨域请求的源列表。例如 `['https://example.org', 'https://www.example.org']`。你可以使用 `['*']` 允许任何源。
    * `allow_origin_regex` - 一个正则表达式字符串,匹配的源允许跨域请求。例如 `'https://.*\.example\.org'`。
    * `allow_methods` - 一个允许跨域请求的 HTTP 方法列表。默认为 `['GET']`。你可以使用 `['*']` 来允许所有标准方法。
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 27 17:28:07 GMT 2021
    - 4.5K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/cors.md

    다음의 인자들이 지원됩니다:
    
    * `allow_origins` - 교차-출처 요청을 보낼 수 있는 출처의 리스트입니다. 예) `['https://example.org', 'https://www.example.org']`. 모든 출처를 허용하기 위해 `['*']` 를 사용할 수 있습니다.
    * `allow_origin_regex` - 교차-출처 요청을 보낼 수 있는 출처를 정규표현식 문자열로 나타냅니다.  `'https://.*\.example\.org'`.
    * `allow_methods` - 교차-출처 요청을 허용하는 HTTP 메소드의 리스트입니다. 기본값은 `['GET']` 입니다. `['*']` 을 사용하여 모든 표준 메소드들을 허용할 수 있습니다.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 07 14:21:23 GMT 2023
    - 5.8K bytes
    - Viewed (0)
Back to top