asyncpg-stubs
asyncpg stubs
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires asyncpg to be installed separately; version matching recommended (asyncpg-stubs major.minor should match asyncpg major.minor).
- Low friction installation with active maintenance—last release 35 days ago.
- Depends only on asyncpg and typing-extensions, both lightweight.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows use in most projects without restriction.
last release 2026-07-10 (35 days) · last repo commit 2026-08-14 · 50 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,447,804 downloads/mo, #3,061 on PyPI
Alternatives
Verify before relying
pip install asyncpg-stubs
import asyncpg
conn = await asyncpg.connect('postgresql://user:pass@localhost/db')- Whether type coverage is complete for all asyncpg APIs or if gaps remain.
- Performance impact of type checking with these stubs in large codebases.
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 on this page. Verify before relying on it.
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
asyncpg-stubs on PyPI
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.
Requires asyncpg to be installed separately; version matching recommended (asyncpg-stubs major.minor should match asyncpg major.minor).
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')
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 the current Python release <4.0,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesasyncpgtyping-extensions |
| Maintenance | Actively maintained 35 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,447,804 / month, #3,061 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Typing :: Typed |
Evidence: asyncpg_stubs-0.31.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “asyncpg type stubs”
- asyncpg-stubsProvides type stubs for asyncpg to enable static type checking and…
- asyncpg-trekManages database migrations for asyncpg by executing raw SQL or…
- buildpgbuildpg constructs PostgreSQL prepared statements with named…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also types-pika · asyncpg · pika-stubs · opentelemetry-instrumentation-asyncpg · sqlalchemy-stubs · databases · langchain-postgres · sqlalchemy-rdsiam · motor-types · kubernetes-stubs-elephant-fork