Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 62 for Model (0.17 sec)

  1. docs/en/docs/tutorial/response-model.md

    ### `response_model` Priority
    
    If you declare both a return type and a `response_model`, the `response_model` will take priority and be used by FastAPI.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/response-model.md

    ### Приоритет `response_model`
    
    Если одновременно указать аннотацию типа для ответа функции и параметр `response_model` - последний будет иметь больший приоритет и FastAPI будет использовать именно его.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 30.5K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/response-model.md

        {!> ../../../docs_src/response_model/tutorial001_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="17  22  24-27"
        {!> ../../../docs_src/response_model/tutorial001.py!}
        ```
    
    !!! note "Hinweis"
        Beachten Sie, dass `response_model` ein Parameter der „Dekorator“-Methode ist (`get`, `post`, usw.). Nicht der *Pfadoperation-Funktion*, so wie die anderen Parameter.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/response-model.md

        👉 ✔ `response_model_by_alias` 👈 👷 ➡.
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="31  37"
        {!> ../../../docs_src/response_model/tutorial005.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="29  35"
        {!> ../../../docs_src/response_model/tutorial005_py310.py!}
        ```
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 16K bytes
    - Viewed (0)
  5. tests/test_response_model_as_return_annotation.py

    app = FastAPI()
    
    
    @app.get("/no_response_model-no_annotation-return_model")
    def no_response_model_no_annotation_return_model():
        return User(name="John", surname="Doe")
    
    
    @app.get("/no_response_model-no_annotation-return_dict")
    def no_response_model_no_annotation_return_dict():
        return {"name": "John", "surname": "Doe"}
    
    
    @app.get("/response_model-no_annotation-return_same_model", response_model=User)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
  6. tests/test_response_by_alias.py

    def read_dict():
        return {"alias": "Foo"}
    
    
    @app.get("/model", response_model=Model, response_model_by_alias=False)
    def read_model():
        return Model(alias="Foo")
    
    
    @app.get("/list", response_model=List[Model], response_model_by_alias=False)
    def read_list():
        return [{"alias": "Foo"}, {"alias": "Bar"}]
    
    
    @app.get("/by-alias/dict", response_model=Model)
    def by_alias_dict():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  7. fastapi/security/http.py

        def __init__(
            self,
            *,
            scheme: str,
            scheme_name: Optional[str] = None,
            description: Optional[str] = None,
            auto_error: bool = True,
        ):
            self.model = HTTPBaseModel(scheme=scheme, description=description)
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(
            self, request: Request
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body/test_tutorial001_py310.py

        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "model_attributes_type",
                        "loc": ["body"],
                        "msg": "Input should be a valid dictionary or object to extract fields from",
                        "input": "name=Foo&price=50.5",
                    }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  9. tests/test_tutorial/test_body/test_tutorial001.py

        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "model_attributes_type",
                        "loc": ["body"],
                        "msg": "Input should be a valid dictionary or object to extract fields from",
                        "input": "name=Foo&price=50.5",
                    }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (5)
  10. docs/vi/docs/features.md

    * Tự động tài liệu hóa data model theo <a href="https://json-schema.org/" class="external-link" target="_blank"><strong>JSON Schema</strong></a> (OpenAPI bản thân nó được dựa trên JSON Schema).
    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