Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Enum (0.18 sec)

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

    ### Bir `Enum` Sınıfı Oluşturalım
    
    `Enum` sınıfını projemize dahil edip `str` ile `Enum` sınıflarını miras alan bir alt sınıf yaratalım.
    
    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)
  2. docs/ja/docs/tutorial/path-params.md

    ## 定義済みの値
    
    *パスパラメータ*を受け取る *path operation* をもち、有効な*パスパラメータ*の値を事前に定義したい場合は、標準のPython <abbr title="Enumeration">`Enum`</abbr> を利用できます。
    
    ### `Enum` クラスの作成
    
    `Enum` をインポートし、 `str` と `Enum` を継承したサブクラスを作成します。
    
    `str` を継承することで、APIドキュメントは値が `文字列` でなければいけないことを知り、正確にレンダリングできるようになります。
    
    そして、固定値のクラス属性を作ります。すると、その値が使用可能な値となります:
    
    ```Python hl_lines="1 6 7 8 9"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/path-params.md

    ### Erstellen Sie eine `Enum`-Klasse
    
    Importieren Sie `Enum` und erstellen Sie eine Unterklasse, die von `str` und `Enum` erbt.
    
    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)
  4. docs/em/docs/tutorial/path-params.md

    ```
    
    🥇 🕐 🔜 🕧 ⚙️ ↩️ ➡ 🏏 🥇.
    
    ## 🔁 💲
    
    🚥 👆 ✔️ *➡ 🛠️* 👈 📨 *➡ 🔢*, ✋️ 👆 💚 💪 ☑ *➡ 🔢* 💲 🔁, 👆 💪 ⚙️ 🐩 🐍 <abbr title="Enumeration">`Enum`</abbr>.
    
    ### ✍ `Enum` 🎓
    
    🗄 `Enum` &amp; ✍ 🎧-🎓 👈 😖 ⚪️➡️ `str` &amp; ⚪️➡️ `Enum`.
    
    😖 ⚪️➡️ `str` 🛠️ 🩺 🔜 💪 💭 👈 💲 🔜 🆎 `string` &amp; 🔜 💪 ✍ ☑.
    
    ⤴️ ✍ 🎓 🔢 ⏮️ 🔧 💲, ❔ 🔜 💪 ☑ 💲:
    
    ```Python hl_lines="1  6-9"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/path-params.md

    ### Crea una clase `Enum`
    
    Importa `Enum` y crea una sub-clase que herede desde `str` y desde `Enum`.
    
    Al heredar desde `str` la documentación de la API podrá saber que los valores deben ser de tipo `string` y podrá mostrarlos correctamente.
    
    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)
  6. docs/pt/docs/tutorial/path-params.md

    ### Criando uma classe `Enum`
    
    Importe `Enum` e crie uma sub-classe que herde de `str` e de `Enum`.
    
    Por herdar de `str` a documentação da API vai ser capaz de saber que os valores devem ser do tipo `string` e assim ser capaz de mostrar eles corretamente.
    
    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)
  7. docs/ko/docs/tutorial/path-params.md

    ## 사전정의 값
    
    만약 *경로 매개변수*를 받는 *경로 작동*이 있지만, *경로 매개변수*로 가능한 값들을 미리 정의하고 싶다면 파이썬 표준 <abbr title="열거형(Enumeration)">`Enum`</abbr>을 사용할 수 있습니다.
    
    ### `Enum` 클래스 생성
    
    `Enum`을 임포트하고 `str`과 `Enum`을 상속하는 서브 클래스를 만듭니다.
    
    `str`을 상속함으로써 API 문서는 값이 `string` 형이어야 하는 것을 알게 되고 이는 문서에 제대로 표시됩니다.
    
    가능한 값들에 해당하는 고정된 값의 클래스 어트리뷰트들을 만듭니다:
    
    ```Python hl_lines="1  6-9"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/path-params.md

    ### Create an `Enum` class
    
    Import `Enum` and create a sub-class that inherits from `str` and from `Enum`.
    
    By inheriting from `str` the API docs will be able to know that the values must be of type `string` and will be able to render correctly.
    
    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)
  9. docs/ru/docs/tutorial/path-params.md

    ### Создание класса `Enum`
    
    Импортируйте `Enum` и создайте подкласс, который наследуется от `str` и `Enum`.
    
    Мы наследуемся от `str`, чтобы документация API могла понять, что значения должны быть типа `string` и отображалась правильно.
    
    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)
  10. docs/zh/docs/tutorial/path-params.md

    ```
    
    否则,`/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"
    {!../../../docs_src/path_params/tutorial005.py!}
    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)
Back to top