Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Magic (0.18 sec)

  1. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py

        assert response.json() == {
            "size": 30,
            "content": {
                "name": "Maaaagic",
                "price": 42,
                "description": "Just kiddin', no magic here. ✨",
            },
        }
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/path-operation-advanced-configuration.md

    {!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!}
    ```
    
    πŸ‘‰ πŸ–Ό, πŸ‘₯ 🚫 πŸ“£ πŸ™† Pydantic 🏷. πŸ‘, πŸ“¨ πŸ’ͺ 🚫 <abbr title="converted from some plain format, like bytes, into Python objects">🎻</abbr> 🎻, ⚫️ ✍ πŸ”— `bytes`, &amp; πŸ”’ `magic_data_reader()` πŸ”œ 🈚 🎻 ⚫️ 🌌.
    
    πŸ‘, πŸ‘₯ πŸ’ͺ πŸ“£ πŸ“ˆ πŸ”— πŸ“¨ πŸ’ͺ.
    
    ### πŸ›ƒ πŸ—„ 🎚 πŸ†Ž
    
    βš™οΈ πŸ‘‰ 🎏 🎱, πŸ‘† πŸ’ͺ βš™οΈ Pydantic 🏷 πŸ”¬ 🎻 πŸ”— πŸ‘ˆ ‴️ πŸ”Œ πŸ›ƒ πŸ—„ πŸ”— πŸ“„ *➑ πŸ› οΈ*.
    
    &amp; πŸ‘† πŸ’ͺ πŸ‘‰ πŸš₯ πŸ’½ πŸ†Ž πŸ“¨ 🚫 🎻.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/sql-databases.md

    {!../../../docs_src/sql_databases/sql_app/models.py!}
    ```
    
    ### Create the relationships
    
    Now create the relationships.
    
    For this, we use `relationship` provided by SQLAlchemy ORM.
    
    This will become, more or less, a "magic" attribute that will contain the values from other tables related to this one.
    
    ```Python hl_lines="2  15  26"
    {!../../../docs_src/sql_databases/sql_app/models.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  4. docs_src/path_operation_advanced_configuration/tutorial006.py

    from fastapi import FastAPI, Request
    
    app = FastAPI()
    
    
    def magic_data_reader(raw_body: bytes):
        return {
            "size": len(raw_body),
            "content": {
                "name": "Maaaagic",
                "price": 42,
                "description": "Just kiddin', no magic here. ✨",
            },
        }
    
    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 29 20:01:13 GMT 2021
    - 1K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/async-tests.md

    Even if your **FastAPI** application uses normal `def` functions instead of `async def`, it is still an `async` application underneath.
    
    The `TestClient` does some magic inside to call the asynchronous FastAPI application in your normal `def` test functions, using standard pytest. But that magic doesn't work anymore when we're using it inside asynchronous functions. By running our tests asynchronously, we can no longer use the `TestClient` inside our test functions.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 13 12:07:15 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/path-operation-advanced-configuration.md

    In this example, we didn't declare any Pydantic model. In fact, the request body is not even <abbr title="converted from some plain format, like bytes, into Python objects">parsed</abbr> as JSON, it is read directly as `bytes`, and the function `magic_data_reader()` would be in charge of parsing it in some way.
    
    Nevertheless, we can declare the expected schema for the request body.
    
    ### Custom OpenAPI content type
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. docs/en/docs/how-to/sql-databases-peewee.md

    And `threading.local` is not compatible with the new async features of modern Python.
    
    !!! note "Technical Details"
        `threading.local` is used to have a "magic" variable that has a different value for each thread.
    
        This was useful in older frameworks designed to have one single thread per request, no more, no less.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/path-operation-advanced-configuration.md

    Dennoch kΓΆnnen wir das zu erwartende Schema fΓΌr den Requestbody deklarieren.
    
    ### Benutzerdefinierter OpenAPI-Content-Type
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:27:23 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  9. docs/fr/docs/advanced/path-operation-advanced-configuration.md

    NΓ©anmoins, nous pouvons dΓ©clarer le schΓ©ma attendu pour le corps de la requΓͺte.
    
    ### Type de contenu OpenAPI personnalisΓ©
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/security/oauth2-scopes.md

    !!! tip
        The important and "magic" thing here is that `get_current_user` will have a different list of `scopes` to check for each *path operation*.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
Back to top