Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for optional (0.17 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 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  2. 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 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  3. 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 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  4. 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 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 25.9K bytes
    - Viewed (0)
  5. 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 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/dependencies/index.md

    Und sie kann alles zurückgeben, was Sie möchten.
    
    In diesem Fall erwartet diese Abhängigkeit:
    
    * Einen optionalen Query-Parameter `q`, der ein `str` ist.
    * Einen optionalen Query-Parameter `skip`, der ein `int` ist und standardmäßig `0` ist.
    * Einen optionalen Query-Parameter `limit`, der ein `int` ist und standardmäßig `100` ist.
    
    Und dann wird einfach ein `dict` zurückgegeben, welches diese Werte enthält.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:01:10 GMT 2024
    - 13.1K bytes
    - Viewed (0)
  7. docs/de/docs/index.md

        * Falls nicht, wird dem Client ein nützlicher, eindeutiger Fehler angezeigt.
    * 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`).
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:28:17 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/index.md

    Das Haupt-[Tutorial – Benutzerhandbuch](../tutorial/index.md){.internal-link target=_blank} sollte ausreichen, um Ihnen einen Überblick über alle Hauptfunktionen von **FastAPI** zu geben.
    
    In den nächsten Abschnitten sehen Sie weitere Optionen, Konfigurationen und zusätzliche Funktionen.
    
    !!! tip "Tipp"
        Die nächsten Abschnitte sind **nicht unbedingt „fortgeschritten“**.
    
        Und es ist möglich, dass für Ihren Anwendungsfall die Lösung in einem davon liegt.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:19:44 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. docs/fr/docs/index.md

    * Le _chemin_ `/items/{item_id}` a un  _<abbr title="en anglais : path parameter">paramètre</abbr>_ `item_id` qui doit être un `int`.
    * Le _chemin_ `/items/{item_id}` a un _<abbr title="en anglais : query param">paramètre de requête</abbr>_ optionnel `q` de type `str`.
    
    ### Documentation API interactive
    
    Maintenant, rendez-vous sur <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/index.md

    ---
    
    ## FastAPI installieren
    
    Der erste Schritt besteht aus der Installation von FastAPI.
    
    Für dieses Tutorial empfiehlt es sich, FastAPI mit allen optionalen Abhängigkeiten und Funktionen zu installieren:
    
    <div class="termy">
    
    ```console
    $ pip install "fastapi[all]"
    
    ---> 100%
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 16 12:11:15 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top