Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for leaves (0.21 sec)

  1. tests/test_ws_router.py

                pass  # pragma: no cover
        # the validation error does produce a close message
        assert e.value.code == status.WS_1008_POLICY_VIOLATION
        # and no error is leaked
        assert caught == []
    
    
    def test_depend_err_middleware():
        """
        Verify that it is possible to write custom WebSocket middleware to catch errors
        """
    
        @websocket_middleware
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/security/first-steps.md

        * If the token contains `foobar`, the content of the `Authorization` header would be: `Bearer foobar`.
    
    ## **FastAPI**'s `OAuth2PasswordBearer`
    
    **FastAPI** provides several tools, at different levels of abstraction, to implement these security features.
    
    In this example we are going to use **OAuth2**, with the **Password** flow, using a **Bearer** token. We do that using the `OAuth2PasswordBearer` class.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/extra-models.md

        'full_name': None,
    }
    ```
    
    #### Desembrulhando um `dict`
    
    Se tomarmos um `dict` como `user_dict` e passarmos para uma função (ou classe) com `**user_dict`, o Python irá "desembrulhá-lo". Ele passará as chaves e valores do `user_dict` diretamente como argumentos chave-valor.
    
    Então, continuando com o `user_dict` acima, escrevendo:
    
    ```Python
    UserInDB(**user_dict)
    ```
    
    Resultaria em algo equivalente a:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/schema-extra-example.md

    ### `Body` com vários `examples`
    
    Alternativamente ao único `example`, você pode passar `examples` usando um `dict` com **vários examples**, cada um com informações extras que serão adicionadas no **OpenAPI** também.
    
    As chaves do `dict` identificam cada exemplo, e cada valor é outro `dict`.
    
    Cada `dict` de exemplo específico em `examples` pode conter:
    
    * `summary`: Pequena descrição do exemplo.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  5. docs/de/docs/advanced/testing-dependencies.md

        FastAPI kann sie in jedem Fall überschreiben.
    
    Anschließend können Sie Ihre Überschreibungen zurücksetzen (entfernen), indem Sie `app.dependency_overrides` auf ein leeres `dict` setzen:
    
    ```Python
    app.dependency_overrides = {}
    ```
    
    !!! tip "Tipp"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:32 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  6. docs/pt/docs/python-types.md

    O primeiro parâmetro de tipo é para as chaves do `dict`.
    
    O segundo parâmetro de tipo é para os valores do `dict`:
    
    ```Python hl_lines="1 4"
    {!../../../docs_src/python_types/tutorial008.py!}
    ```
    
    Isso significa que:
    
    * A variável `prices` é um dict`:
        * As chaves deste `dict` são do tipo `str` (digamos, o nome de cada item).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/body-nested-models.md

    ```Python hl_lines="9"
    {!../../../docs_src/body_nested_models/tutorial009.py!}
    ```
    
    !!! tip "Dica"
        Leve em condideração que o JSON só suporta `str` como chaves.
    
        Mas o Pydantic tem conversão automática de dados.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  8. tests/test_inherited_custom_class.py

        def __class__(self):
            return uuid.UUID
    
        @property
        def __dict__(self):
            """Spoof a missing __dict__ by raising TypeError, this is how
            asyncpg.pgroto.pgproto.UUID behaves"""
            raise TypeError("vars() argument must have __dict__ attribute")
    
    
    @needs_pydanticv2
    def test_pydanticv2():
        from pydantic import field_serializer
    
        app = FastAPI()
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/background-tasks.md

    ## Dependency Injection
    
    Using `BackgroundTasks` also works with the dependency injection system, you can declare a parameter of type `BackgroundTasks` at multiple levels: in a *path operation function*, in a dependency (dependable), in a sub-dependency, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/body-multiple-params.md

        ```
    
    Neste caso, o **FastAPI** perceberá que existe mais de um parâmetro de corpo na função (dois parâmetros que são modelos Pydantic).
    
    Então, ele usará o nome dos parâmetros como chaves (nome dos campos) no corpo, e espera um corpo como:
    
    ```JSON
    {
        "item": {
            "name": "Foo",
            "description": "The pretender",
            "price": 42.0,
            "tax": 3.2
        },
        "user": {
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top