4 Django packages that add support for 3rd party databases or database specific features

Use Database URLs in your Django Application.


Extensions to Django for use with MySQL/MariaDB


  • QuerySet extensions:
    • 'Smart' iteration - chunked pagination across a large queryset
    • approx_count for quick estimates of count()
    • Query hints
    • Quick pt-visual-explain of the underlying query
  • Model fields:
    • MariaDB Dynamic Columns for storing dictionaries
    • Comma-separated fields for storing lists and sets
    • 'Missing' fields: differently sized BinaryField/TextField classes, BooleanFields represented by BIT(1)
  • ORM expressions for over 20 MySQL-specific functions
  • A new cache backend that makes use of MySQL's upsert statement and does compression
  • Status variable inspection and utility methods
  • Named locks for easy locking of e.g. external resources
  • Table lock manager for hard to pull off data migrations
django mariadb mysql python



Django-postgres-fuzzycount - Python


Fast / fuzzy PostgreSQL counts for Django

from django.db import models
from fuzzycount import FuzzyCountManager

class BigData(models.Model):

    big = models.BooleanField(default=True)
    data = models.TextField()

    objects = FuzzyCountManager()

BigData.objects.count()  # Uses fuzzycount
BigData.objects.filter(id__gt=9000).count()  # Doesn't use fuzzycount


Postgres Connection Pooling for Django, powered by SQLAlchemy.

import dj_database_url

DATABASES = {'default': dj_database_url.config(engine='django_postgrespool')}



Djongo - Python


Django and MongoDB database connector


  • Use Django Admin GUI to access MongoDB.
  • Embedded Model.
  • Embedded Array.
  • Embedded Form Fields.
    'default': {
        'ENGINE': 'djongo',
        'NAME': 'your-db-name',
        'CLIENT': {
           'host': 'your-db-host',
django mongodb nosql nosql-databases pymongo relational-databases sql