Skip to main content

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.

Metadata

Release files for django-dummy-database 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-dummy-database 1.0.1
File Size Uploaded
django_dummy_database-1.0.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-dummy-database 1.0.1
File Interpreter ABI Platform
django_dummy_database-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 kB

Release files / django_dummy_database-1.0.1.tar.gz

Download URL django_dummy_database-1.0.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b763bad91710baaf885fcdcf7308d4ed4147ff8e3a0d1311044319fa387a7224
BLAKE2b-256 checksum
How to use checksums
681955f1d3e8d225404b98ef5a5cd69f30bba464e0fc33c5af30244aa0fb5275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 27, 2026.

Transparency log

Release files / django_dummy_database-1.0.1-py3-none-any.whl

Download URL django_dummy_database-1.0.1-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd2d2902917c586356899dc6199dc29228665229971b6463bf139915715a87ab
BLAKE2b-256 checksum
How to use checksums
59ac128b4393e97c2197c882eb99ae0356d3e7616b5d72b5943a5290d51079de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page