{ "info": { "author": "Piper Merriam", "author_email": "pipermerriam@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "=======================\ndjango-fallback-storage\n=======================\n\n.. image:: https://badge.fury.io/py/django-fallback-storage.png\n :target: https://badge.fury.io/py/django-fallback-storage\n\n.. image:: https://travis-ci.org/pipermerriam/django-fallback-storage.png?branch=master\n :target: https://travis-ci.org/pipermerriam/django-fallback-storage\n\n``django-fallback-storage`` allows for the use of multiple storage engines at\nthe same time. It works by iterating through the declared storage backends\nuntil one succeeds with the desired storage action.\n\nWhile usable in a production environment, this tool was primarily designed to\nhelp with development of a project. \n\nConsider a production site using the ``S3BotoStorage`` backend to store its\nstatic assets on Amazon S3 and a development environment that regularly gets\ndatabase dumps from the production environment. In order to get the media\nassociated with the database dump to work, the development environment could be\nconfigured to use the same S3 bucket. This could be problematic, as it would\nrisk making unwanted modifications to the production media.\n\nThe ``FallbackStorage`` backend provided by ``django-fallback-storage`` allows\nuse of the same production production media source in the development\nenvironment while delegating all write operations to a different storage\nbackend (such as the filesystem).\n\nThis is accomplished by wrapping multiple storage backends, and iterating\nthrough them for each request until one of them returns a successful response.\n\n\nInstallation\n------------\n\n1. Install the package::\n\n .. code-block:: bash\n \n $ pip install django-fallback-storage\n\n2. Set ``fallback_storage.storage.FallbackStorage`` as your desired storage\n backend.::\n\n .. code-block:: python\n\n # settings.py\n DEFAULT_FILE_STORAGE = \"fallback_storage.storage.FallbackStorage\"\n\n3. Declare what storage backends fallback storage should use.::\n\n .. code-block:: python\n\n # All operations will be tried first on `FileSystemStorage` and then on\n # `S3BotoStorage`.\n FALLBACK_STORAGES = (\n \"django.core.files.storage.FileSystemStorage\",\n \"storages.backends.s3boto.S3BotoStorage\",\n )\n\n\nAPI\n---\n\n``FallbackStorage`` implements all of the following backend methods.\n\n* ``_open()``\n* ``_save()``\n* ``delete()``\n* ``exists()``\n* ``listdir()``\n* ``size()``\n* ``url()``\n* ``accessed_time()``\n* ``created_time()``\n* ``modified_time()``\n* ``get_valid_name()``\n* ``get_available_name()``\n* ``path()``\n\nWhen one of these methods is called, each backend declared in\n``FALLBACK_STORAGES`` is called. The first successful response is\nreturned.\n\nAny backend which does not implement a given method will be skipped over. If\nnone of the backends implement a called method, then an ``AttributeError`` is\nraised.\n\nExceptions raised by any backend are reraised if none of the backends returns a\nsuccessful response.\n\nThe following methods behave somewhat specially.\n\n* **FallbackStorage.exists(name)**::\n\n Will return ``True`` if the file exists in *any* of the storage backends.\n\n* **FallbackStorage.listdir(path)**::\n\n Will return the set of all directories and files in all of the storage backents.\n\n* **FallbackStorage.url(name)**::\n\n When computing a url, FallbackStorage first checks if the file exists. If\n the file exists in none of the storage backends, the last backend is used to\n compute the file name.\n\n* **FallbackStorage.get_available_name(name)**::\n\n When django attempts to get an available name for the file, FallbackStorage\n checks the file name across all storage backends before returning an available\n name. As such, each file will have a unique name across all storage backends in use.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pipermerriam/django-fallback-storage", "keywords": "django-fallback-storage", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-fallback-storage", "package_url": "https://pypi.org/project/django-fallback-storage/", "platform": "", "project_url": "https://pypi.org/project/django-fallback-storage/", "project_urls": { "Homepage": "https://github.com/pipermerriam/django-fallback-storage" }, "release_url": "https://pypi.org/project/django-fallback-storage/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "Multiple Storage Engines", "version": "1.1.1" }, "last_serial": 3435224, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "006f22585f2f6f7c010f9ed1cf4efe4b", "sha256": "645ad6390a63e84f2b05a5f4a430b46a1924da3d5d23767270b9f581750888ab" }, "downloads": -1, "filename": "django_fallback_storage-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "006f22585f2f6f7c010f9ed1cf4efe4b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6923, "upload_time": "2014-12-05T15:41:04", "url": "https://files.pythonhosted.org/packages/18/c0/5d47ed30822fe6ee3be5adf35e90aff9e9efa22790634943455de3b37d0f/django_fallback_storage-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cac1f4100bede9ae23f2405d6f37284", "sha256": "ce61769dc6986d978e73c529510d7d1e719ad87f53392f3d6de0c1cf43423e85" }, "downloads": -1, "filename": "django-fallback-storage-1.0.0.tar.gz", "has_sig": false, "md5_digest": "9cac1f4100bede9ae23f2405d6f37284", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5620, "upload_time": "2014-12-05T15:40:59", "url": "https://files.pythonhosted.org/packages/db/0f/87fc8cd7a8187a845d57aa0c9ada3f5d511a32787415cf4d4710dbcab555/django-fallback-storage-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "8f87261ec8b52f51828a39d3cbf30f81", "sha256": "464a6dfa5f5e8cc69aa053647700a49229226159653197ddc024dc5b5a9a367f" }, "downloads": -1, "filename": "django_fallback_storage-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8f87261ec8b52f51828a39d3cbf30f81", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7464, "upload_time": "2017-11-10T19:39:28", "url": "https://files.pythonhosted.org/packages/91/39/a01cff6bc221a962e79e750ca6a91d2cf736583beb46a265f8feae067e5d/django_fallback_storage-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c180ec6d74eaabc39bf981fd63072f7b", "sha256": "1d83416410aeadb760c0849ca4e9db7e0d1725b7a4ef8bad08bd91c8b8151649" }, "downloads": -1, "filename": "django-fallback-storage-1.1.0.tar.gz", "has_sig": false, "md5_digest": "c180ec6d74eaabc39bf981fd63072f7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5985, "upload_time": "2017-11-10T19:39:18", "url": "https://files.pythonhosted.org/packages/f4/64/e0c0fdf6b8fd9891c32faaa399c5a2ebba35c0fa1c15cbe630c623069f00/django-fallback-storage-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "bf299c1bb33665dbb5bf1c687d8f0a2f", "sha256": "85fe7653857ed94745e98c941863322caa2dd8b662b83f69a35f7a25940f25ab" }, "downloads": -1, "filename": "django_fallback_storage-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bf299c1bb33665dbb5bf1c687d8f0a2f", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7695, "upload_time": "2017-12-21T19:07:56", "url": "https://files.pythonhosted.org/packages/f8/67/918c7c8144e9c8c7d62821f3a0eb4e0fa162d9c5a4981ee868ac2c8e7f94/django_fallback_storage-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "453cfa7c1ab187ffe7b39fb487136052", "sha256": "93571777e902f94e6fabbff8cfef5ac85850377e945bb32ed1a722722687626b" }, "downloads": -1, "filename": "django-fallback-storage-1.1.1.tar.gz", "has_sig": false, "md5_digest": "453cfa7c1ab187ffe7b39fb487136052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6193, "upload_time": "2017-12-21T19:07:55", "url": "https://files.pythonhosted.org/packages/53/34/1875fcafd5ead0033ab89ddc8ff680f27fa04aca27293cf94d7c69b8a678/django-fallback-storage-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf299c1bb33665dbb5bf1c687d8f0a2f", "sha256": "85fe7653857ed94745e98c941863322caa2dd8b662b83f69a35f7a25940f25ab" }, "downloads": -1, "filename": "django_fallback_storage-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bf299c1bb33665dbb5bf1c687d8f0a2f", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7695, "upload_time": "2017-12-21T19:07:56", "url": "https://files.pythonhosted.org/packages/f8/67/918c7c8144e9c8c7d62821f3a0eb4e0fa162d9c5a4981ee868ac2c8e7f94/django_fallback_storage-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "453cfa7c1ab187ffe7b39fb487136052", "sha256": "93571777e902f94e6fabbff8cfef5ac85850377e945bb32ed1a722722687626b" }, "downloads": -1, "filename": "django-fallback-storage-1.1.1.tar.gz", "has_sig": false, "md5_digest": "453cfa7c1ab187ffe7b39fb487136052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6193, "upload_time": "2017-12-21T19:07:55", "url": "https://files.pythonhosted.org/packages/53/34/1875fcafd5ead0033ab89ddc8ff680f27fa04aca27293cf94d7c69b8a678/django-fallback-storage-1.1.1.tar.gz" } ] }