github.com/rednaks/django-async-orm

Bringing Async Capabilities to django ORM

Open this visualization on its own page →

Contributors

2

Lines of Code

66

From

2021-05-23

To

2021-12-05

About rednaks/django-async-orm

Django Async Orm is a Python module that extends Django's object-relational mapper with asynchronous capabilities. The project automatically patches Django models to add async-prefixed methods alongside their synchronous counterparts, allowing developers to perform database operations without blocking the event loop. It supports async iteration over querysets and provides async wrappers for common operations like template rendering, form validation, and user authentication.

The module implements a comprehensive set of async methods for Django's QuerySet and Manager APIs, covering operations such as filtering, aggregation, bulk operations, and complex queries. According to its support matrix, most common database operations have been ported to async versions, including methods like `aget`, `acreate`, `afilter`, `abulk_create`, and `aprefetch_related`. The project also includes async wrappers for template rendering and authentication functions like login and logout.

The project is actively under development and explicitly recommends against production use at this stage. Several features remain unimplemented, including async support for individual model instance operations like `asave` and `adelete`, raw querysets, foreign object lazy loading, and certain user model methods. This makes it a work-in-progress solution primarily suited for developers interested in exploring async patterns with Django or contributing to the project's development.

Share this video