Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 193 for type (0.21 sec)

  1. 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)
  2. docs/en/docs/tutorial/response-model.md

    # Response Model - Return Type
    
    You can declare the type used for the response by annotating the *path operation function* **return type**.
    
    You can use **type annotations** the same way you would for input data in function **parameters**, you can use Pydantic models, lists, dictionaries, scalar values like integers, booleans, etc.
    
    === "Python 3.10+"
    
        ```Python hl_lines="16  21"
        {!> ../../../docs_src/response_model/tutorial001_01_py310.py!}
        ```
    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)
  3. docs/uk/docs/python-types.md

    # Вступ до типів Python
    
    Python підтримує додаткові "підказки типу" ("type hints") (також звані "анотаціями типу" ("type annotations")).
    
    Ці **"type hints"** є спеціальним синтаксисом, що дозволяє оголошувати <abbr title="наприклад: str, int, float, bool">тип</abbr> змінної.
    
    За допомогою оголошення типів для ваших змінних, редактори та інструменти можуть надати вам кращу підтримку.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/path-params.md

    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Path parameters with types
    
    You can declare the type of a path parameter in the function, using standard Python type annotations:
    
    ```Python hl_lines="7"
    {!../../../docs_src/path_params/tutorial002.py!}
    ```
    
    In this case, `item_id` is declared to be an `int`.
    
    !!! check
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/dataclasses.md

    7. Here the `response_model` is using a type annotation of a list of `Author` dataclasses.
    
        Again, you can combine `dataclasses` with standard type annotations.
    
    8. Notice that this *path operation function* uses regular `def` instead of `async def`.
    
        As always, in FastAPI you can combine `def` and `async def` as needed.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/path-params.md

    vous verrez comme réponse :
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Paramètres de chemin typés
    
    Vous pouvez déclarer le type d'un paramètre de chemin dans la fonction, en utilisant les annotations de type Python :
    
    
    ```Python hl_lines="7"
    {!../../../docs_src/path_params/tutorial002.py!}
    ```
    
    Ici, `item_id` est déclaré comme `int`.
    
    !!! check "vérifier"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  7. 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)
  8. docs/fr/docs/history-design-future.md

    </blockquote>
    
    ## Recherche
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/handling-errors.md

                    "item_id"
                ],
                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    
    ```
    
    被替换为了以下文本格式的错误信息:
    
    ```
    1 validation error
    path -> item_id
      value is not a valid integer (type=type_error.integer)
    
    ```
    
    ### `RequestValidationError` vs `ValidationError`
    
    !!! warning "警告"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/handling-errors.md

                    "item_id"
                ],
                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    ```
    
    👆 🔜 🤚 ✍ ⏬, ⏮️:
    
    ```
    1 validation error
    path -> item_id
      value is not a valid integer (type=type_error.integer)
    ```
    
    #### `RequestValidationError` 🆚 `ValidationError`
    
    !!! warning
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.3K bytes
    - Viewed (0)
Back to top