dj-inmemorystorage
A non-persistent in-memory data storage backend for Django.
What it is and what it does
dj-inmemorystorage provides a Django storage backend that keeps file data in memory rather than writing to disk. It implements Django's standard storage API, making it a drop-in replacement for testing scenarios where you want to avoid filesystem I/O. By default, each storage instance maintains its own isolated in-memory state; writes from one part of your code are not visible to another unless they share the same backend instance. You can enable persistence across instances by setting INMEMORYSTORAGE_PERSIST = True in your Django settings.
The package depends on Django and six, and is distributed as a pure-Python wheel with low install friction. However, it has been abandoned since 2020 and receives no maintenance. It was last tested against Django up to version 3.0 and Python up to 3.8, so compatibility with modern versions is unknown.
Use it for:
- Unit testing Django applications without writing temporary files to disk during test runs.
- Mocking file uploads in integration tests while keeping test data isolated between test cases.
- Developing and testing Django apps in environments where filesystem access is restricted or slow.
- Rapid prototyping of Django file-handling logic without managing temporary file cleanup.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An in-memory storage backend for Django that implements Django's storage API without persisting data to disk by default.
Yes, if your Django and Python versions fall within the supported range (Django 1.11–3.0, Python 2.7 or 3.5–3.8) and you need a lightweight in-memory storage backend for testing. The permissive BSD license and zero known vulnerabilities are favorable. However, the package is abandoned and will not receive updates for modern Django or Python versions, so it is not suitable for new projects targeting current releases.
Install
dj-inmemorystorage on PyPI
pip
pip install dj-inmemorystorageuv
uv add dj-inmemorystoragepoetry
poetry add dj-inmemorystorageInstalling dj-inmemorystorage
Before you install
Low install friction with a pure-Python wheel. However, the package is abandoned—last release was 2020-03-30, over six years ago. It remains marked Production/Stable and has no known vulnerabilities, but receives no maintenance updates.
License in practice
BSD license (permissive) places no restrictions on use, modification, or distribution in your own projects.
Quickstart
# In Django test settings:
DEFAULT_FILE_STORAGE = 'inmemorystorage.InMemoryStorage'
# Optional: enable persistence across storage instances
INMEMORYSTORAGE_PERSIST = True
Requires Django and six as runtime dependencies; version support is limited to Python 2.7 with Django 1.11, or Python 3.5–3.8 with Django 1.11–3.0.
Verify before relying
- Whether the package works with Django versions released after 3.0 or Python versions after 3.8.
- Whether the non-persistent default behavior (data not shared across storage instances) meets your test isolation needs.
- Whether the package's archived repository status means it will accept pull requests or security patches.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — Django, six |
| Maintenance | abandoned — 2,328 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 227,403/month — #9,179 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dj_inmemorystorage-2.1.0-py2.py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
django-crumDjango-CRUM stores the current request and user…
permissive · top 15,000 on PyPI
django-memoizeCaches function and method results in Django…
permissive · top 15,000 on PyPI
django-cache-memoizeA decorator that caches function results using…
copyleft · top 15,000 on PyPI
django-sortedm2mProvides a drop-in replacement for Django's…
permissive · top 15,000 on PyPI
dj-staticWraps a WSGI application to serve static files…
permissive · top 15,000 on PyPI
django-multiselectfieldAdds model and form fields to Django that let…
copyleft · top 5,000 on PyPI
djangorestframework-gisAdds geographic and GeoJSON support to Django…
permissive · top 15,000 on PyPI
django-impersonateAllows Django superusers to temporarily assume…
permissive · top 15,000 on PyPI
django-safedeleteProvides soft-delete functionality for Django…
permissive · top 5,000 on PyPI
django-netfieldsProvides Django model fields for PostgreSQL…
permissive · top 15,000 on PyPI