rednaks/django-async-orm

Created Jan 27, 2022 · View the rednaks/django-async-orm repository page

Bringing Async Capabilities to django ORM

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

2

Lines of Code

66

From

May 23, 2021

To

Dec 5, 2021

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