Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Suplee (0.3 sec)

  1. tests/test_tuples.py

    @app.post("/tuple-of-models/")
    def post_tuple_of_models(square: Tuple[Coordinate, Coordinate]):
        return square
    
    
    @app.post("/tuple-form/")
    def hello(values: Tuple[int, int] = Form()):
        return values
    
    
    client = TestClient(app)
    
    
    def test_model_with_tuple_valid():
        data = {"items": [["foo", "bar"], ["baz", "whatelse"]]}
        response = client.post("/model-with-tuple/", json=data)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  2. fastapi/dependencies/models.py

            # Store the path to be able to re-generate a dependable from it in overrides
            self.path = path
            # Save the cache key at creation to optimize performance
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  3. fastapi/security/utils.py

    from typing import Optional, Tuple
    
    
    def get_authorization_scheme_param(
        authorization_header_value: Optional[str],
    ) -> Tuple[str, str]:
        if not authorization_header_value:
            return "", ""
        scheme, _, param = authorization_header_value.partition(" ")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 293 bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

        dependency_overrides_provider: Optional[Any] = None,
        dependency_cache: Optional[Dict[Tuple[Callable[..., Any], Tuple[str]], Any]] = None,
        async_exit_stack: AsyncExitStack,
    ) -> Tuple[
        Dict[str, Any],
        List[Any],
        Optional[StarletteBackgroundTasks],
        Response,
        Dict[Tuple[Callable[..., Any], Tuple[str]], Any],
    ]:
        values: Dict[str, Any] = {}
        errors: List[Any] = []
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  5. fastapi/openapi/utils.py

        operation_ids: Set[str],
        schema_generator: GenerateJsonSchema,
        model_name_map: ModelNameMap,
        field_mapping: Dict[
            Tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue
        ],
        separate_input_output_schemas: bool = True,
    ) -> Tuple[Dict[str, Any], Dict[str, Any], Dict[str, Any]]:
        path = {}
        security_schemes: Dict[str, Any] = {}
        definitions: Dict[str, Any] = {}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  6. tests/test_typing_python39.py

    @needs_py310
    def test_typing():
        types = {
            list[int]: [1, 2, 3],
            dict[str, list[int]]: {"a": [1, 2, 3], "b": [4, 5, 6]},
            set[int]: [1, 2, 3],  # `set` is converted to `list`
            tuple[int, ...]: [1, 2, 3],  # `tuple` is converted to `list`
        }
        for test_type, expect in types.items():
            app = FastAPI()
    
            @app.post("/", response_model=test_type)
            def post_endpoint(input: test_type):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 709 bytes
    - Viewed (0)
  7. fastapi/encoders.py

    }
    
    
    def generate_encoders_by_class_tuples(
        type_encoder_map: Dict[Any, Callable[[Any], Any]],
    ) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]:
        encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(
            tuple
        )
        for type_, encoder in type_encoder_map.items():
            encoders_by_class_tuples[encoder] += (type_,)
        return encoders_by_class_tuples
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  8. fastapi/_compat.py

    
    sequence_annotation_to_type = {
        Sequence: list,
        List: list,
        list: list,
        Tuple: tuple,
        tuple: tuple,
        Set: set,
        set: set,
        FrozenSet: frozenset,
        frozenset: frozenset,
        Deque: deque,
        deque: deque,
    }
    
    sequence_types = tuple(sequence_annotation_to_type.keys())
    
    if PYDANTIC_V2:
    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)
  9. docs_src/python_types/tutorial007.py

    from typing import Set, Tuple
    
    
    def process_items(items_t: Tuple[int, int, str], items_s: Set[bytes]):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 11 17:20:32 GMT 2020
    - 131 bytes
    - Viewed (0)
  10. fastapi/routing.py

    import json
    from contextlib import AsyncExitStack
    from enum import Enum, IntEnum
    from typing import (
        Any,
        Callable,
        Coroutine,
        Dict,
        List,
        Optional,
        Sequence,
        Set,
        Tuple,
        Type,
        Union,
    )
    
    from fastapi import params
    from fastapi._compat import (
        ModelField,
        Undefined,
        _get_model_config,
        _model_dump,
        _normalize_errors,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top