--- id: asyncpg-stubs version: "0.31.3" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # asyncpg-stubs — asyncpg stubs License: permissive · Maintenance: active · Downloads: 2.4M/mo ## What it is and what it does asyncpg-stubs is a type stub package that adds precise static type information to asyncpg, the popular async PostgreSQL driver for Python. It works alongside asyncpg to enable type checkers like mypy and IDEs to understand the types of asyncpg's API, improving code completion and catching type errors at development time rather than runtime. The package follows a semantic versioning scheme where its major and minor versions track the corresponding asyncpg release—for example, asyncpg-stubs 0.25.X works with asyncpg 0.25.Y. It requires asyncpg and typing-extensions as runtime dependencies and is actively maintained across Python 3.9 through 3.14. Use it for: - Enable mypy or pyright to catch type errors in asyncpg code before runtime. - Improve IDE autocomplete and inline documentation when writing asyncpg queries. - Maintain type safety in large async database applications with strict type checking. - Provide better developer experience when working with asyncpg in typed Python projects. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type stubs for asyncpg to enable static type checking and improved IDE autocompletion when using the asyncpg PostgreSQL driver. Yes. If you use asyncpg and want static type checking, this is the standard way to get accurate types for the library. Installation is frictionless, maintenance is active, and the BSD-3-Clause license poses no restrictions. Version matching with asyncpg is straightforward via the documented semver scheme. ## Install pip install asyncpg-stubs uv add asyncpg-stubs poetry add asyncpg-stubs ## Installing asyncpg-stubs Before you install: Low friction installation with active maintenance—last release 35 days ago. Depends only on asyncpg and typing-extensions, both lightweight. Supports Python 3.9 through 3.14. License in practice: BSD-3-Clause permissive license allows use in most projects without restriction. Quickstart: pip install asyncpg-stubs import asyncpg conn = await asyncpg.connect('postgresql://user:pass@localhost/db') Requires asyncpg to be installed separately; version matching recommended (asyncpg-stubs major.minor should match asyncpg major.minor). Verify before relying: - Whether type coverage is complete for all asyncpg APIs or if gaps remain. - Performance impact of type checking with these stubs in large codebases. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags asyncpg type stubs, asyncpg type hints, postgresql async type checking, asyncpg mypy support, asyncpg static typing, asyncpg type annotations, asyncpg ide autocomplete, type-stubs, asyncpg, static-typing [View on SkillFed](https://skillfed.io/packages/asyncpg-stubs) · [View on PyPI](https://pypi.org/project/asyncpg-stubs/)