A non-persistent in-memory data storage backend for Django.
An in-memory data storage backend for Django.
Compatible with Django's storage API.
- Python 2.7 with Django 1.11
- Python 3.5/3.6/3.7 with Django 1.11+
- Python 3.8 with Django 2.2+
In your test settings file, add
DEFAULT_FILE_STORAGE = 'inmemorystorage.InMemoryStorage'
By default, the
InMemoryStorage backend is non-persistant, meaning
that writes to it from one section of your code will not be present when
reading from another section of your code, unless both are sharing the
same instance of the storage backend.
If you need your storage to persist, you can add the following to your settings.
INMEMORYSTORAGE_PERSIST = True
This library is based on
by Cody Soyland, with
made by Seán Hayes with support for the
url method, with additional
support from Tore
Birkeland for writing to the file.
Wave's modifications include packaging, and test modifications such that
python setup.py test works. This version also bumps the version to
1.0.0 and renames it to dj-inmemorystorage such that it doesn't
conflict on PyPI.
The biggest difference is that this package works with Django 1.4 now (previously only 1.5+). It also supports Python 2.6/2.7 with Django 1.4+, Python 3.2/3.3/3.4 with Django 1.5+ and Python 3.5/3.6 with Django 1.7+.
- Ensure that you open a pull request
- All feature additions/bug fixes MUST include tests
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size dj_inmemorystorage-2.1.0-py2.py3-none-any.whl (6.1 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size dj-inmemorystorage-2.1.0.tar.gz (7.0 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for dj_inmemorystorage-2.1.0-py2.py3-none-any.whl