Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Optional (0.25 sec)

  1. docs/en/docs/tutorial/index.md

    ---
    
    ## Install FastAPI
    
    The first step is to install FastAPI.
    
    For the tutorial, you might want to install it with all the optional dependencies and features:
    
    <div class="termy">
    
    ```console
    $ pip install "fastapi[all]"
    
    ---> 100%
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  2. docs/it/docs/index.md

    from pydantic import BaseModel
    from typing import Optional
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: bool = Optional[None]
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Optional[str] = None):
        return {"item_id": item_id, "q": q}
    
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  3. docs/en/docs/index.md

        * If it is not, the client will see a useful, clear error.
    * Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
        * As the `q` parameter is declared with `= None`, it is optional.
        * Without the `None` it would be required (as is the body in the case with `PUT`).
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  4. docs/es/docs/index.md

        * Si no lo es, el cliente verá un mensaje de error útil y claro.
    * Revisar si existe un query parameter opcional llamado `q` (cómo en `http://127.0.0.1:8000/items/foo?q=somequery`) para requests de tipo `GET`.
        * Como el parámetro `q` fue declarado con `= None` es opcional.
        * Sin el `None` sería obligatorio (cómo lo es el body en el caso con `PUT`).
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19K bytes
    - Viewed (0)
  5. docs/fa/docs/index.md

    ```Python hl_lines="9  14"
    from typing import Optional
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Optional[str] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    **توجه**:
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 25.9K bytes
    - Viewed (0)
  6. docs/de/docs/index.md

    * Prüfen, ob es einen optionalen Abfrageparameter namens `q` (wie in `http://127.0.0.1:8000/items/foo?q=somequery`) für `GET`-Anfragen gibt.
        * Da der `q`-Parameter mit `= None` deklariert ist, ist er optional.
        * Ohne das `None` wäre er erforderlich (wie der Body im Fall von `PUT`).
    * Bei `PUT`-Anfragen an `/items/{item_id}` den Body als JSON lesen:
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:28:17 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/dependencies/index.md

    And it can return anything you want.
    
    In this case, this dependency expects:
    
    * An optional query parameter `q` that is a `str`.
    * An optional query parameter `skip` that is an `int`, and by default is `0`.
    * An optional query parameter `limit` that is an `int`, and by default is `100`.
    
    And then it just returns a `dict` containing those values.
    
    !!! info
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/index.md

        ```
        pip install fastapi
        ```
    
        Também instale o `uvicorn` para funcionar como servidor:
    
        ```
        pip install "uvicorn[standard]"
        ```
    
        E o mesmo para cada dependência opcional que você quiser usar.
    
    ## Guia Avançado de Usuário
    
    Há também um **Guia Avançado de Usuário** que você pode ler após esse **Tutorial - Guia de Usuário**.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  9. docs/az/docs/index.md

        * Əgər `int` deyilsə, səbəbini göstərən bir xəta mesajı göstərəcəkdir.
    * <abbr title="Məcburi olmayan: Optional">məcburi olmayan</abbr> `q` parametrinin `GET` (`http://127.0.0.1:8000/items/foo?q=somequery` burdakı kimi) sorğusu içərisində olub olmadığını yoxlayacaq.
        * `q` parametrini `= None` ilə yaratdığımız üçün, <abbr title="Məcburi olmayan: Optional">məcburi olmayan</abbr> parametr olacaq.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  10. docs/yo/docs/index.md

    * Ṣàyẹ̀wò bóyá ìbéèrè àṣàyàn pàrámítà kan wà tí orúkọ rẹ̀ ń jẹ́ `q` (gẹ́gẹ́ bíi `http://127.0.0.1:8000/items/foo?q=somequery`) fún ìbéèrè HTTP `GET`.
        * Bí wọ́n ṣe kéde pàrámítà `q` pẹ̀lú `= None`, ó jẹ́ àṣàyàn (i.e optional).
        * Láìsí `None` yóò nílò (gẹ́gẹ́ bí kókó èsì ìbéèrè HTTP ṣe wà pẹ̀lú `PUT`).
    * Fún àwọn ìbéèrè HTTP `PUT` sí `/items/{item_id}`, kà kókó èsì ìbéèrè HTTP gẹ́gẹ́ bí JSON:
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 24.1K bytes
    - Viewed (0)
Back to top