Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for whale (0.16 sec)

  1. docs_src/websockets/tutorial003.py

    @app.get("/")
    async def get():
        return HTMLResponse(html)
    
    
    @app.websocket("/ws/{client_id}")
    async def websocket_endpoint(websocket: WebSocket, client_id: int):
        await manager.connect(websocket)
        try:
            while True:
                data = await websocket.receive_text()
                await manager.send_personal_message(f"You wrote: {data}", websocket)
                await manager.broadcast(f"Client #{client_id} says: {data}")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 13:52:19 GMT 2020
    - 2.5K bytes
    - Viewed (0)
  2. docs/en/docs/alternatives.md

    It would actually be common to use Requests *inside* of a FastAPI application.
    
    But still, FastAPI got quite some inspiration from Requests.
    
    **Requests** is a library to *interact* with APIs (as a client), while **FastAPI** is a library to *build* APIs (as a server).
    
    They are, more or less, at opposite ends, complementing each other.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  3. docs_src/websockets/tutorial002_an_py310.py

    async def websocket_endpoint(
        *,
        websocket: WebSocket,
        item_id: str,
        q: int | None = None,
        cookie_or_token: Annotated[str, Depends(get_cookie_or_token)],
    ):
        await websocket.accept()
        while True:
            data = await websocket.receive_text()
            await websocket.send_text(
                f"Session cookie or query token value is: {cookie_or_token}"
            )
            if q is not None:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/nosql-databases.md

    , πŸ—„ πŸ‘ 🚫 βš™οΈ πŸ‘ `Bucket` 🎚 πŸ’— "<abbr title="A sequence of code being executed by the program, while at the same time, or at intervals, there can be others being executed too.">🧡</abbr>β“‚",, πŸ‘₯ πŸ’ͺ 🀚 πŸ₯‘ πŸ”— &amp; πŸšΆβ€β™€οΈ ⚫️ πŸ‘† πŸš™ πŸ”’:
    
    ```Python hl_lines="49-53"
    {!../../../docs_src/nosql_databases/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/path-params.md

    !!! check
        So, with the same Python type declaration, **FastAPI** gives you data validation.
    
        Notice that the error also clearly states exactly the point where the validation didn't pass.
    
        This is incredibly helpful while developing and debugging code that interacts with your API.
    
    ## Documentation
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/first-steps.md

    ```
    https://example.com/items/foo
    ```
    
    ...the path would be:
    
    ```
    /items/foo
    ```
    
    !!! info
        A "path" is also commonly called an "endpoint" or a "route".
    
    While building an API, the "path" is the main way to separate "concerns" and "resources".
    
    #### Operation
    
    "Operation" here refers to one of the HTTP "methods".
    
    One of:
    
    * `POST`
    * `GET`
    * `PUT`
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/behind-a-proxy.md

    and then it won't include it in the OpenAPI schema.
    
    ## Mounting a sub-application
    
    If you need to mount a sub-application (as described in [Sub Applications - Mounts](sub-applications.md){.internal-link target=_blank}) while also using a proxy with `root_path`, you can do it normally, as you would expect.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  8. fastapi/security/oauth2.py

        client to send the form field `grant_type` with the value `"password"`, which
        is required in the OAuth2 specification (it seems that for no particular reason),
        while for `OAuth2PasswordRequestForm` `grant_type` is optional.
    
        Read more about it in the
        [FastAPI docs for Simple OAuth2 with Password and Bearer](https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/).
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  9. docs/en/docs/deployment/concepts.md

    * A particular program while it is **running** on the operating system, using the CPU, and storing things on memory. This is also called a **process**.
    
    ### What is a Process
    
    The word **process** is normally used in a more specific way, only referring to the thing that is running in the operating system (like in the last point above):
    
    * A particular program while it is **running** on the operating system.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/dependencies/global-dependencies.md

    # Global Dependencies
    
    For some types of applications you might want to add dependencies to the whole application.
    
    Similar to the way you can [add `dependencies` to the *path operation decorators*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, you can add them to the `FastAPI` application.
    
    In that case, they will be applied to all the *path operations* in the application:
    
    === "Python 3.9+"
    
        ```Python hl_lines="16"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top