Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for AsyncIO (0.04 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial007.py

    import asyncio
    from contextlib import asynccontextmanager
    from unittest.mock import Mock, patch
    
    from docs_src.dependencies.tutorial007_py39 import get_db
    
    
    def test_get_db():  # Just for coverage
        async def test_async_gen():
            cm = asynccontextmanager(get_db)
            async with cm() as db_session:
                return db_session
    
        dbsession_moock = Mock()
    
        with patch(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 642 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_params/test_tutorial003b.py

    import asyncio
    
    from fastapi.testclient import TestClient
    
    from docs_src.path_params.tutorial003b_py39 import app, read_users2
    
    client = TestClient(app)
    
    
    def test_get_users():
        response = client.get("/users")
        assert response.status_code == 200, response.text
        assert response.json() == ["Rick", "Morty"]
    
    
    def test_read_users2():  # Just for coverage
        assert asyncio.run(read_users2()) == ["Bean", "Elfo"]
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  3. pyproject.toml

        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development",
        "Typing :: Typed",
        "Development Status :: 4 - Beta",
        "Environment :: Web Environment",
        "Framework :: AsyncIO",
        "Framework :: FastAPI",
        "Framework :: Pydantic",
        "Framework :: Pydantic :: 2",
        "Intended Audience :: Developers",
        "Programming Language :: Python :: 3 :: Only",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  4. fastapi/routing.py

    def websocket_session(
        func: Callable[[WebSocket], Awaitable[None]],
    ) -> ASGIApp:
        """
        Takes a coroutine `func(session)`, and returns an ASGI application.
        """
        # assert asyncio.iscoroutinefunction(func), "WebSocket endpoints must be async"
    
        async def app(scope: Scope, receive: Receive, send: Send) -> None:
            session = WebSocket(scope, receive=receive, send=send)
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  5. docs/en/docs/release-notes.md

    It upgrades the version of Starlette to `0.15.0`, now based on [AnyIO](https://anyio.readthedocs.io/en/stable/), and the internal async components in **FastAPI** are now based on AnyIO as well, making it compatible with both **asyncio** and **Trio**.
    
    You can read the docs about running [FastAPI with Trio using Hypercorn](https://fastapi.tiangolo.com/deployment/manually/#hypercorn-with-trio).
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top