Skip to main content

A fully-featured dummy database backend for Django that allows running all standard Django apps without a real database

Reason this release was yanked:

Critical errors

Project description

Django Dummy Database

A fully-featured dummy database backend for Django that allows running all standard Django apps (admin, auth, contenttypes, etc.) without a real database.

Features

  • 🚀 Run Django with all standard apps - no database required
  • 💾 In-memory storage - data persists during runtime
  • 🔄 Full transaction support simulation
  • 📊 Works with migrations - creates tables in memory
  • 🎯 Compatible with Django 3.2+
  • 🛡️ All database exceptions properly defined
  • 🔧 No configuration changes needed - just swap the database backend

Installation

pip install django-dummy-database

Usage

Simply change your DATABASES setting in settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django_dummy_database',
        'NAME': 'dummy_db',
    }
}

That's it! You can keep all your standard Django apps:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # your apps...
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

How It Works

The backend creates an in-memory storage that:

  • Initializes all system tables (django_content_type, auth_user, etc.)
  • Simulates SQL queries and returns appropriate results
  • Maintains sequences for auto-increment fields
  • Supports transactions, savepoints, and all standard database operations
  • Handles migrations by creating tables in memory

Use Cases

  • Development: Work without setting up a real database
  • Testing: Run tests faster without database overhead
  • CI/CD: Simplify continuous integration pipelines
  • Demos: Create portable demo applications
  • Static Sites: Build Django sites that don't need persistent storage

Requirements

  • Python 3.8+
  • Django 3.2+

License

MIT License - see LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_dummy_database-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_dummy_database-1.0.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file django_dummy_database-1.0.0.tar.gz.

File metadata

  • Download URL: django_dummy_database-1.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_dummy_database-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6ec0bfbcc58bfd563637665ac8843be04460672d9340272f8aeb4d40aa476d9a
MD5 d3056a22dd4c4043bfeff650d8012069
BLAKE2b-256 115399ec311e13dc1b5bbcbc5eae7d56a8bd508300167fffab2e64e0de8a502b

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_dummy_database-1.0.0.tar.gz:

Publisher: publish.yml on MagIlyasDOMA/django-dummy-database

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_dummy_database-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_dummy_database-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4f06c139ce015df4b84130b41854b9194ee376576e78ec50bbbf3e85d826d19
MD5 8a57c8117e8c082b9329a81fd1e3e33b
BLAKE2b-256 76b286a9b3eb5ddf47f39d1646eb4214b4973cca0196e9ce99fa129a1ee68c9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_dummy_database-1.0.0-py3-none-any.whl:

Publisher: publish.yml on MagIlyasDOMA/django-dummy-database

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page