Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 105 for 15 (0.13 sec)

  1. docs/ru/docs/tutorial/dependencies/global-dependencies.md

        ```
    
    === "Python 3.8 non-Annotated"
    
        !!! tip "Подсказка"
            Рекомендуется использовать 'Annotated' версию, если это возможно.
    
        ```Python hl_lines="15"
        {!> ../../../docs_src/dependencies/tutorial012.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md

    Теперь мы можем изменить зависимость `common_parameters`, указанную выше, на класс `CommonQueryParams`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="11-15"
        {!> ../../../docs_src/dependencies/tutorial002_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="11-15"
        {!> ../../../docs_src/dependencies/tutorial002_an_py39.py!}
        ```
    
    === "Python 3.6+"
    
        ```Python hl_lines="12-16"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 12 11:12:19 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  3. docs_src/security/tutorial004.py

        to_encode = data.copy()
        if expires_delta:
            expire = datetime.now(timezone.utc) + expires_delta
        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
        return encoded_jwt
    
    
    async def get_current_user(token: str = Depends(oauth2_scheme)):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  4. docs_src/security/tutorial004_an.py

        to_encode = data.copy()
        if expires_delta:
            expire = datetime.now(timezone.utc) + expires_delta
        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
        return encoded_jwt
    
    
    async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_extra_data_types/test_tutorial001.py

    
    def test_extra_types():
        item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e"
        data = {
            "start_datetime": "2018-12-22T14:00:00+00:00",
            "end_datetime": "2018-12-24T15:00:00+00:00",
            "repeat_at": "15:30:00",
            "process_after": 300,
        }
        expected_response = data.copy()
        expected_response.update(
            {
                "start_process": "2018-12-22T14:05:00+00:00",
                "duration": 176_100,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/body-fields.md

        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="11-14"
        {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="12-15"
        {!> ../../../docs_src/body_fields/tutorial001_an.py!}
        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="9-12"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/body-fields.md

        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="11-14"
        {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="12-15"
        {!> ../../../docs_src/body_fields/tutorial001_an.py!}
        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="9-12"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:27 GMT 2024
    - 3K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/custom-request-and-route.md

    首先,创建 `GzipRequest` 类,覆盖解压请求头中请求体的 `Request.body()` 方法。
    
    请求头中没有 `gzip` 时,`GzipRequest` 不会解压请求体。
    
    这样就可以让同一个路由类处理 gzip 压缩的请求或未压缩的请求。
    
    ```Python hl_lines="8-15"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    ### 创建自定义 `GzipRoute` 类
    
    接下来,创建使用 `GzipRequest` 的 `fastapi.routing.APIRoute  ` 的自定义子类。
    
    此时,这个自定义子类会覆盖 `APIRoute.get_route_handler()`。
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Mar 30 22:45:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/dependencies/global-dependencies.md

    # 全局依赖项
    
    有时,我们要为整个应用添加依赖项。
    
    通过与定义[*路径装饰器依赖项*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank} 类似的方式,可以把依赖项添加至整个 `FastAPI` 应用。
    
    这样一来,就可以为所有*路径操作*应用该依赖项:
    
    ```Python hl_lines="15"
    {!../../../docs_src/dependencies/tutorial012.py!}
    ```
    
    [*路径装饰器依赖项*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank} 一章的思路均适用于全局依赖项, 在本例中,这些依赖项可以用于应用中的所有*路径操作*。
    
    ## 为一组路径操作定义依赖项
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 958 bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/dependencies/global-dependencies.md

        {!> ../../../docs_src/dependencies/tutorial012_an.py!}
        ```
    
    === "Python 3.8 non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="15"
        {!> ../../../docs_src/dependencies/tutorial012.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top