Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for manager (0.19 sec)

  1. docs_src/websockets/tutorial003.py

    
    manager = ConnectionManager()
    
    
    @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()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Aug 09 13:52:19 GMT 2020
    - 2.5K bytes
    - Viewed (0)
  2. docs_src/websockets/tutorial003_py39.py

    
    manager = ConnectionManager()
    
    
    @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()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  3. fastapi/routing.py

            lifespan: Annotated[
                Optional[Lifespan[Any]],
                Doc(
                    """
                    A `Lifespan` context manager handler. This replaces `startup` and
                    `shutdown` functions with a single context manager.
    
                    Read more in the
                    [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
                    """
                ),
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  4. fastapi/concurrency.py

    @asynccontextmanager
    async def contextmanager_in_threadpool(
        cm: ContextManager[_T],
    ) -> AsyncGenerator[_T, None]:
        # blocking __exit__ from running waiting on a free thread
        # can create race conditions/deadlocks if the context manager itself
        # has its own internal pool (e.g. a database connection pool)
        # to avoid this we let __exit__ run without a capacity limit
        # since we're creating a new limiter for each call, any non-zero limit
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  5. docs_src/metadata/tutorial004.py

    from fastapi import FastAPI
    
    tags_metadata = [
        {
            "name": "users",
            "description": "Operations with users. The **login** logic is also here.",
        },
        {
            "name": "items",
            "description": "Manage items. So _fancy_ they have their own docs.",
            "externalDocs": {
                "description": "Items external docs",
                "url": "https://fastapi.tiangolo.com/",
            },
        },
    ]
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 13 11:58:06 GMT 2020
    - 693 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_metadata/test_tutorial004.py

                    "name": "users",
                    "description": "Operations with users. The **login** logic is also here.",
                },
                {
                    "name": "items",
                    "description": "Manage items. So _fancy_ they have their own docs.",
                    "externalDocs": {
                        "description": "Items external docs",
                        "url": "https://fastapi.tiangolo.com/",
                    },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. fastapi/applications.py

            ] = None,
            lifespan: Annotated[
                Optional[Lifespan[AppType]],
                Doc(
                    """
                    A `Lifespan` context manager handler. This replaces `startup` and
                    `shutdown` functions with a single context manager.
    
                    Read more in the
                    [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
                    """
                ),
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top