Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 195 for it (0.14 sec)

  1. docs/en/docs/tutorial/dependencies/index.md

        ```Python hl_lines="8-11"
        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    That's it.
    
    **2 lines**.
    
    And it has the same shape and structure that all your *path operation functions* have.
    
    You can think of it as a *path operation function* without the "decorator" (without the `@app.get("/some-path")`).
    
    And it can return anything you want.
    
    In this case, this dependency expects:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/dependencies/sub-dependencies.md

        ```
    
    Let's focus on the parameters declared:
    
    * Even though this function is a dependency ("dependable") itself, it also declares another dependency (it "depends" on something else).
        * It depends on the `query_extractor`, and assigns the value returned by it to the parameter `q`.
    * It also declares an optional `last_query` cookie, as a `str`.
    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)
  3. docs/en/docs/advanced/openapi-callbacks.md

    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`.
    * And it could also have a declaration of the response it should return, e.g. `response_model=InvoiceEventReceived`.
    
    ```Python hl_lines="16-18  21-22  28-32"
    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)
  4. docs/en/docs/tutorial/encoder.md

    The result of calling it is something that can be encoded with the Python standard <a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>.
    
    It doesn't return a large `str` containing the data in JSON format (as a string). It returns a Python standard data structure (e.g. a `dict`) with values and sub-values that are all compatible with JSON.
    
    !!! note
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  5. docs/en/docs/fastapi-cli.md

    By default it will listen on the IP address `127.0.0.1`, which is the IP for your machine to communicate with itself alone (`localhost`).
    
    ## `fastapi run`
    
    When you run `fastapi run`, it will run on production mode by default.
    
    It will have **auto-reload disabled** by default.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:16 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  6. docs/en/docs/help-fastapi.md

    ### Check the code
    
    * Check and read the code, see if it makes sense, **run it locally** and see if it actually solves the problem.
    
    * Then **comment** saying that you did that, that's how I will know you really checked it.
    
    !!! info
        Unfortunately, I can't simply trust PRs that just have several approvals.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/query-params-str-validations.md

    ## Alternative (old) `Query` as the default value
    
    Previous versions of FastAPI (before <abbr title="before 2023-03">0.95.0</abbr>) required you to use `Query` as the default value of your parameter, instead of putting it in `Annotated`, there's a high chance that you will see code using it around, so I'll explain it to you.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  8. docs/en/docs/history-design-future.md

    By using all the previous alternatives I had the chance to learn from all of them, take ideas, and combine them in the best way I could find for myself and the teams of developers I have worked with.
    
    For example, it was clear that ideally it should be based on standard Python type hints.
    
    Also, the best approach was to use already existing standards.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/extra-models.md

        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    #### Unwrapping a `dict`
    
    If we take a `dict` like `user_dict` and pass it to a function (or class) with `**user_dict`, Python will "unwrap" it. It will pass the keys and values of the `user_dict` directly as key-value arguments.
    
    So, continuing with the `user_dict` from above, writing:
    
    ```Python
    UserInDB(**user_dict)
    ```
    
    would result in something equivalent to:
    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)
  10. docs/en/docs/tutorial/path-operation-configuration.md

    ## Deprecate a *path operation*
    
    If you need to mark a *path operation* as <abbr title="obsolete, recommended not to use it">deprecated</abbr>, but without removing it, pass the parameter `deprecated`:
    
    ```Python hl_lines="16"
    {!../../../docs_src/path_operation_configuration/tutorial006.py!}
    ```
    
    It will be clearly marked as deprecated in the interactive docs:
    
    <img src="/img/tutorial/path-operation-configuration/image04.png">
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.5K bytes
    - Viewed (0)
Back to top