{ "info": { "author": "Mark Skelton", "author_email": "mark@bravasoftware.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# django-cleanup-later\n\nA quick, rough around the edges Django application to remember and remove temporary files.\n\nThe purpose of this application is to allow the user to create a temporary file (e.g. for the purpose of streaming or to allow a time limited availability)\nand automatically remove it after a given period of time.\n\nAt present this can be done automatically using the provided middleware, manually by running the **cleanup_later** management command, or by calling the ``CleanupFile.cleanup()`` function directly.\n\nIt's been developed and tested on Python 3.7 and Django 2.2 .. your mileage may vary with other configurations.\n\n## Installation\n\nInstall via pip or download the repository:\n\n```\npip install django-cleanup-later\n```\n\nAdd the app to your INSTALLED_APPS setting:\n\n```\nINSTALLED_APPS = [\n ...\n 'cleanup_later',\n ]\n```\n\nMake sure to migrate:\n\n```\nmanage.py migrate\n```\n\nAnd optionally add the middleware if you want files to be removed automatically without the need for a cron or background process:\n\n```\nMIDDLEWARE = [\n ...\n 'cleanup_later.middleware.CleanupMiddleware',\n]\n```\n\nNote that using the middleware probably isn't the most efficient approach. If your project is using a cron or celery for background processing, it's more efficient to run the cleanup from there.\n\n\n## Usage\n\nTo use the app, simply register the filename you would like to later cleanup like so:\n\n```\nfrom cleanup_later.models import CleanupFile\n\nCleanupFile.register('file_to_delete.txt')\n```\n\nBy default, files will be deleted after 10 minutes, but you can override this by specifying a ``validity`` parameter as a timedelta .. e.g.\n\n```\nCleanupFile.register('file_to_delete.txt', timedelta(minutes=30))\n```\n\nSimples!\n\n\n## Contributing\n\nPull requests are welcome if you find this library useful.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.bravasoftware.com/", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-cleanup-later", "package_url": "https://pypi.org/project/django-cleanup-later/", "platform": "", "project_url": "https://pypi.org/project/django-cleanup-later/", "project_urls": { "Homepage": "https://www.bravasoftware.com/" }, "release_url": "https://pypi.org/project/django-cleanup-later/0.1/", "requires_dist": null, "requires_python": "", "summary": "A quick, rough around the edges Django application to remember and remove temporary files.", "version": "0.1" }, "last_serial": 5623762, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9d5e216cdb392045ca0738fa62920a58", "sha256": "91fc4ce9ca193d31ff4e47f0558331bdf7e0de3b3fe80ee98f06d6b2a886380e" }, "downloads": -1, "filename": "django-cleanup-later-0.1.tar.gz", "has_sig": false, "md5_digest": "9d5e216cdb392045ca0738fa62920a58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4005, "upload_time": "2019-08-02T11:49:24", "url": "https://files.pythonhosted.org/packages/96/52/79f706736d548416531a1e98ecdfdc310979a1f0eb33f08631c05b22bbbf/django-cleanup-later-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9d5e216cdb392045ca0738fa62920a58", "sha256": "91fc4ce9ca193d31ff4e47f0558331bdf7e0de3b3fe80ee98f06d6b2a886380e" }, "downloads": -1, "filename": "django-cleanup-later-0.1.tar.gz", "has_sig": false, "md5_digest": "9d5e216cdb392045ca0738fa62920a58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4005, "upload_time": "2019-08-02T11:49:24", "url": "https://files.pythonhosted.org/packages/96/52/79f706736d548416531a1e98ecdfdc310979a1f0eb33f08631c05b22bbbf/django-cleanup-later-0.1.tar.gz" } ] }