A fully-featured dummy database backend for Django that allows running all standard Django apps without a real database
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_dummy_database-1.0.1.tar.gz.
File metadata
- Download URL: django_dummy_database-1.0.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b763bad91710baaf885fcdcf7308d4ed4147ff8e3a0d1311044319fa387a7224
|
|
| MD5 |
030369513cdec08fb40dc0afe7a86983
|
|
| BLAKE2b-256 |
681955f1d3e8d225404b98ef5a5cd69f30bba464e0fc33c5af30244aa0fb5275
|
Provenance
The following attestation bundles were made for django_dummy_database-1.0.1.tar.gz:
Publisher:
publish.yml on MagIlyasDOMA/django-dummy-database
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_dummy_database-1.0.1.tar.gz -
Subject digest:
b763bad91710baaf885fcdcf7308d4ed4147ff8e3a0d1311044319fa387a7224 - Sigstore transparency entry: 1004100929
- Sigstore integration time:
-
Permalink:
MagIlyasDOMA/django-dummy-database@62d490780072c981331875647b5b87e2ac19223f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MagIlyasDOMA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@62d490780072c981331875647b5b87e2ac19223f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file django_dummy_database-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_dummy_database-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd2d2902917c586356899dc6199dc29228665229971b6463bf139915715a87ab
|
|
| MD5 |
9c38bd9e46064414073697ccc973c2a1
|
|
| BLAKE2b-256 |
59ac128b4393e97c2197c882eb99ae0356d3e7616b5d72b5943a5290d51079de
|
Provenance
The following attestation bundles were made for django_dummy_database-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on MagIlyasDOMA/django-dummy-database
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_dummy_database-1.0.1-py3-none-any.whl -
Subject digest:
fd2d2902917c586356899dc6199dc29228665229971b6463bf139915715a87ab - Sigstore transparency entry: 1004100931
- Sigstore integration time:
-
Permalink:
MagIlyasDOMA/django-dummy-database@62d490780072c981331875647b5b87e2ac19223f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MagIlyasDOMA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@62d490780072c981331875647b5b87e2ac19223f -
Trigger Event:
workflow_dispatch
-
Statement type: