# dj-inmemorystorage
[![image](https://travis-ci.org/waveaccounting/dj-inmemorystorage.png?branch=master)](https://travis-ci.org/waveaccounting/dj-inmemorystorage)
[![PyPI](https://img.shields.io/pypi/v/dj-inmemorystorage.svg)](https://pypi.python.org/pypi/dj-inmemorystorage)
An in-memory data storage backend for Django.
Compatible with Django's [storage
API](https://docs.djangoproject.com/en/dev/ref/files/storage/).
# Supported Versions
- 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 general, we follow [Python's supported
versions](https://devguide.python.org/#status-of-python-branches) and
[Django's supported
versions](https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django).
Any major change in version support will be released as a new major
version.
# Usage
In your test settings file, add
``` python
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.
``` python
INMEMORYSTORAGE_PERSIST = True
```
# Differences
This library is based on
[django-inmemorystorage](https://github.com/codysoyland/django-inmemorystorage)
by Cody Soyland, with
[modifications](https://github.com/SeanHayes/django-inmemorystorage)
made by Seán Hayes with support for the `url` method, with [additional
support](https://github.com/Vostopia/django-inmemorystorage) 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
Raw data
{
"_id": null,
"home_page": "https://github.com/waveaccounting/dj-inmemorystorage",
"name": "dj-inmemorystorage",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Cody Soyland, Se\u00e1n Hayes, Tore Birkeland, Nick Presta",
"author_email": "opensource@waveapps.com",
"download_url": "https://files.pythonhosted.org/packages/bb/5b/89366ae96a0213437fd40b2e76791e8adcf790eda597a879bd2595bc41a5/dj-inmemorystorage-2.1.0.tar.gz",
"platform": "",
"description": "# dj-inmemorystorage\n\n[![image](https://travis-ci.org/waveaccounting/dj-inmemorystorage.png?branch=master)](https://travis-ci.org/waveaccounting/dj-inmemorystorage)\n\n[![PyPI](https://img.shields.io/pypi/v/dj-inmemorystorage.svg)](https://pypi.python.org/pypi/dj-inmemorystorage)\n\nAn in-memory data storage backend for Django.\n\nCompatible with Django's [storage\nAPI](https://docs.djangoproject.com/en/dev/ref/files/storage/).\n\n# Supported Versions\n\n - Python 2.7 with Django 1.11\n - Python 3.5/3.6/3.7 with Django 1.11+\n - Python 3.8 with Django 2.2+\n\nIn general, we follow [Python's supported\nversions](https://devguide.python.org/#status-of-python-branches) and\n[Django's supported\nversions](https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django).\nAny major change in version support will be released as a new major\nversion.\n\n# Usage\n\nIn your test settings file, add\n\n``` python\nDEFAULT_FILE_STORAGE = 'inmemorystorage.InMemoryStorage'\n```\n\nBy default, the `InMemoryStorage` backend is non-persistant, meaning\nthat writes to it from one section of your code will not be present when\nreading from another section of your code, unless both are sharing the\nsame instance of the storage backend.\n\nIf you need your storage to persist, you can add the following to your\nsettings.\n\n``` python\nINMEMORYSTORAGE_PERSIST = True\n```\n\n# Differences\n\nThis library is based on\n[django-inmemorystorage](https://github.com/codysoyland/django-inmemorystorage)\nby Cody Soyland, with\n[modifications](https://github.com/SeanHayes/django-inmemorystorage)\nmade by Se\u00e1n Hayes with support for the `url` method, with [additional\nsupport](https://github.com/Vostopia/django-inmemorystorage) from Tore\nBirkeland for writing to the file.\n\nWave's modifications include packaging, and test modifications such that\n`python setup.py test` works. This version also bumps the version to\n`1.0.0` and renames it to dj-inmemorystorage such that it doesn't\nconflict on PyPI.\n\nThe biggest difference is that this package works with Django 1.4 now\n(previously only 1.5+). It also supports Python 2.6/2.7 with Django\n1.4+, Python 3.2/3.3/3.4 with Django 1.5+ and Python 3.5/3.6 with Django\n1.7+.\n\n# Contributing\n\n1. Ensure that you open a pull request\n2. All feature additions/bug fixes MUST include tests\n\n\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "A non-persistent in-memory data storage backend for Django.",
"version": "2.1.0",
"project_urls": {
"Homepage": "https://github.com/waveaccounting/dj-inmemorystorage"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c9cf4246ff1b9f46940a4ade01c9563410e22b032fafc8115a560907c8662b0",
"md5": "608bc83852dd90d331671d52826490b1",
"sha256": "81aa007a7cdb1899b3cd92404f656c82cd690a831b8698a43045f859d7276945"
},
"downloads": -1,
"filename": "dj_inmemorystorage-2.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "608bc83852dd90d331671d52826490b1",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6131,
"upload_time": "2020-03-30T17:49:10",
"upload_time_iso_8601": "2020-03-30T17:49:10.624355Z",
"url": "https://files.pythonhosted.org/packages/6c/9c/f4246ff1b9f46940a4ade01c9563410e22b032fafc8115a560907c8662b0/dj_inmemorystorage-2.1.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bb5b89366ae96a0213437fd40b2e76791e8adcf790eda597a879bd2595bc41a5",
"md5": "b0467d1d1c5afcf961b2cbb3272f8d1b",
"sha256": "1771801613414262803a1a1e97dafd2b7a563e78fbcbfa2b6f841c9d8e7b872a"
},
"downloads": -1,
"filename": "dj-inmemorystorage-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b0467d1d1c5afcf961b2cbb3272f8d1b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6963,
"upload_time": "2020-03-30T17:49:12",
"upload_time_iso_8601": "2020-03-30T17:49:12.045393Z",
"url": "https://files.pythonhosted.org/packages/bb/5b/89366ae96a0213437fd40b2e76791e8adcf790eda597a879bd2595bc41a5/dj-inmemorystorage-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-03-30 17:49:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "waveaccounting",
"github_project": "dj-inmemorystorage",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "dj-inmemorystorage"
}