Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 361 - 370 of 420 for tutorial002_an_py310 (0.09 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_tutorial/test_additional_status_codes/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.additional_status_codes.{request.param}")
    
        client = TestClient(mod.app)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 934 bytes
    - Click Count (0)
  2. docs/zh/docs/tutorial/dependencies/index.md

    ///
    
    ### 导入 `Depends` { #import-depends }
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[3] *}
    
    ### 在“dependant”中声明依赖项 { #declare-the-dependency-in-the-dependant }
    
    与在*路径操作函数*的参数中使用 `Body`、`Query` 等相同,给参数使用 `Depends` 来声明一个新的依赖项:
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[13,18] *}
    
    虽然你在函数参数中使用 `Depends` 的方式与 `Body`、`Query` 等相同,但 `Depends` 的工作方式略有不同。
    
    这里只能给 `Depends` 传入一个参数。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 8.7K bytes
    - Click Count (0)
  3. docs/pt/docs/tutorial/security/oauth2-jwt.md

    {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *}
    
    ## Atualize a *operação de rota* `/token` { #update-the-token-path-operation }
    
    Crie um `timedelta` com o tempo de expiração do token.
    
    Crie um token de acesso JWT real e o retorne.
    
    {* ../../docs_src/security/tutorial004_an_py310.py hl[121:136] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  4. docs/ko/docs/how-to/authentication-error-status-code.md

    예를 들어, 기본값인 `401 Unauthorized` 오류 대신 `403 Forbidden` 오류를 반환하는 `HTTPBearer`의 서브클래스를 만들 수 있습니다:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *}
    
    /// tip | 팁
    
    함수는 예외를 `return`하는 것이지 `raise`하지 않는다는 점에 유의하세요. 예외를 발생시키는(`raise`) 작업은 내부 코드의 나머지 부분에서 수행됩니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  5. docs/en/docs/advanced/additional-status-codes.md

    To achieve that, import `JSONResponse`, and return your content there directly, setting the `status_code` that you want:
    
    {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
    
    /// warning
    
    When you return a `Response` directly, like in the example above, it will be returned directly.
    
    It won't be serialized with a model, etc.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 2K bytes
    - Click Count (0)
  6. docs/ja/docs/tutorial/dependencies/global-dependencies.md

    [`dependencies` を path operation のデコレータに追加](dependencies-in-path-operation-decorators.md)できるのと同様に、`FastAPI` アプリケーション自体にも追加できます。
    
    その場合、アプリケーション内のすべての path operation に適用されます:
    
    {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *}
    
    また、[`dependencies` を path operation のデコレータに追加](dependencies-in-path-operation-decorators.md)する節で説明した考え方はすべて引き続き当てはまりますが、この場合はアプリ内のすべての path operation に対して適用されます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 1.2K bytes
    - Click Count (0)
  7. docs/ja/docs/how-to/authentication-error-status-code.md

    たとえば、既定の `401 Unauthorized` エラーの代わりに `403 Forbidden` エラーを返す `HTTPBearer` のサブクラスを作成できます:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *}
    
    /// tip | 豆知識
    
    この関数は例外インスタンスを返す点に注意してください。ここでは例外を送出しません。送出は内部の他のコードで行われます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 1.4K bytes
    - Click Count (0)
  8. docs/ru/docs/advanced/testing-dependencies.md

    Тогда **FastAPI** будет вызывать это переопределение вместо исходной зависимости.
    
    {* ../../docs_src/dependency_testing/tutorial001_an_py310.py hl[26:27,30] *}
    
    /// tip | Совет
    
    Вы можете задать переопределение для зависимости, используемой в любом месте вашего приложения **FastAPI**.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Sep 30 11:37:11 GMT 2025
    - 4.3K bytes
    - Click Count (0)
  9. docs/fr/docs/tutorial/dependencies/global-dependencies.md

    Dans ce cas, elles seront appliquées à tous les *chemins d'accès* de l'application :
    
    {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  10. docs/uk/docs/how-to/authentication-error-status-code.md

    Наприклад, ви можете створити підклас `HTTPBearer`, який повертатиме помилку `403 Forbidden` замість типового `401 Unauthorized`:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *}
    
    /// tip | Порада
    
    Зверніть увагу, що функція повертає екземпляр винятку, вона не породжує його. Породження відбувається в іншій частині внутрішнього коду.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 1.8K bytes
    - Click Count (0)
Back to Top