Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for union (0.23 sec)

  1. fastapi/params.py

                ),
            ] = None,
            discriminator: Union[str, None] = None,
            strict: Union[bool, None] = _Unset,
            multiple_of: Union[float, None] = _Unset,
            allow_inf_nan: Union[bool, None] = _Unset,
            max_digits: Union[int, None] = _Unset,
            decimal_places: Union[int, None] = _Unset,
            examples: Optional[List[Any]] = None,
            example: Annotated[
    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)
  2. fastapi/param_functions.py

            ),
        ] = None,
        discriminator: Annotated[
            Union[str, None],
            Doc(
                """
                Parameter field name for discriminating the type in a tagged union.
                """
            ),
        ] = None,
        strict: Annotated[
            Union[bool, None],
            Doc(
                """
                If `True`, strict validation is applied to the field.
    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)
  3. fastapi/openapi/models.py

        headers: Optional[Dict[str, Union[Header, Reference]]] = None
        securitySchemes: Optional[Dict[str, Union[SecurityScheme, Reference]]] = None
        links: Optional[Dict[str, Union[Link, Reference]]] = None
        # Using Any for Specification Extensions
        callbacks: Optional[Dict[str, Union[Dict[str, PathItem], Reference, Any]]] = None
        pathItems: Optional[Dict[str, Union[PathItem, Reference]]] = None
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (0)
  4. fastapi/utils.py

                main_dict[key] = main_dict[key] + update_dict[key]
            else:
                main_dict[key] = value
    
    
    def get_value_or_default(
        first_item: Union[DefaultPlaceholder, DefaultType],
        *extra_items: Union[DefaultPlaceholder, DefaultType],
    ) -> Union[DefaultPlaceholder, DefaultType]:
        """
        Pass items or `DefaultPlaceholder`s by descending priority.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. fastapi/_compat.py

            function: Callable[..., Any],
            *,
            ref: Union[str, None] = None,
            metadata: Any = None,
            serialization: Any = None,
        ) -> Any:
            return {}
    
        def get_model_definitions(
            *,
            flat_models: Set[Union[Type[BaseModel], Type[Enum]]],
            model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str],
        ) -> Dict[str, Any]:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/extra-models.md

        ```
    
    ## `Union` ⚖️ `anyOf`
    
    👆 💪 📣 📨 `Union` 2️⃣ 🆎, 👈 ⛓, 👈 📨 🔜 🙆 2️⃣.
    
    ⚫️ 🔜 🔬 🗄 ⏮️ `anyOf`.
    
    👈, ⚙️ 🐩 🐍 🆎 🔑 <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    !!! note
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  7. docs/en/docs/python-types.md

        ```
    
    #### Using `Union` or `Optional`
    
    If you are using a Python version below 3.10, here's a tip from my very **subjective** point of view:
    
    * 🚨 Avoid using `Optional[SomeType]`
    * Instead ✨ **use `Union[SomeType, None]`** ✨.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  8. docs/uk/docs/python-types.md

        * Значення цього `dict` типу `float` (наприклад, ціна кожного елементу).
    
    #### Union (об'єднання)
    
    Ви можете оголосити, що змінна може бути будь-яким із **кількох типів**, наприклад, `int` або `str`.
    
    У Python 3.6 і вище (включаючи Python 3.10) ви можете використовувати тип `Union` з `typing` і вставляти в квадратні дужки можливі типи, які можна прийняти.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  9. fastapi/security/oauth2.py

    from typing import Any, Dict, List, Optional, Union, cast
    
    from fastapi.exceptions import HTTPException
    from fastapi.openapi.models import OAuth2 as OAuth2Model
    from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel
    from fastapi.param_functions import Form
    from fastapi.security.base import SecurityBase
    from fastapi.security.utils import get_authorization_scheme_param
    from starlette.requests import Request
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  10. docs/en/docs/tutorial/extra-models.md

        ```
    
    ## `Union` or `anyOf`
    
    You can declare a response to be the `Union` of two types, that means, that the response would be any of the two.
    
    It will be defined in OpenAPI with `anyOf`.
    
    To do that, use the standard Python type hint <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    !!! note
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
Back to top