Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 245 for types (0.12 sec)

  1. docs/pt/docs/tutorial/extra-data-types.md

    ## Exemplo
    
    Aqui está um exemplo de *operação de rota* com parâmetros utilizando-se de alguns dos tipos acima.
    
    ```Python hl_lines="1  3  12-16"
    {!../../../docs_src/extra_data_types/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 3K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/extra-data-types.md

    ## Beispiel
    
    Hier ist ein Beispiel für eine *Pfadoperation* mit Parametern, die einige der oben genannten Typen verwenden.
    
    === "Python 3.10+"
    
        ```Python hl_lines="1  3  12-16"
        {!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:08:55 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/extra-data-types.md

        * 在请求和响应中被当做 `float` 一样处理。
    * 您可以在这里检查所有有效的pydantic数据类型: <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">Pydantic data types</a>.
    
    ## 例子
    
    下面是一个*路径操作*的示例,其中的参数使用了上面的一些类型。
    
    === "Python 3.10+"
    
        ```Python hl_lines="1  3  12-16"
        {!> ../../../docs_src/extra_data_types/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="1  3  12-16"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  4. tests/test_response_model_sub_types.py

                                        "schema": {
                                            "title": "Response 500 Valid2 Valid2 Get",
                                            "type": "array",
                                            "items": {"type": "integer"},
                                        }
                                    }
                                },
                            },
                        },
                    }
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 5.3K bytes
    - Viewed (0)
  5. fastapi/utils.py

            original_type = original_type.__pydantic_model__
        use_type = original_type
        if lenient_issubclass(original_type, BaseModel):
            original_type = cast(Type[BaseModel], original_type)
            use_type = cloned_types.get(original_type)
            if use_type is None:
                use_type = create_model(original_type.__name__, __base__=original_type)
    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)
  6. tests/test_compat.py

        # TODO: in theory this would allow declaring types that could be lists of bytes
        # to be read from files and other types, but I'm not even sure it's a good idea
        # to support it as a first class "feature"
        assert is_bytes_sequence_annotation(Union[List[str], List[bytes]])
    
    
    def test_is_uploadfile_sequence_annotation():
        # For coverage
        # TODO: in theory this would allow declaring types that could be lists of UploadFile
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  7. 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)
  8. docs/en/docs/alternatives.md

    Hug was one of the first frameworks to implement the declaration of API parameter types using Python type hints. This was a great idea that inspired other tools to do the same.
    
    It used custom types in its declarations instead of standard Python types, but it was still a huge step forward.
    
    It also was one of the first frameworks to generate a custom schema declaring the whole API in JSON.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  9. docs/fr/docs/advanced/additional-responses.md

                            "type": "string"
                        },
                        "type": {
                            "title": "Error Type",
                            "type": "string"
                        }
                    }
                },
                "HTTPValidationError": {
                    "title": "HTTPValidationError",
                    "type": "object",
                    "properties": {
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  10. fastapi/params.py

            annotation: Optional[Any] = None,
            embed: bool = False,
            media_type: str = "application/json",
            alias: Optional[str] = None,
            alias_priority: Union[int, None] = _Unset,
            # TODO: update when deprecating Pydantic v1, import these types
            # validation_alias: str | AliasPath | AliasChoices | None
            validation_alias: Union[str, None] = None,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
Back to top