{ "info": { "author": "Ecometrica", "author_email": "info@ecometrica.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries" ], "description": "``django-hashedfilenamestorage``\n================================\n\nA Django storage backend that names files by hash value.\n\nBy default, ``django.core.files.storage.FileSystemStorage`` deals with\nconflicting filenames by appending an underscore to the file. For\ninstance, if you try to create ``hello.txt`` when it already exists,\nit will rename it as ``hello_.txt``.\n\n``django-hashedfilenamestorage`` creates hashed filenames, so if you\ntry to create ``hello.txt`` with the content ``Hello world!``, it will\nsave it as ``d3486ae9136e7856bc42212385ea797094475802.txt``. Directory\nnames and extensions are preserved, only the root filename is\nchanged. This reduces the number of duplicates stored in the\nunderlying backend, and implies that these files can be served from a\nstatic cache that never expires.\n\nInstalling\n----------\n\nThe easiest way to install ``django-hashedfilenamestorage`` is to use\n**pip**::\n\n pip install django-hashedfilenamestorage\n\n\nQuick Start\n-----------\n\nIn your Django ``settings`` file:\n\n* Set ``DEFAULT_FILE_STORAGE`` to\n ``'django_hashedfilenamestorage.storage.HashedFilenameFileSystemStorage'``\n\nThis gives you hashed filenames, backed on Django's\n``FileSystemStorage`` storage class.\n\n\n``HashedFilenameMetaStorage``\n-----------------------------\n\nYou can define a new underlying storage class by using\n``HashedFilenameMetaStorage`` to wrap it::\n\n from django.core.files.storage import get_storage_class\n\n from django_hashedfilenamestorage.storage import HashedFilenameMetaStorage\n\n HashedFilenameMyStorage = HashedFilenameMetaStorage(\n storage_class=get_storage_class('myapp.storage.MyStorage'),\n )\n\n\nHashing algorithm\n-----------------\n\nHashedFilenameMetaStorage is meant to generate duplicate filenames for\nfiles with identical contents. To do this, it reads the contents of\nthe file and generates a SHA-1 hash of them.\n\nFilenames have their extensions preserved, so it is possible to have\nduplicate contents on the filesystem, but it is important to help\nserve files with their proper content types.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ecometrica/django-hashedfilenamestorage/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "livingbio-django-hashedfilenamestorage", "package_url": "https://pypi.org/project/livingbio-django-hashedfilenamestorage/", "platform": "", "project_url": "https://pypi.org/project/livingbio-django-hashedfilenamestorage/", "project_urls": { "Homepage": "http://github.com/ecometrica/django-hashedfilenamestorage/" }, "release_url": "https://pypi.org/project/livingbio-django-hashedfilenamestorage/2.1/", "requires_dist": null, "requires_python": "", "summary": "A Django storage backend that names files by hash value.", "version": "2.1" }, "last_serial": 3423863, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "95b81115404e9759ad973be452a69b5c", "sha256": "f225c2326539881ea2fd1c3091d1e403d3ed861b8691b482407db2e2c4d4c840" }, "downloads": -1, "filename": "livingbio-django-hashedfilenamestorage-0.1.tar.gz", "has_sig": false, "md5_digest": "95b81115404e9759ad973be452a69b5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4062, "upload_time": "2017-12-09T09:26:44", "url": "https://files.pythonhosted.org/packages/0b/c7/75bfd5a4248650a3982fc60dd94466250a15a505525a68a0345205907e50/livingbio-django-hashedfilenamestorage-0.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "becb1d5581ce7cfe31eaa0a4feb61379", "sha256": "8afc53ff23646deb2687c7b5a4d1da9b189d3c65a4c161fe4a7101a3c6776455" }, "downloads": -1, "filename": "livingbio-django-hashedfilenamestorage-2.0.tar.gz", "has_sig": false, "md5_digest": "becb1d5581ce7cfe31eaa0a4feb61379", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4098, "upload_time": "2017-12-17T23:39:36", "url": "https://files.pythonhosted.org/packages/a1/48/b853f2ed16e0b9e3f15993a85ff649a66baf658c600efa951c116fc83ef0/livingbio-django-hashedfilenamestorage-2.0.tar.gz" } ], "2.1": [ { "comment_text": "", "digests": { "md5": "c1e5cb21e189eb1bc390a76f0818358e", "sha256": "48ad7b59035878009d0c9d81deff7df46478c38f36fa26e93ea8f252094b64e4" }, "downloads": -1, "filename": "livingbio-django-hashedfilenamestorage-2.1.tar.gz", "has_sig": false, "md5_digest": "c1e5cb21e189eb1bc390a76f0818358e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4106, "upload_time": "2017-12-17T23:40:57", "url": "https://files.pythonhosted.org/packages/14/3c/4309099976f7b80c9dab351d2bc3496974ae939e71038c9cad87229ea31d/livingbio-django-hashedfilenamestorage-2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c1e5cb21e189eb1bc390a76f0818358e", "sha256": "48ad7b59035878009d0c9d81deff7df46478c38f36fa26e93ea8f252094b64e4" }, "downloads": -1, "filename": "livingbio-django-hashedfilenamestorage-2.1.tar.gz", "has_sig": false, "md5_digest": "c1e5cb21e189eb1bc390a76f0818358e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4106, "upload_time": "2017-12-17T23:40:57", "url": "https://files.pythonhosted.org/packages/14/3c/4309099976f7b80c9dab351d2bc3496974ae939e71038c9cad87229ea31d/livingbio-django-hashedfilenamestorage-2.1.tar.gz" } ] }