Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Asyncio
  3. peewee-async

peewee-async

MITPythonv2.0.0

An asynchronous interface for the peewee ORM, enabling async database operations with asyncio for PostgreSQL and MySQL.

Visit WebsiteGitHubGitHub
766 stars98 forks0 contributors

What is peewee-async?

peewee-async is an asynchronous interface for the peewee ORM, enabling developers to perform database operations using Python's asyncio. It provides async versions of peewee's methods, allowing seamless integration of async queries into applications that use peewee for PostgreSQL and MySQL databases.

Target Audience

Python developers using the peewee ORM who want to incorporate asynchronous database operations into their asyncio-based applications, particularly those working with PostgreSQL or MySQL backends.

Value Proposition

It extends the familiar peewee ORM with async capabilities without requiring a rewrite of existing models, offering a smooth transition to async workflows with support for transactions and pooled connections.

Overview

Asynchronous interface for peewee ORM powered by asyncio

Use Cases

Best For

  • Adding async database queries to existing peewee-based applications
  • Building asyncio web services that need async ORM support
  • Migrating sync peewee codebases to async without major refactoring
  • Developing high-performance async applications with PostgreSQL or MySQL
  • Integrating peewee with async frameworks like FastAPI or aiohttp
  • Handling concurrent database operations in async Python projects

Not Ideal For

  • Projects using ORMs other than peewee, like SQLAlchemy or Django ORM
  • Applications that rely on synchronous database access without asyncio integration
  • Developers needing support for databases beyond PostgreSQL and MySQL, such as SQLite or Oracle
  • Teams requiring advanced ORM features not yet fully async in peewee-async, like complex joins or aggregations

Pros & Cons

Pros

Async Method Prefixes

Provides asynchronous versions of peewee methods with 'aio_' prefix, such as aio_create and aio_execute, enabling direct async calls without altering sync code, as shown in the Quickstart example.

Drop-in Compatibility

Allows seamless integration with existing peewee models; sync operations remain unchanged, and async can be enabled selectively, reducing refactoring effort.

Transaction Support

Includes asynchronous transactions, supporting complex async workflows with database consistency, which is essential for production applications.

Pooled Connections

Offers pooled database connections via classes like PooledPostgresqlDatabase, improving performance in high-concurrency async environments.

Cons

Limited Database Support

Only compatible with PostgreSQL and MySQL via specific async drivers (aiopg, psycopg3, aiomysql), excluding other databases peewee supports, such as SQLite.

Basic Async Features

The README admits 'basic operations are supported,' implying not all peewee features have async equivalents, which may restrict advanced querying or migrations.

Dependency Complexity

Requires installing specific async backends (e.g., peewee-async[postgresql]), adding dependencies and potential version conflicts, especially with evolving driver libraries.

Documentation Fragmentation

Has a deprecated documentation link, and reliance on external docs for drivers can make setup and troubleshooting more challenging for new users.

Frequently Asked Questions

Quick Stats

Stars766
Forks98
Contributors0
Open Issues7
Last commit5 days ago
CreatedSince 2014

Tags

#orm#database#asyncio#async-orm#python#postgresql#mysql#async-database

Built With

p
psycopg
a
asyncio
a
aiomysql
P
Python
D
Docker
p
pytest

Links & Resources

Website

Included in

Asyncio5.0k
Auto-fetched 1 day ago

Related Projects

redis-pyredis-py

Redis Python client

Stars13,524
Forks2,673
Last commit1 day ago
PyMongoPyMongo

PyMongo - the Official MongoDB Python driver

Stars4,341
Forks1,141
Last commit5 days ago
DatabasesDatabases

Async database support for Python. 🗄

Stars4,006
Forks261
Last commit1 year ago
Prisma Client PythonPrisma Client Python

Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use

Stars2,106
Forks94
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub