Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 201 - 210 of 445 for item_1 (0.05 seconds)

  1. docs/fr/docs/tutorial/handling-errors.md

    Si le client demande `http://example.com/items/foo` (un `item_id` « foo »), il recevra un code d'état HTTP 200 et une réponse JSON :
    
    ```JSON
    {
      "item": "The Foo Wrestlers"
    }
    ```
    
    Mais si le client demande `http://example.com/items/bar` (un `item_id` inexistant « bar »), il recevra un code d'état HTTP 404 (l'erreur « not found ») et une réponse JSON :
    
    ```JSON
    {
      "detail": "Item not found"
    }
    ```
    
    /// tip | Astuce
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 10K bytes
    - Click Count (0)
  2. docs/fr/docs/deployment/docker.md

    ```Python
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: str | None = None):
        return {"item_id": item_id, "q": q}
    ```
    
    ### Dockerfile { #dockerfile }
    
    Maintenant, dans le même répertoire de projet, créez un fichier `Dockerfile` avec :
    
    ```{ .dockerfile .annotate }
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 32.3K bytes
    - Click Count (0)
  3. docs/tr/docs/tutorial/path-params-numeric-validations.md

    ///
    
    ## Metadata Tanımlayın { #declare-metadata }
    
    `Query` için geçerli olan parametrelerin aynısını tanımlayabilirsiniz.
    
    Örneğin, `item_id` path parametresi için bir `title` metadata değeri tanımlamak isterseniz şunu yazabilirsiniz:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note | Not
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 6.8K bytes
    - Click Count (0)
  4. docs/zh/docs/tutorial/handling-errors.md

    本例中,客户端用不存在的 `ID` 请求 `item` 时,触发状态码为 `404` 的异常:
    
    {* ../../docs_src/handling_errors/tutorial001_py310.py hl[11] *}
    
    ### 响应结果 { #the-resulting-response }
    
    请求为 `http://example.com/items/foo`(`item_id` 为 `"foo"`)时,客户端会接收到 HTTP 状态码 200 及如下 JSON 响应结果:
    
    ```JSON
    {
      "item": "The Foo Wrestlers"
    }
    ```
    
    但如果客户端请求 `http://example.com/items/bar`(不存在的 `item_id` `"bar"`),则会接收到 HTTP 状态码 404(“未找到”错误)及如下 JSON 响应结果:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 8.2K bytes
    - Click Count (0)
  5. docs/de/docs/tutorial/path-params-numeric-validations.md

    ///
    
    ## Metadaten deklarieren { #declare-metadata }
    
    Sie können dieselben Parameter wie für `Query` deklarieren.
    
    Um zum Beispiel einen `title`-Metadaten-Wert für den Pfad-Parameter `item_id` zu deklarieren, können Sie schreiben:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note | Hinweis
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 7.1K bytes
    - Click Count (0)
  6. docs/es/docs/tutorial/path-params-numeric-validations.md

    ///
    
    ## Declarar metadatos { #declare-metadata }
    
    Puedes declarar todos los mismos parámetros que para `Query`.
    
    Por ejemplo, para declarar un valor de metadato `title` para el parámetro de path `item_id` puedes escribir:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note | Nota
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 6.4K bytes
    - Click Count (0)
  7. docs/uk/docs/tutorial/path-params-numeric-validations.md

    ///
    
    ## Оголошення метаданих { #declare-metadata }
    
    Ви можете оголошувати всі ті ж параметри, що і для `Query`.
    
    Наприклад, щоб оголосити значення метаданих `title` для параметра шляху `item_id`, ви можете написати:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note | Примітка
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 10K bytes
    - Click Count (0)
  8. docs_src/path_operation_advanced_configuration/tutorial003_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", include_in_schema=False)
    async def read_items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 148 bytes
    - Click Count (0)
  9. tests/test_tutorial/test_additional_responses/test_tutorial003.py

                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/items/{item_id}": {
                        "get": {
                            "responses": {
                                "404": {
                                    "description": "The item was not found",
                                    "content": {
                                        "application/json": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  10. docs_src/path_operation_advanced_configuration/tutorial005_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", openapi_extra={"x-aperture-labs-portal": "blue"})
    async def read_items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 180 bytes
    - Click Count (0)
Back to Top