Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 124 for Krause (0.15 sec)

  1. docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="6  11"
        {!> ../../../docs_src/dependencies/tutorial006.py!}
        ```
    
    ### Raise exceptions
    
    These dependencies can `raise` exceptions, the same as normal dependencies:
    
    === "Python 3.9+"
    
        ```Python hl_lines="10  15"
        {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!}
        ```
    
    === "Python 3.8+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  2. docs_src/security/tutorial007.py

        correct_password_bytes = b"swordfish"
        is_correct_password = secrets.compare_digest(
            current_password_bytes, correct_password_bytes
        )
        if not (is_correct_username and is_correct_password):
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Incorrect username or password",
                headers={"WWW-Authenticate": "Basic"},
            )
        return credentials.username
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 14:33:05 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    ### 依存関係の要件
    
    これらはリクエストの要件(ヘッダのようなもの)やその他のサブ依存関係を宣言することができます:
    
    ```Python hl_lines="6 11"
    {!../../../docs_src/dependencies/tutorial006.py!}
    ```
    
    ### 例外の発生
    
    これらの依存関係は通常の依存関係と同じように、例外を`raise`発生させることができます:
    
    ```Python hl_lines="8 13"
    {!../../../docs_src/dependencies/tutorial006.py!}
    ```
    
    ### 戻り値
    
    そして、値を返すことも返さないこともできますが、値は使われません。
    
    つまり、すでにどこかで使っている通常の依存関係(値を返すもの)を再利用することができ、値は使われなくても依存関係は実行されます:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 16:44:28 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

        ```Python hl_lines="6  11"
        {!> ../../../docs_src/dependencies/tutorial006.py!}
        ```
    
    ### Вызов исключений
    
    Зависимости из dependencies могут вызывать исключения с помощью `raise`, как и обычные зависимости:
    
    === "Python 3.9+"
    
        ```Python hl_lines="10  15"
        {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="9  14"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 06 15:43:55 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  5. tests/test_filter_pydantic_sub_model_pv2.py

            description: Optional[str] = None
            foo: ModelB
    
            @field_validator("name")
            def lower_username(cls, name: str, info: ValidationInfo):
                if not name.endswith("A"):
                    raise ValueError("name must end in A")
                return name
    
        async def get_model_c() -> ModelC:
            return ModelC(username="test-user", password="test-password")
    
        @app.get("/model/{name}", response_model=ModelA)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

        ```Python hl_lines="6  11"
        {!> ../../../docs_src/dependencies/tutorial006.py!}
        ```
    
    ### Exceptions auslösen
    
    Die Abhängigkeiten können Exceptions `raise`n, genau wie normale Abhängigkeiten:
    
    === "Python 3.9+"
    
        ```Python hl_lines="10  15"
        {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:09:16 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/security/oauth2-scopes.md

    它的属性 `scopes`  是作用域列表,所有依赖项都把它作为子依赖项。也就是说所有**依赖**……这听起来有些绕,后文会有解释。
    
    (类 `SecurityScopes` 的)`security_scopes` 对象还提供了单字符串类型的属性 `scope_str`,该属性是(要在本例中使用的)用空格分割的作用域。
    
    此处还创建了后续代码中要复用(`raise`)的 `HTTPException` 。
    
    该异常包含了作用域所需的(如有),以空格分割的字符串(使用 `scope_str`)。该字符串要放到包含作用域的 `WWW-Authenticate` 请求头中(这也是规范的要求)。
    
    ```Python hl_lines="105  107-115"
    {!../../../docs_src/security/tutorial005.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:43:35 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/security/oauth2-scopes.md

    Wir erstellen eine `HTTPException`, die wir später an mehreren Stellen wiederverwenden (`raise`n) können.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:08 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  9. docs/en/data/people.yml

      count: 240
      avatarUrl: https://avatars.githubusercontent.com/u/4335847?u=ed77f67e0bb069084639b24d812dbb2a2b1dc554&v=4
      url: https://github.com/jgould22
    - login: Mause
      count: 220
      avatarUrl: https://avatars.githubusercontent.com/u/1405026?v=4
      url: https://github.com/Mause
    - login: ycd
      count: 217
      avatarUrl: https://avatars.githubusercontent.com/u/62724709?u=45aa6ef58220a3f1e8a3c3cd5f1b75a1a0a73347&v=4
      url: https://github.com/ycd
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 22:21:11 GMT 2024
    - 57.2K bytes
    - Viewed (0)
  10. tests/test_dependency_contextmanager.py

    
    def test_async_raise_other():
        assert state["/async_raise"] == "asyncgen raise not started"
        with pytest.raises(OtherDependencyError):
            client.get("/async_raise_other")
        assert state["/async_raise"] == "asyncgen raise finalized"
        assert "/async_raise" not in errors
    
    
    def test_sync_raise_other():
        assert state["/sync_raise"] == "generator raise not started"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top