Skip to main content

A non-persistent in-memory data storage backend for Django.

Project description

dj-inmemorystorage

https://travis-ci.org/waveaccounting/dj-inmemorystorage.png?branch=master

An in-memory data storage backend for Django.

Compatible with Django’s storage API.

Supported Versions

Python 2.6/2.7 with Django 1.4+ Python 3.2/3.3/3.4 with Django 1.5+ Python 3.5/3.6 with Django 1.7+

Usage

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

Differences

This library is based on django-inmemorystorage by Cody Soyland, with modifications 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+.

Contributing

  1. Ensure that you open a pull request

  2. All feature additions/bug fixes MUST include tests

Project details


Download files

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

Source Distribution

dj-inmemorystorage-1.4.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

dj_inmemorystorage-1.4.1-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dj-inmemorystorage-1.4.1.tar.gz.

File metadata

File hashes

Hashes for dj-inmemorystorage-1.4.1.tar.gz
Algorithm Hash digest
SHA256 fa921269b83ffc762411e36d446fa07b602a4ad74632ae1819844d32e6fb12bd
MD5 b480e768233e1c213b442632ad9f4120
BLAKE2b-256 bd1def11abc2ff0f102d0f54efdc67eb02b210499201a17c1e2215a8b058888a

See more details on using hashes here.

File details

Details for the file dj_inmemorystorage-1.4.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dj_inmemorystorage-1.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2b587f9320ea26f9ed1c62fefaf05c817735eda989d6439072b73d1b59b1c591
MD5 77a279a1443c7b48a86a4c738140cd24
BLAKE2b-256 918937483d7d7d667a16c35f98cd71d350b838714cde42fc7f3bd1c45bdd66dd

See more details on using hashes here.

Supported by

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