Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for insert (8.59 sec)

  1. docs/en/docs/advanced/behind-a-proxy.md

    If you pass a custom list of `servers` and there's a `root_path` (because your API lives behind a proxy), **FastAPI** will insert a "server" with this `root_path` at the beginning of the list.
    
    For example:
    
    ```Python hl_lines="4-7"
    {!../../../docs_src/behind_a_proxy/tutorial003.py!}
    ```
    
    Will generate an OpenAPI schema like:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  2. docs/en/docs/advanced/dataclasses.md

    Check the in-code annotation tips above to see more specific details.
    
    ## Learn More
    
    You can also combine `dataclasses` with other Pydantic models, inherit from them, include them in your own models, etc.
    
    To learn more, check the <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/" class="external-link" target="_blank">Pydantic docs about dataclasses</a>.
    
    ## Version
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/testing.md

    Create functions with a name that starts with `test_` (this is standard `pytest` conventions).
    
    Use the `TestClient` object the same way as you do with `httpx`.
    
    Write simple `assert` statements with the standard Python expressions that you need to check (again, standard `pytest`).
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/security/get-current-user.md

        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="19-22  26-27"
        {!> ../../../docs_src/security/tutorial002.py!}
        ```
    
    ## Inject the current user
    
    So now we can use the same `Depends` with our `get_current_user` in the *path operation*:
    
    === "Python 3.10+"
    
        ```Python hl_lines="31"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  5. docs/en/docs/contributing.md

    </div>
    
    Now you can check in your code editor the newly created directory `docs/ht/`.
    
    That command created a file `docs/ht/mkdocs.yml` with a simple config that inherits everything from the `en` version:
    
    ```yaml
    INHERIT: ../en/mkdocs.yml
    ```
    
    !!! tip
        You could also simply create that file with those contents manually.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  6. docs/en/docs/release-notes.md

            * Change *path operation decorators* parameter default for `response_model_exclude` from `set()` to `None` (as is in Pydantic).
        * In `encoders.jsonable_encoder`:
            * Remove deprecated `skip_defaults`, use instead `exclude_unset`.
            * Set default of `exclude` from `set()` to `None` (as is in Pydantic).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  7. docs/en/docs/tutorial/extra-models.md

    We could do better.
    
    We can declare a `UserBase` model that serves as a base for our other models. And then we can make subclasses of that model that inherit its attributes (type declarations, validation, etc).
    
    All the data conversion, validation, documentation, etc. will still work as normally.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  8. docs/de/docs/tutorial/testing.md

    Erstellen Sie Funktionen mit einem Namen, der mit `test_` beginnt (das sind `pytest`-Konventionen).
    
    Verwenden Sie das `TestClient`-Objekt auf die gleiche Weise wie `httpx`.
    
    Schreiben Sie einfache `assert`-Anweisungen mit den Standard-Python-Ausdrücken, die Sie überprüfen müssen (wiederum, Standard-`pytest`).
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip "Tipp"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:20:01 GMT 2024
    - 7K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/custom-response.md

    * `path` - The filepath to the file to stream.
    * `headers` - Any custom headers to include, as a dictionary.
    * `media_type` - A string giving the media type. If unset, the filename or path will be used to infer a media type.
    * `filename` - If set, this will be included in the response `Content-Disposition`.
    
    File responses will include appropriate `Content-Length`, `Last-Modified` and `ETag` headers.
    
    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)
  10. docs/en/docs/tutorial/body-nested-models.md

    * Data conversion
    * Data validation
    * Automatic documentation
    
    ## Special types and validation
    
    Apart from normal singular types like `str`, `int`, `float`, etc. you can use more complex singular types that inherit from `str`.
    
    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)
Back to top