{ "info": { "author": "Jonathan Lange", "author_email": "jml@mumak.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing" ], "description": "===========\r\n treeshape\r\n===========\r\n\r\ntreeshape allows you to quickly make file and directory structures on disk.\r\n\r\nFor example::\r\n\r\n from treeshape import (\r\n CONTENT,\r\n make_tree,\r\n PERMISSIONS,\r\n )\r\n\r\n make_tree('.', {\r\n 'logs/': None,\r\n 'README': {CONTENT: \"A simple directory layout\\n\"},\r\n 'data/input': {CONTENT: \"All of our input data\\n\"},\r\n 'bin/script': {CONTENT: \"#!/bin/sh\\necho 'Hello'\\n\", PERMISSIONS: 0755},\r\n })\r\n\r\nWill create a directory structure that looks like this::\r\n\r\n $ find .\r\n .\r\n ./logs\r\n ./data\r\n ./data/input\r\n ./README\r\n $ cat README\r\n A simple directory layout\r\n $ cat data/input\r\n All of our input data\r\n\r\nThis is particularly useful for tests that touch the disk.\r\n\r\nIf being explicit isn't really your thing, you can also create the same\r\ndirectory structure from a rough specification::\r\n\r\n from treeshape import (\r\n from_rough_spec,\r\n make_tree,\r\n )\r\n\r\n make_tree('.', from_rough_spec([\r\n 'logs/',\r\n ('README', \"A simple directory layout\\n\"),\r\n ('data/input', \"All of our input data\\n\"),\r\n ('bin/script', \"#!/bin/sh\\necho 'Hello'\\n\", 0755),\r\n ]))\r\n\r\n\r\nThis is also provided as a ``Fixture`` (see python-fixtures_). Thus, if you\r\nare using testtools_, then you can also do this during your tests::\r\n\r\n def test_a_thing(self):\r\n self.useFixture(FileTree(from_rough_spec([\r\n 'logs/',\r\n ('README', \"A simple directory layout\\n\"),\r\n ('data/input', \"All of our input data\\n\"),\r\n ])))\r\n # your test here\r\n\r\n\r\n.. _python-fixtures: http://pypi.python.org/pypi/fixtures\r\n.. _testtools: http://pypi.python.org/pypi/testtools", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "treeshape", "package_url": "https://pypi.org/project/treeshape/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/treeshape/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/treeshape/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Quickly make files and directory structures.", "version": "0.2.1" }, "last_serial": 747635, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "72ff8084ea281720a6713a74e347b8ca", "sha256": "7c5706d4c754a9d8b0514565711cb5d5e3dd1d2cf9d64c861ec891adb6b7c02d" }, "downloads": -1, "filename": "treeshape-0.1.0.tar.gz", "has_sig": true, "md5_digest": "72ff8084ea281720a6713a74e347b8ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4250, "upload_time": "2012-07-23T20:55:51", "url": "https://files.pythonhosted.org/packages/80/df/df6a3979f50abe370c6097de7ea256697e38929f6743c7964af04eebbdc3/treeshape-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3b5d6778e147c411376815264ffa073c", "sha256": "8b34a36230d86f5c7043b52a9d258662b82d8df00c52abea07b923d3e999191e" }, "downloads": -1, "filename": "treeshape-0.2.0.tar.gz", "has_sig": true, "md5_digest": "3b5d6778e147c411376815264ffa073c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9420, "upload_time": "2012-08-10T16:38:04", "url": "https://files.pythonhosted.org/packages/5e/0a/fc928da8b3ad0475c611abc02612660a58671dcd660416698b88b4e7d51b/treeshape-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "950872f6a062bb07e7fa58abbf93f6c4", "sha256": "5afaf99c277e35e1f18d75af8f6d35c089353302dada35de51d9a1869377a0e8" }, "downloads": -1, "filename": "treeshape-0.2.1.tar.gz", "has_sig": false, "md5_digest": "950872f6a062bb07e7fa58abbf93f6c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9513, "upload_time": "2012-09-03T15:09:04", "url": "https://files.pythonhosted.org/packages/b5/44/9d3b3a60c7e65b062ab58927bd0a20faf038888783e94bd77992304cede2/treeshape-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "950872f6a062bb07e7fa58abbf93f6c4", "sha256": "5afaf99c277e35e1f18d75af8f6d35c089353302dada35de51d9a1869377a0e8" }, "downloads": -1, "filename": "treeshape-0.2.1.tar.gz", "has_sig": false, "md5_digest": "950872f6a062bb07e7fa58abbf93f6c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9513, "upload_time": "2012-09-03T15:09:04", "url": "https://files.pythonhosted.org/packages/b5/44/9d3b3a60c7e65b062ab58927bd0a20faf038888783e94bd77992304cede2/treeshape-0.2.1.tar.gz" } ] }