skillfed

djongo

Djongo: The Django MongoDB connector

djongo v1.3.7 82.1K downloads/30d#14,183 on PyPI1,922
Permissive license AGPL Active released

What it is and what it does

Djongo is a Django database backend that bridges Django's ORM to MongoDB by translating SQL queries into MongoDB query documents. It lets you use MongoDB as your primary database for a Django project without rewriting your models or changing your Django code—you configure it in settings.py and run migrations as normal. The package acts as a SQL-to-MongoDB transpiler, so Django's standard features like the admin interface, authentication, and sessions are meant to work out of the box.

The package depends on sqlparse for query parsing, pymongo for MongoDB communication, django itself, and pytz for timezone handling. It is maintained actively and has a low installation footprint as a pure-Python wheel. However, it carries an Alpha classification, indicating that the API and behavior may still evolve; users should expect this to be a work-in-progress integration rather than a production-hardened solution.

Use it for:

  • Migrate an existing Django project to MongoDB without rewriting models or ORM calls.
  • Use MongoDB's document model while keeping Django's admin interface and authentication system.
  • Prototype a Django application with MongoDB as the backing store to evaluate the document database approach.
  • Run Django migrations and manage schema changes through MongoDB collections using standard Django tooling.
  • Leverage Django contrib modules like sessions and auth with MongoDB as the persistence layer.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Djongo translates Django ORM queries into MongoDB queries, allowing you to use MongoDB as a Django database backend without modifying your models.

Yes, if you need to use MongoDB with Django and are comfortable with Alpha-stage software. The low install friction, active maintenance, and permissive license make it accessible. However, verify that your specific Django version and query patterns are supported, and test thoroughly in a non-production environment first—the Alpha status means edge cases and compatibility gaps may exist.

Install

djongo on PyPI

pip

pip install djongo

uv

uv add djongo

poetry

poetry add djongo

Installing djongo

Before you install

Low install friction with a pure-Python wheel. Active maintenance with a recent commit on 2026-07-18 and 1922 repository stars. Classified as Alpha, so expect ongoing development and potential API changes.

License in practice

Licensed under AGPL with permissive treatment, meaning you can use it freely but derivative works must also be open-source under compatible terms.

Quickstart

pip install djongo

# In Django settings.py:
DATABASES = {
    'default': {
        'ENGINE': 'djongo',
        'NAME': 'your-db-name',
    }
}

# Then run:
python manage.py makemigrations
python manage.py migrate

Requires Python 3.6 or above; MongoDB must be running and accessible at the configured connection details.

Verify before relying

  • Whether all Django contrib modules (admin, auth, sessions) work reliably in practice with complex queries.
  • Performance characteristics compared to native Django database backends for typical workloads.
  • Compatibility with the latest Django versions beyond what the classifiers indicate.

Package facts

License AGPL (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 4 — sqlparse, pymongo, django, pytz
Maintenance actively maintained — 640 days since the last release
Last repo commit
First released
Downloads 82,114/month — #14,183 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: djongo-1.3.7-py3-none-any.whl

Keywords: Django, Djongo, MongoDB, driver, connector

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3.6

Tags

django mongodb connectormongodb backend for djangodjango orm to mongodbsql to mongodb query translatordjango database adapter mongodb
django-integrationmongodb-adapter

More Front-Ends packages