Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 143 for init (0.34 sec)

  1. docs/en/docs/python-types.md

    === "Python 3.8+"
    
        ```Python hl_lines="1  4"
        {!> ../../../docs_src/python_types/tutorial007.py!}
        ```
    
    This means:
    
    * The variable `items_t` is a `tuple` with 3 items, an `int`, another `int`, and a `str`.
    * The variable `items_s` is a `set`, and each of its items is of type `bytes`.
    
    #### Dict
    
    To define a `dict`, you pass 2 type parameters, separated by commas.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  2. .github/actions/people/app/main.py

    
    class Comments(BaseModel):
        nodes: List[CommentsNode]
    
    
    class DiscussionsComments(BaseModel):
        nodes: List[DiscussionsCommentsNode]
    
    
    class DiscussionsNode(BaseModel):
        number: int
        author: Union[Author, None] = None
        title: str
        createdAt: datetime
        comments: DiscussionsComments
    
    
    class DiscussionsEdge(BaseModel):
        cursor: str
        node: DiscussionsNode
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  3. tests/test_tuples.py

        return item_group
    
    
    @app.post("/tuple-of-models/")
    def post_tuple_of_models(square: Tuple[Coordinate, Coordinate]):
        return square
    
    
    @app.post("/tuple-form/")
    def hello(values: Tuple[int, int] = Form()):
        return values
    
    
    client = TestClient(app)
    
    
    def test_model_with_tuple_valid():
        data = {"items": [["foo", "bar"], ["baz", "whatelse"]]}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  4. docs/de/docs/features.md

    # Deklarieren Sie eine Variable als ein `str`
    # und bekommen Sie Editor-Unterstütung innerhalb der Funktion
    def main(user_id: str):
        return user_id
    
    
    # Ein Pydantic-Modell
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Das kann nun wie folgt verwendet werden:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 19:43:43 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/request-files.md

    * `write(data)`: Записать данные `data` (`str` или `bytes`) в файл.
    * `read(size)`: Прочитать количество `size` (`int`) байт/символов из файла.
    * `seek(offset)`: Перейти к байту на позиции `offset` (`int`) в файле.
        * Наример, `await myfile.seek(0)` перейдет к началу файла.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/dependencies/index.md

    И она может возвращать всё, что требуется.
    
    В этом случае, эта зависимость ожидает:
    
    * Необязательный query-параметр `q` с типом `str`
    * Необязательный query-параметр `skip` с типом `int`, и значением по умолчанию `0`
    * Необязательный query-параметр `limit` с типом `int`, и значением по умолчанию `100`
    
    И в конце она возвращает `dict`, содержащий эти значения.
    
    !!! info "Информация"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/dependencies/index.md

    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.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:01:10 GMT 2024
    - 13.1K bytes
    - Viewed (0)
  8. tests/test_dependency_overrides.py

    from dirty_equals import IsDict
    from fastapi import APIRouter, Depends, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    router = APIRouter()
    
    
    async def common_parameters(q: str, skip: int = 0, limit: int = 100):
        return {"q": q, "skip": skip, "limit": limit}
    
    
    @app.get("/main-depends/")
    async def main_depends(commons: dict = Depends(common_parameters)):
        return {"in": "main-depends", "params": commons}
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  9. docs/ja/docs/async.md

    `await` が機能するためには、非同期処理をサポートする関数内にある必要があります。これは、`async def` で関数を宣言するだけでよいです:
    
    ```Python hl_lines="1"
    async def get_burgers(number: int):
        # ハンバーガーを作成するために非同期処理を実行
        return burgers
    ```
    
    ...`def` のかわりに:
    
    ```Python hl_lines="2"
    # 非同期ではない
    def get_sequential_burgers(number: int):
        # ハンバーガーを作成するためにシーケンシャルな処理を実行
        return burgers
    ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  10. docs/ja/docs/features.md

    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")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.3K bytes
    - Viewed (0)
Back to top