Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 46 for Magnin (0.34 sec)

  1. docs/en/docs/how-to/sql-databases-peewee.md

    ```Python hl_lines="18-20"
    {!../../../docs_src/sql_databases_peewee/sql_app/main.py!}
    ```
    
    For the **next request**, as we will reset that context variable again in the `async` dependency `reset_db_state()` and then create a new connection in the `get_db()` dependency, that new request will have its own database state (connection, transactions, etc).
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (1)
  2. docs/em/docs/tutorial/dependencies/sub-dependencies.md

    πŸš₯ 1️⃣ πŸ‘† πŸ”— πŸ“£ πŸ’— πŸ•° 🎏 *➑ πŸ› οΈ*, πŸ–Ό, πŸ’— πŸ”— βœ”οΈ ⚠ 🎧-πŸ”—, **FastAPI** πŸ”œ πŸ’­ πŸ€™ πŸ‘ˆ 🎧-πŸ”— πŸ•΄ πŸ• πŸ“ πŸ“¨.
    
    &amp; ⚫️ πŸ”œ πŸ–Š πŸ“¨ πŸ’² <abbr title="A utility/system to store computed/generated values, to re-use them instead of computing them again.">"πŸ’Ύ"</abbr> &amp; πŸšΆβ€β™€οΈ ⚫️ 🌐 "βš“οΈ" πŸ‘ˆ πŸ’ͺ ⚫️ πŸ‘ˆ 🎯 πŸ“¨, ↩️ πŸ€™ πŸ”— πŸ’— πŸ•° 🎏 πŸ“¨.
    
    🏧 😐 πŸŒβ” πŸ‘† πŸ’­ πŸ‘† πŸ’ͺ πŸ”— πŸ€™ πŸ”  πŸ” (🎲 πŸ’— πŸ•°) 🎏 πŸ“¨ ↩️ βš™οΈ "πŸ’Ύ" πŸ’², πŸ‘† πŸ’ͺ βš’ πŸ”’ `use_cache=False` πŸ•β” βš™οΈ `Depends`:
    
    ```Python hl_lines="1"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/security/oauth2-scopes.md

    It will have a property `scopes` with a list containing all the scopes required by itself and all the dependencies that use this as a sub-dependency. That means, all the "dependants"... this might sound confusing, it is explained again later below.
    
    The `security_scopes` object (of class `SecurityScopes`) also provides a `scope_str` attribute with a single string, containing those scopes separated by spaces (we are going to use it).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/security/simple-oauth2.md

      "disabled": false,
      "hashed_password": "fakehashedsecret"
    }
    ```
    
    <img src="/img/tutorial/security/image06.png">
    
    If you click the lock icon and logout, and then try the same operation again, you will get an HTTP 401 error of:
    
    ```JSON
    {
      "detail": "Not authenticated"
    }
    ```
    
    ### Inactive user
    
    Now try with an inactive user, authenticate with:
    
    User: `alice`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/settings.md

    #### `lru_cache` Technical Details
    
    `@lru_cache` modifies the function it decorates to return the same value that was returned the first time, instead of computing it again, executing the code of the function every time.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial008c_an_py39.py

    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 700 bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Dependencies with `yield` and `except`
    
    If you catch an exception using `except` in a dependency with `yield` and you don't raise it again (or raise a new exception), FastAPI won't be able to notice there was an exception, the same way that would happen with regular Python:
    
    === "Python 3.9+"
    
        ```Python hl_lines="15-16"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  8. docs/en/docs/how-to/custom-docs-ui-assets.md

    {!../../../docs_src/custom_docs_ui/tutorial002.py!}
    ```
    
    ### Include the custom docs for static files
    
    And the same way as with a custom CDN, now you can create the *path operations* for the custom docs.
    
    Again, you can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

        ```Python
        commons: CommonQueryParams = Depends()
        ```
    
    You declare the dependency as the type of the parameter, and you use `Depends()` without any parameter, instead of having to write the full class *again* inside of `Depends(CommonQueryParams)`.
    
    The same example would then look like:
    
    === "Python 3.10+"
    
        ```Python hl_lines="19"
        {!> ../../../docs_src/dependencies/tutorial004_an_py310.py!}
        ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_extending_openapi/test_tutorial001.py

                        "summary": "Read Items",
                        "operationId": "read_items_items__get",
                    }
                }
            },
        }
        openapi_schema = response.json()
        # Request again to test the custom cache
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.5K bytes
    - Viewed (0)
Back to top