Search Options

Results per page
Sort
Preferred Languages
Advance

Results 281 - 290 of 545 for strs (0.02 sec)

  1. docs/en/docs/features.md

    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declare a variable as a str
    # and get editor support inside the function
    def main(user_id: str):
        return user_id
    
    
    # A Pydantic model
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    That can then be used like:
    
    ```Python
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  2. docs/tr/docs/index.md

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 21.9K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/security/get-current-user.md

    依存関係はサブ依存関係を持つことができるのを覚えていますか?
    
    `get_current_user` は前に作成した `oauth2_scheme` と同じ依存関係を持ちます。
    
    以前直接 *path operation* の中でしていたのと同じように、新しい依存関係である `get_current_user` は `str` として `token` を受け取るようになります:
    
    {* ../../docs_src/security/tutorial002.py hl[25] *}
    
    ## ユーザーの取得
    
    `get_current_user` は作成した(偽物の)ユーティリティ関数を使って、 `str` としてトークンを受け取り、先ほどのPydanticの `User` モデルを返却します:
    
    {* ../../docs_src/security/tutorial002.py hl[19:22,26:27] *}
    
    ## 現在のユーザーの注入
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/path-params.md

    ### Create an `Enum` class { #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.
    
    Then create class attributes with fixed values, which will be the available valid values:
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:29:01 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/path-params.md

    ### Crear una clase `Enum`
    
    Importa `Enum` y crea una subclase que herede de `str` y de `Enum`.
    
    Al heredar de `str`, la documentación de la API podrá saber que los valores deben ser de tipo `string` y podrá representarlos correctamente.
    
    Luego crea atributos de clase con valores fijos, que serán los valores válidos disponibles:
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:29:01 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  6. docs/ru/docs/features.md

    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Объявляем параметр user_id с типом `str`
    # и получаем поддержку редактора внутри функции
    def main(user_id: str):
        return user_id
    
    
    # Модель Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Это можно использовать так:
    
    ```Python
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sat Nov 09 16:39:20 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  7. docs/em/docs/features.md

    👆 ✍ 🐩 🐍 ⏮️ 🆎:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declare a variable as a str
    # and get editor support inside the function
    def main(user_id: str):
        return user_id
    
    
    # A Pydantic model
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    👈 💪 ⤴️ ⚙️ 💖:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. docs/es/docs/tutorial/body-multiple-params.md

    Como, por defecto, los valores singulares se interpretan como parámetros de query, no tienes que añadir explícitamente un `Query`, solo puedes hacer:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    O en Python 3.10 y superior:
    
    ```Python
    q: str | None = None
    ```
    
    Por ejemplo:
    
    {* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *}
    
    /// info | Información
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Dec 30 18:26:57 UTC 2024
    - 5K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/request-files.md

    ### `UploadFile`
    
    `UploadFile` имеет следующие атрибуты:
    
    * `filename`: Строка `str` с исходным именем файла, который был загружен (например, `myimage.jpg`).
    * `content_type`: Строка `str` с типом содержимого (MIME type / media type) (например, `image/jpeg`).
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/security/oauth2-scopes.md

    Dazu aktualisieren wir das Pydantic-Modell `TokenData` mit einem neuen Attribut `scopes`.
    
    Durch die Validierung der Daten mit Pydantic können wir sicherstellen, dass wir beispielsweise präzise eine `list`e von `str`s mit den Scopes und einen `str` mit dem `username` haben.
    
    Anstelle beispielsweise eines `dict`s oder etwas anderem, was später in der Anwendung zu Fehlern führen könnte und darum ein Sicherheitsrisiko darstellt.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 15.1K bytes
    - Viewed (0)
Back to top