Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 302 for Chen (0.15 sec)

  1. docs/en/docs/reference/request.md

    # `Request` class
    
    You can declare a parameter in a *path operation function* or dependency to be of type `Request` and then you can access the raw request object directly, without any validation, etc.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Request
    ```
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 516 bytes
    - Viewed (0)
  2. docs/en/docs/contributing.md

    And if you update that local FastAPI source code when you run that Python file again, it will use the fresh version of FastAPI you just edited.
    
    That way, you don't have to "install" your local version to be able to test every change.
    
    !!! note "Technical Details"
        This only happens when you install using this included `requirements.txt` instead of running `pip install fastapi` directly.
    
    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)
  3. docs/en/docs/advanced/behind-a-proxy.md

    The `root_path` is used to handle these specific cases.
    
    And it's also used internally when mounting sub-applications.
    
    ## Proxy with a stripped path prefix
    
    Having a proxy with a stripped path prefix, in this case, means that you could declare a path at `/app` in your code, but then, you add a layer on top (the proxy) that would put your **FastAPI** application under a path like `/api/v1`.
    
    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)
  4. docs/en/docs/deployment/manually.md

    Just keep in mind that when you read "server" in general, it could refer to one of those two things.
    
    When referring to the remote machine, it's common to call it **server**, but also **machine**, **VM** (virtual machine), **node**. Those all refer to some type of remote machine, normally running Linux, where you run programs.
    
    ## Install the Server Program
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/body-fields.md

        ```
    
    !!! warning
        Notice that `Field` is imported directly from `pydantic`, not from `fastapi` as are all the rest (`Query`, `Path`, `Body`, etc).
    
    ## Declare model attributes
    
    You can then use `Field` with model attributes:
    
    === "Python 3.10+"
    
        ```Python hl_lines="11-14"
        {!> ../../../docs_src/body_fields/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/path-params.md

    Several of these are explored in the next chapters of the tutorial.
    
    ## Order matters
    
    When creating *path operations*, you can find situations where you have a fixed path.
    
    Like `/users/me`, let's say that it's to get data about the current user.
    
    And then you can also have a path `/users/{user_id}` to get data about a specific user by some user ID.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/generate-clients.md

    <img src="/img/tutorial/generate-clients/image01.png">
    
    You can see those schemas because they were declared with the models in the app.
    
    That information is available in the app's **OpenAPI schema**, and then shown in the API docs (by Swagger UI).
    
    And that same information from the models that is included in OpenAPI is what can be used to **generate the client code**.
    
    ### Generate a TypeScript Client
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  8. docs/en/docs/alternatives.md

    But documentation is still missing. Then APISpec was created.
    
    It is a plug-in for many frameworks (and there's a plug-in for Starlette too).
    
    The way it works is that you write the definition of the schema using YAML format inside the docstring of each function handling a route.
    
    And it generates OpenAPI schemas.
    
    That's how it works in Flask, Starlette, Responder, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/response-model.md

    ### `response_model` Priority
    
    If you declare both a return type and a `response_model`, the `response_model` will take priority and be used by FastAPI.
    
    This way you can add correct type annotations to your functions even when you are returning a type different than the response model, to be used by the editor and tools like mypy. And still you can have FastAPI do the data validation, documentation, etc. using the `response_model`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/middleware.md

    * It takes each **request** that comes to your application.
    * It can then do something to that **request** or run any needed code.
    * Then it passes the **request** to be processed by the rest of the application (by some *path operation*).
    * It then takes the **response** generated by the application (by some *path operation*).
    * It can do something to that **response** or run any needed code.
    * Then it returns the **response**.
    
    !!! note "Technical Details"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
Back to top