Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for lenet (0.04 sec)

  1. docs_src/path_params/tutorial005.py

    
    class ModelName(str, Enum):
        alexnet = "alexnet"
        resnet = "resnet"
        lenet = "lenet"
    
    
    app = FastAPI()
    
    
    @app.get("/models/{model_name}")
    async def get_model(model_name: ModelName):
        if model_name is ModelName.alexnet:
            return {"model_name": model_name, "message": "Deep Learning FTW!"}
    
        if model_name.value == "lenet":
            return {"model_name": model_name, "message": "LeCNN all the images"}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 26 13:26:03 UTC 2022
    - 546 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_params/test_tutorial005.py

                        "input": "foo",
                        "ctx": {"expected": "'alexnet', 'resnet' or 'lenet'"},
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "ctx": {"enum_values": ["alexnet", "resnet", "lenet"]},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 5K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/path-params.md

    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | "Tipp"
    
    Sie können den Wert `"lenet"` außerdem mittels `ModelName.lenet.value` abrufen.
    
    ///
    
    #### *Enum-Member* zurückgeben
    
    Sie können *Enum-Member* in ihrer *Pfadoperation* zurückgeben, sogar verschachtelt in einem JSON-Body (z. B. als `dict`).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/path-params.md

    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip
    
    You could also access the value `"lenet"` with `ModelName.lenet.value`.
    
    ///
    
    #### Return *enumeration members*
    
    You can return *enum members* from your *path operation*, even nested in a JSON body (e.g. a `dict`).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/path-params.md

    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | Consejo
    
    También podrías obtener el valor `"lenet"` con `ModelName.lenet.value`.
    
    ///
    
    #### Devuelve *enumeration members*
    
    Puedes devolver *enum members* desde tu *operación de path* inclusive en un body de JSON anidado (por ejemplo, un `dict`).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/path-params.md

    `model_name.value` 또는 일반적으로 `your_enum_member.value`를 이용하여 실제 값(위 예시의 경우 `str`)을 가져올 수 있습니다:
    
    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | "팁"
    
    `ModelName.lenet.value`로도 값 `"lenet"`에 접근할 수 있습니다.
    
    ///
    
    #### *열거형 멤버* 반환
    
    *경로 작동*에서 *열거형 멤버*를 반환할 수 있습니다. 이는 중첩 JSON 본문(예: `dict`)내의 값으로도 가능합니다.
    
    클라이언트에 반환하기 전에 해당 값(이 경우 문자열)으로 변환됩니다:
    
    ```Python hl_lines="18  21  23"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/path-params.md

    👆 💪 🤚 ☑ 💲 ( `str` 👉 💼) ⚙️ `model_name.value`, ⚖️ 🏢, `your_enum_member.value`:
    
    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip
    
    👆 💪 🔐 💲 `"lenet"` ⏮️ `ModelName.lenet.value`.
    
    ///
    
    #### 📨 *🔢 👨‍🎓*
    
    👆 💪 📨 *🔢 👨‍🎓* ⚪️➡️ 👆 *➡ 🛠️*, 🐦 🎻 💪 (✅ `dict`).
    
    👫 🔜 🗜 👫 🔗 💲 (🎻 👉 💼) ⏭ 🛬 👫 👩‍💻:
    
    ```Python hl_lines="18  21  23"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  8. docs/tr/docs/tutorial/path-params.md

    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | "İpucu"
    
    `"lenet"` değerine `ModelName.lenet.value` tanımı ile de ulaşabilirsiniz.
    
    ///
    
    #### *Enumeration Üyelerini* Döndürelim
    
    JSON gövdesine (örneğin bir `dict`) gömülü olsalar bile *yol operasyonundaki* *enum üyelerini* döndürebilirsiniz.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  9. docs/fr/docs/tutorial/path-params.md

    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | "Astuce"
    
    Vous pouvez aussi accéder la valeur `"lenet"` avec `ModelName.lenet.value`.
    
    ///
    
    #### Retourner des *membres d'énumération*
    
    Vous pouvez retourner des *membres d'énumération* dans vos *fonctions de chemin*, même imbriquée dans un JSON (e.g. un `dict`).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/path-params.md

    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | "Подсказка"
    
    Значение `"lenet"` также можно получить с помощью `ModelName.lenet.value`.
    
    ///
    
    #### Возврат *элементов перечисления*
    
    Из *операции пути* можно вернуть *элементы перечисления*, даже вложенные в тело JSON (например в `dict`).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top