Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for Enumeration (0.25 sec)

  1. docs/en/docs/tutorial/path-params.md

    ### Working with Python *enumerations*
    
    The value of the *path parameter* will be an *enumeration member*.
    
    #### Compare *enumeration members*
    
    You can compare it with the *enumeration member* in your created enum `ModelName`:
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Get the *enumeration value*
    
    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)
  2. tests/test_tutorial/test_path_params/test_tutorial005.py

                "detail": [
                    {
                        "ctx": {"enum_values": ["alexnet", "resnet", "lenet"]},
                        "loc": ["path", "model_name"],
                        "msg": "value is not a valid enumeration member; permitted: 'alexnet', 'resnet', 'lenet'",
                        "type": "type_error.enum",
                    }
                ]
            }
        )
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 5K bytes
    - Viewed (0)
  3. docs/es/docs/tutorial/path-params.md

    ### Trabajando con los *enumerations* de Python
    
    El valor del *parámetro de path* será un *enumeration member*.
    
    #### Compara *enumeration members*
    
    Puedes compararlo con el *enumeration member* en el enum (`ModelName`) que creaste:
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Obtén el *enumeration value*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/path-params.md

    <img src="/img/tutorial/path-params/image03.png">
    
    ### Trabalhando com os *enumeration* do Python
    
    O valor do *parâmetro da rota* será um *membro de enumeration*.
    
    #### Compare *membros de enumeration*
    
    Você pode comparar eles com o *membro de enumeration* no enum `ModelName` que você criou:
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  5. docs/tr/docs/tutorial/path-params.md

    ### Python *Enumerationları* ile Çalışmak
    
    *Yol parametresinin* değeri bir *enumeration üyesi* olacaktır.
    
    #### *Enumeration Üyelerini* Karşılaştıralım
    
    Parametreyi, yarattığınız enum olan `ModelName` içerisindeki *enumeration üyesi* ile karşılaştırabilirsiniz:
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### *Enumeration Değerini* Edinelim
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/path-params.md

    <img src="/img/tutorial/path-params/image03.png">
    
    ### Mit Python-*<abbr title="Enumeration – Aufzählung">Enums</abbr>* arbeiten
    
    Der *Pfad-Parameter* wird ein *<abbr title="Member – Mitglied: Einer der möglichen Werte einer Enumeration">Member</abbr> eines Enums* sein.
    
    #### *Enum-Member* vergleichen
    
    Sie können ihn mit einem Member Ihres Enums `ModelName` vergleichen:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:28:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  7. docs/fr/docs/tutorial/path-params.md

    La valeur du *paramètre de chemin* sera un des "membres" de l'énumération.
    
    #### Comparer les *membres d'énumération*
    
    Vous pouvez comparer ce paramètre avec les membres de votre énumération `ModelName` :
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Récupérer la *valeur de l'énumération*
    
    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)
  8. docs/ru/docs/tutorial/path-params.md

    ## Предопределенные значения
    
    Что если нам нужно заранее определить допустимые *параметры пути*, которые *операция пути* может принимать? В таком случае можно использовать стандартное перечисление <abbr title="Enumeration">`Enum`</abbr> Python.
    
    ### Создание класса `Enum`
    
    Импортируйте `Enum` и создайте подкласс, который наследуется от `str` и `Enum`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/path-params.md

    ```Python hl_lines="6  11"
    {!../../../docs_src/path_params/tutorial003.py!}
    ```
    
    否则,`/users/{user_id}` 将匹配 `/users/me`,FastAPI 会**认为**正在接收值为 `"me"` 的 `user_id` 参数。
    
    ## 预设值
    
    路径操作使用 Python 的 <abbr title="Enumeration">`Enum`</abbr> 类型接收预设的*路径参数*。
    
    ### 创建 `Enum` 类
    
    导入 `Enum` 并创建继承自 `str` 和 `Enum` 的子类。
    
    通过从 `str` 继承,API 文档就能把值的类型定义为**字符串**,并且能正确渲染。
    
    然后,创建包含固定值的类属性,这些固定值是可用的有效值:
    
    ```Python hl_lines="1  6-9"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:40 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/path-operation-configuration.md

        ```
    
    Diese werden zum OpenAPI-Schema hinzugefügt und von den automatischen Dokumentations-Benutzeroberflächen verwendet:
    
    <img src="/img/tutorial/path-operation-configuration/image01.png">
    
    ### Tags mittels Enumeration
    
    Wenn Sie eine große Anwendung haben, können sich am Ende **viele Tags** anhäufen, und Sie möchten sicherstellen, dass Sie für verwandte *Pfadoperationen* immer den **gleichen Tag** nehmen.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:07:48 GMT 2024
    - 5.9K bytes
    - Viewed (0)
Back to top