Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 48 for above (0.14 sec)

  1. docs/en/docs/tutorial/bigger-applications.md

    * and in there, find the module `dependencies` (the file at `app/dependencies.py`)...
    * and from it, import the function `get_token_header`.
    
    That would refer to some package above `app/`, with its own file `__init__.py`, etc. But we don't have that. So, that would throw an error in our example. 🚨
    
    But now you know how it works, so you can use relative imports in your own apps no matter how complex they are. πŸ€“
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/query-params.md

    ...the query parameters are:
    
    * `skip`: with a value of `0`
    * `limit`: with a value of `10`
    
    As they are part of the URL, they are "naturally" strings.
    
    But when you declare them with Python types (in the example above, as `int`), they are converted to that type and validated against it.
    
    All the same process that applied for path parameters also applies for query parameters:
    
    * Editor support (obviously)
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Oct 20 09:08:42 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/body-nested-models.md

    But Python has a specific way to declare lists with internal types, or "type parameters":
    
    ### Import typing's `List`
    
    In Python 3.9 and above you can use the standard `list` to declare these type annotations as we'll see below. πŸ’‘
    
    But in Python versions before 3.9 (3.6 and above), you first need to import `List` from standard Python's `typing` module:
    
    ```Python hl_lines="1"
    {!> ../../../docs_src/body_nested_models/tutorial002.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/events.md

    async with lifespan(app):
        await do_stuff()
    ```
    
    When you create a context manager or an async context manager like above, what it does is that, before entering the `with` block, it will execute the code before the `yield`, and after exiting the `with` block, it will execute the code after the `yield`.
    
    In our code example above, we don't use it directly, but we pass it to FastAPI for it to use it.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/websockets.md

    But for this example, we'll use a very simple HTML document with some JavaScript, all inside a long string.
    
    This, of course, is not optimal and you wouldn't use it for production.
    
    In production you would have one of the options above.
    
    But it's the simplest way to focus on the server-side of WebSockets and have a working example:
    
    ```Python hl_lines="2  6-38  41-43"
    {!../../../docs_src/websockets/tutorial001.py!}
    ```
    
    ## Create a `websocket`
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/custom-response.md

    Takes some data and returns an `application/json` encoded response.
    
    This is the default response used in **FastAPI**, as you read above.
    
    ### `ORJSONResponse`
    
    A fast alternative JSON response using <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>, as you read above.
    
    ### `UJSONResponse`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  7. docs/en/docs/async.md

    Anyway, in any of the cases above, FastAPI will still work asynchronously and be extremely fast.
    
    But by following the steps above, it will be able to do some performance optimizations.
    
    ## Technical Details
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/openapi-callbacks.md

    ```Python hl_lines="3  25"
    {!../../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    ### Create the callback *path operation*
    
    To create the callback *path operation* use the same `APIRouter` you created above.
    
    It should look just like a normal FastAPI *path operation*:
    
    * It should probably have a declaration of the body it should receive, e.g. `body: InvoiceEvent`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/sql-databases-peewee.md

    !!! warning "Python 3.7+ required"
        You will need Python 3.7 or above to safely use Peewee with FastAPI.
    
    ## Peewee for async
    
    Peewee was not designed for async frameworks, or with them in mind.
    
    Peewee has some heavy assumptions about its defaults and about how it should be used.
    
    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)
  10. docs/ko/docs/tutorial/background-tasks.md

    **FastAPI**λŠ” 각 κ²½μš°μ— μˆ˜ν–‰ν•  μž‘μ—…κ³Ό λ™μΌν•œ 개체λ₯Ό λ‚΄λΆ€μ μœΌλ‘œ μž¬μ‚¬μš©ν•˜κΈ°μ—, λͺ¨λ“  λ°±κ·ΈλΌμš΄λ“œ μž‘μ—…μ΄ ν•¨κ»˜ λ³‘ν•©λ˜κ³  λ‚˜μ€‘μ— λ°±κ·ΈλΌμš΄λ“œμ—μ„œ μ‹€ν–‰λ©λ‹ˆλ‹€.
    
    === "Python 3.6 and above"
    
        ```Python hl_lines="13  15  22  25"
        {!> ../../../docs_src/background_tasks/tutorial002.py!}
        ```
    
    === "Python 3.10 and above"
    
        ```Python hl_lines="11  13  20  23"
        {!> ../../../docs_src/background_tasks/tutorial002_py310.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 11 13:48:31 GMT 2024
    - 5.7K bytes
    - Viewed (0)
Back to top