Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for literal (0.31 sec)

  1. fastapi/utils.py

        Validator,
        lenient_issubclass,
    )
    from fastapi.datastructures import DefaultPlaceholder, DefaultType
    from pydantic import BaseModel, create_model
    from pydantic.fields import FieldInfo
    from typing_extensions import Literal
    
    if TYPE_CHECKING:  # pragma: nocover
        from .routing import APIRoute
    
    # Cache for `create_cloned_field`
    _CLONED_TYPES_CACHE: MutableMapping[
        Type[BaseModel], Type[BaseModel]
    ] = WeakKeyDictionary()
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  2. fastapi/_compat.py

            model_name_map: ModelNameMap,
            field_mapping: Dict[
                Tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue
            ],
            separate_input_output_schemas: bool = True,
        ) -> Dict[str, Any]:
            override_mode: Union[Literal["validation"], None] = (
                None if separate_input_output_schemas else "validation"
            )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  3. fastapi/openapi/utils.py

        is_body_allowed_for_status_code,
    )
    from starlette.responses import JSONResponse
    from starlette.routing import BaseRoute
    from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY
    from typing_extensions import Literal
    
    validation_error_definition = {
        "title": "ValidationError",
        "type": "object",
        "properties": {
            "loc": {
                "title": "Location",
                "type": "array",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  4. fastapi/openapi/models.py

        JsonSchemaValue,
        _model_rebuild,
        with_info_plain_validator_function,
    )
    from fastapi.logger import logger
    from pydantic import AnyUrl, BaseModel, Field
    from typing_extensions import Annotated, Literal, TypedDict
    from typing_extensions import deprecated as typing_deprecated
    
    try:
        import email_validator
    
        assert email_validator  # make autoflake ignore the unused import
        from pydantic import EmailStr
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  5. docs/de/docs/tutorial/query-params-str-validations.md

    Es gibt eine Alternative, die explizit deklariert, dass ein Wert erforderlich ist. Sie können als Default das <abbr title='Zeichenfolge, die einen Wert direkt darstellt, etwa 1, "hallowelt", True, None'>Literal</abbr> `...` setzen:
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 17:58:59 GMT 2024
    - 27.7K bytes
    - Viewed (0)
  6. docs/pt/docs/advanced/events.md

    E então, logo após o `yield`, descarregaremos o modelo. Esse código será executado **após** a aplicação **terminar de lidar com as requisições**, pouco antes do *encerramento*. Isso poderia, por exemplo, liberar recursos como memória ou GPU.
    
    !!! tip "Dica"
        O `shutdown` aconteceria quando você estivesse **encerrando** a aplicação.
    
        Talvez você precise inicializar uma nova versão, ou apenas cansou de executá-la. 🤷
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/query-params-str-validations.md

            Still, probably better to use the `Annotated` version. 😉
    
    ### Required with Ellipsis (`...`)
    
    There's an alternative way to explicitly declare that a value is required. You can set the default to the literal value `...`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="8"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/dependencies/index.md

    And dependencies can be created in a very simple and intuitive way that allows you to just import the Python packages you need, and integrate them with your API functions in a couple of lines of code, *literally*.
    
    You will see examples of this in the next chapters, about relational and NoSQL databases, security, etc.
    
    ## **FastAPI** compatibility
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top