Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 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 May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 13:52:19 GMT 2020
    - 2.5K bytes
    - Viewed (0)
  2. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  3. 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)
  4. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  5. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  6. docs/en/docs/how-to/nosql-databases-couchbase.md

    Also, Couchbase recommends not using a single `Bucket` object in multiple "<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.">thread</abbr>s", so, we can just get the bucket directly and pass it to our utility functions:
    
    ```Python hl_lines="49-53"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    !!! tip
        Some editors check for unused function parameters, and show them as errors.
    
        Using these `dependencies` in the *path operation decorator* you can make sure they are executed while avoiding editor/tooling errors.
    
        It might also help avoid confusion for new developers that see an unused parameter in your code and could think it's unnecessary.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  8. docs/en/docs/js/custom.js

    }
    
    async function getData() {
        let page = 1
        let data = []
        let dataBatch = await getDataBatch(page)
        data = data.concat(dataBatch.items)
        const totalCount = dataBatch.total_count
        while (data.length < totalCount) {
            page += 1
            dataBatch = await getDataBatch(page)
            data = data.concat(dataBatch.items)
        }
        return data
    }
    
    function setupTermynal() {
    JavaScript
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 08 17:50:56 GMT 2021
    - 6.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py

        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
        from docs_src.sql_databases.sql_app_py310.tests import test_sql_app
    
        # Ensure import side effects are re-executed
        importlib.reload(test_sql_app)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 825 bytes
    - Viewed (0)
  10. docs/en/docs/project-generation.md

    # Full Stack FastAPI Template
    
    Templates, while typically come with a specific setup, are designed to be flexible and customizable. This allows you to modify and adapt them to your project's requirements, making them an excellent starting point. 🏁
    
    You can use this template to get started, as it includes a lot of the initial set up, security, database and some API endpoints already done for you.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 21 21:12:21 GMT 2024
    - 1.8K bytes
    - Viewed (0)
Back to top