Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 276 for wouldn (0.52 sec)

  1. docs/en/docs/benchmarks.md

    * **Uvicorn**:
        * Will have the best performance, as it doesn't have much extra code apart from the server itself.
        * You wouldn't write an application in Uvicorn directly. That would mean that your code would have to include more or less, at least, all the code provided by Starlette (or **FastAPI**). And if you did that, your final application would have the same overhead as having used a framework and minimizing your app code and bugs.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  2. docs/en/docs/alternatives.md

    The way you use it is very simple. For example, to do a `GET` request, you would write:
    
    ```Python
    response = requests.get("http://example.com/some/url")
    ```
    
    The FastAPI counterpart API *path operation* could look like:
    
    ```Python hl_lines="1"
    @app.get("/some/url")
    def read_url():
        return {"message": "Hello World"}
    ```
    
    See the similarities in `requests.get(...)` and `@app.get(...)`.
    
    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)
  3. docs/en/docs/deployment/concepts.md

    This Manager Process would probably be the one listening on the **port** in the IP. And it would transmit all the communication to the worker processes.
    
    Those worker processes would be the ones running your application, they would perform the main computations to receive a **request** and return a **response**, and they would load anything you put in variables in RAM.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 18K bytes
    - Viewed (0)
  4. 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!}
    ```
    
    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)
  5. docs/en/docs/advanced/generate-clients.md

    </div>
    
    #### Generate Client Code
    
    To generate the client code you can use the command line application `openapi-ts` that would now be installed.
    
    Because it is installed in the local project, you probably wouldn't be able to call that command directly, but you would put it on your `package.json` file.
    
    It could look like this:
    
    ```JSON  hl_lines="7"
    {
      "name": "frontend-app",
      "version": "1.0.0",
      "description": "",
    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)
  6. docs/en/docs/async.md

    You could have turns as in the burgers example, first the living room, then the kitchen, but as you are not waiting 🕙 for anything, just cleaning and cleaning, the turns wouldn't affect anything.
    
    It would take the same amount of time to finish with or without turns (concurrency) and you would have done the same amount of work.
    
    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)
  7. docs/en/docs/advanced/behind-a-proxy.md

    So, the frontend (that runs in the browser) would try to reach `/openapi.json` and wouldn't be able to get the OpenAPI schema.
    
    Because we have a proxy with a path prefix of `/api/v1` for our app, the frontend needs to fetch the OpenAPI schema at `/api/v1/openapi.json`.
    
    ```mermaid
    graph LR
    
    browser("Browser")
    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)
  8. docs/en/docs/tutorial/security/simple-oauth2.md

        `OAuth2PasswordBearer` makes **FastAPI** know that it is a security scheme. So it is added that way to OpenAPI.
    
        But `OAuth2PasswordRequestForm` is just a class dependency that you could have written yourself, or you could have declared `Form` parameters directly.
    
        But as it's a common use case, it is provided by **FastAPI** directly, just to make it easier.
    
    ### Use the form data
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/bigger-applications.md

    If we had imported one after the other, like:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    the `router` from `users` would overwrite the one from `items` and we wouldn't be able to use them at the same time.
    
    So, to be able to use both of them in the same file, we import the submodules directly:
    
    ```Python hl_lines="5" title="app/main.py"
    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)
  10. docs/en/docs/deployment/docker.md

    This is what you would want to do in **most cases**, for example:
    
    * Using **Kubernetes** or similar tools
    * When running on a **Raspberry Pi**
    * Using a cloud service that would run a container image for you, etc.
    
    ### Package Requirements
    
    You would normally have the **package requirements** for your application in some file.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 34K bytes
    - Viewed (0)
Back to top