Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 151 for it (0.13 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/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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. docs/en/docs/tutorial/request-files.md

    * You don't have to use `File()` in the default value of the parameter.
    * It uses a "spooled" file:
        * A file stored in memory up to a maximum size limit, and after passing this limit it will be stored in disk.
    * This means that it will work well for large files like images, videos, large binaries, etc. without consuming all the memory.
    * You can get metadata from the uploaded file.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/openapi-webhooks.md

    ## Documenting webhooks with **FastAPI** and OpenAPI
    
    With **FastAPI**, using OpenAPI, you can define the names of these webhooks, the types of HTTP operations that your app can send (e.g. `POST`, `PUT`, etc.) and the request **bodies** that your app would send.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/body-nested-models.md

        {!> ../../../docs_src/body_nested_models/tutorial003.py!}
        ```
    
    With this, even if you receive a request with duplicate data, it will be converted to a set of unique items.
    
    And whenever you output that data, even if the source had duplicates, it will be output as a set of unique items.
    
    And it will be annotated / documented accordingly too.
    
    ## Nested Models
    
    Each attribute of a Pydantic model has a type.
    
    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