Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for tuple3 (0.03 sec)

  1. fastapi/_compat/shared.py

    sequence_annotation_to_type = {
        Sequence: list,
        list: list,
        tuple: tuple,
        set: set,
        frozenset: frozenset,
        deque: deque,
    }
    
    sequence_types = tuple(sequence_annotation_to_type.keys())
    
    Url: type[Any]
    
    
    # Copy of Pydantic v2, compatible with v1
    def lenient_issubclass(
        cls: Any, class_or_tuple: Union[type[Any], tuple[type[Any], ...], None]
    ) -> bool:
        try:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. tests/test_tuples.py

    
    class ItemGroup(BaseModel):
        items: list[tuple[str, str]]
    
    
    class Coordinate(BaseModel):
        x: float
        y: float
    
    
    @app.post("/model-with-tuple/")
    def post_model_with_tuple(item_group: ItemGroup):
        return item_group
    
    
    @app.post("/tuple-of-models/")
    def post_tuple_of_models(square: tuple[Coordinate, Coordinate]):
        return square
    
    
    @app.post("/tuple-form/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  3. fastapi/_compat/v2.py

    
    def _remap_definitions_and_field_mappings(
        *,
        model_name_map: ModelNameMap,
        definitions: dict[str, Any],
        field_mapping: dict[
            tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue
        ],
    ) -> tuple[
        dict[tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue],
        dict[str, Any],
    ]:
        old_name_to_new_name_map = {}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

            response=response,
            dependency_cache=dependency_cache,
        )
    
    
    def _validate_value_with_model_field(
        *, field: ModelField, value: Any, values: dict[str, Any], loc: tuple[str, ...]
    ) -> tuple[Any, list[Any]]:
        if value is None:
            if field.required:
                return None, [get_missing_field_error(loc=loc)]
            else:
                return deepcopy(field.default), []
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
  5. fastapi/encoders.py

        AnyUrl: str,
    }
    
    
    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
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  6. fastapi/openapi/utils.py

        *,
        route: routing.APIRoute,
        operation_ids: set[str],
        model_name_map: ModelNameMap,
        field_mapping: dict[
            tuple[ModelField, Literal["validation", "serialization"]], dict[str, Any]
        ],
        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] = {}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 23.2K bytes
    - Viewed (0)
  7. fastapi/openapi/models.py

        dependentSchemas: Optional[dict[str, "SchemaOrBool"]] = None
        prefixItems: Optional[list["SchemaOrBool"]] = None
        # TODO: uncomment and remove below when deprecating Pydantic v1
        # It generates a list of schemas for tuples, before prefixItems was available
        # items: Optional["SchemaOrBool"] = None
        items: Optional[Union["SchemaOrBool", list["SchemaOrBool"]]] = None
        contains: Optional["SchemaOrBool"] = None
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  8. scripts/translate.py

        ]
        first_parent = Path("docs/en/docs")
        yield from first_parent.glob("*.md")
        for dir_path in first_dirs:
            yield from dir_path.rglob("*.md")
        first_dirs_str = tuple(str(d) for d in first_dirs)
        for path in Path("docs/en/docs").rglob("*.md"):
            if str(path).startswith(first_dirs_str):
                continue
            if path.parent == first_parent:
                continue
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
  9. fastapi/routing.py

                    dependency_overrides_provider=dependency_overrides_provider,
                    embed_body_fields=self._embed_body_fields,
                )
            )
    
        def matches(self, scope: Scope) -> tuple[Match, Scope]:
            match, child_scope = super().matches(scope)
            if match != Match.NONE:
                child_scope["route"] = self
            return match, child_scope
    
    
    class APIRoute(routing.Route):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  10. docs/en/docs/release-notes.md

    * 📝 Tweak and improve docs for Request Files. PR [#4470](https://github.com/tiangolo/fastapi/pull/4470) by [@tiangolo](https://github.com/tiangolo).
    
    ### Fixes
    
    * 🐛 Fix bug preventing to use OpenAPI when using tuples. PR [#3874](https://github.com/tiangolo/fastapi/pull/3874) by [@victorbenichoux](https://github.com/victorbenichoux).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top