{ "info": { "author": "Michael Williamson", "author_email": "mike@zwobble.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "Tempman: Create and clean up temporary directories\n==================================================\n\nTempman can be used to create temporary directories. These temporary\ndirectories can then be easily cleaned up by calling ``close``, or using\nthe directory as a context manager.\n\nBy using a fixed root for temporary directory, Tempman also allows\ncleanup of directories older than a specified timeout.\n\nExample\n-------\n\n::\n\n import tempman\n\n with tempman.create_temp_dir() as directory:\n assert os.path.exists(directory.path)\n assert os.path.isdir(directory.path)\n\n assert not os.path.exists(directory.path)\n\nAPI\n---\n\n``tempdir.create_temp_dir(dir=None)``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCreates a temporary directory and returns an instance of\n``TemporaryDirectory``. The directory will be deleted when the instance\nof ``TemporaryDirectory`` is closed.\n\nIf ``dir`` is set, the temporary directory is created as a sub-directory\nof ``dir``.\n\n``TemporaryDirectory``\n~~~~~~~~~~~~~~~~~~~~~~\n\nHas the following attributes:\n\n- ``path`` - path to the temporary directory\n- ``close()`` - delete the temporary directory, including any files and\n sub-directories\n\n``TemporaryDirectory`` is a context manager, so using ``with`` will also\ndelete the temporary directory.\n\n``tempdir.root(dir, timeout=None)``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCreates a factory for temporary directories, all of which will be under\nthe directory ``dir``. Returns ``Root``.\n\nIf ``timeout`` is set, any sub-directories with an age greater than\n``timeout`` seconds will be deleted on cleanup. Cleanup occurs during\n``root.create_temp_dir()``, and can also be triggered manually by\ncalling ``root.cleanup()``. The age of a sub-directory is determined by\nthe modification or access time, whichever is later. ``timeout`` can\neither be a number of seconds, or an instance of ``datetime.timedelta``.\n\n``Root``\n~~~~~~~~\n\nHas the following attributes:\n\n- ``create_temp_dir()``: creates a temporary directory in the same way\n as ``tempman.create_temp_dir()``, except that the parent directory is\n always the directory of the ``Root``. Also calls ``cleanup()``.\n\n- ``cleanup()``: if ``timeout`` is set, delete old sub-directories as\n described above.\n\nInstallation\n------------\n\n::\n\n pip install tempman", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mwilliamson/python-tempman", "keywords": "temporary temp directory directories cleanup clean", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "tempman", "package_url": "https://pypi.org/project/tempman/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tempman/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mwilliamson/python-tempman" }, "release_url": "https://pypi.org/project/tempman/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Create and clean up temporary directories", "version": "0.1.3" }, "last_serial": 1148102, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b21cd02f9e67c1ea88323fdd25b1381d", "sha256": "20ea19aeab08a5551f759de14af8e3ee803f3b1ce971efa7e536f027d1346b8b" }, "downloads": -1, "filename": "tempman-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b21cd02f9e67c1ea88323fdd25b1381d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2096, "upload_time": "2013-11-16T14:16:59", "url": "https://files.pythonhosted.org/packages/bb/19/632b4a563c4d66b4505bd72edf58bdd8f7575cba5cd80067130f867f69b8/tempman-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f90875654bb74ede7fc318598118284a", "sha256": "3ecdbedc5caf52ffb7e7f3d2beaeb4dbcae12e139def13c209a192032969bcc8" }, "downloads": -1, "filename": "tempman-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f90875654bb74ede7fc318598118284a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2251, "upload_time": "2013-11-16T14:29:12", "url": "https://files.pythonhosted.org/packages/fe/88/28436fb07f7b45e39fe21cb48a3c00a41851b5aede1eda86ab09ca669c30/tempman-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "a3748a4b58f64344e5f8faca540071fb", "sha256": "02fd4bd0e2230508a892d2ee11693956730f0bf9c00899cec229401c9e78da76" }, "downloads": -1, "filename": "tempman-0.1.3.tar.gz", "has_sig": false, "md5_digest": "a3748a4b58f64344e5f8faca540071fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2480, "upload_time": "2014-07-05T15:18:20", "url": "https://files.pythonhosted.org/packages/47/ab/4583cba3ca860665448c5ae49dad3ca5e76c93aca5d7bf01e6936f7d251f/tempman-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a3748a4b58f64344e5f8faca540071fb", "sha256": "02fd4bd0e2230508a892d2ee11693956730f0bf9c00899cec229401c9e78da76" }, "downloads": -1, "filename": "tempman-0.1.3.tar.gz", "has_sig": false, "md5_digest": "a3748a4b58f64344e5f8faca540071fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2480, "upload_time": "2014-07-05T15:18:20", "url": "https://files.pythonhosted.org/packages/47/ab/4583cba3ca860665448c5ae49dad3ca5e76c93aca5d7bf01e6936f7d251f/tempman-0.1.3.tar.gz" } ] }