{ "info": { "author": "Hong-She Liang", "author_email": "starofrainnight@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "==========\npaunch-dir\n==========\n\n.. image:: https://img.shields.io/pypi/v/paunch-dir.svg\n :target: https://pypi.python.org/pypi/paunch-dir\n\n.. image:: https://travis-ci.org/starofrainnight/paunch-dir.svg\n :target: https://travis-ci.org/starofrainnight/paunch-dir.html\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/starofrainnight/paunch-dir?svg=true\n :target: https://ci.appveyor.com/project/starofrainnight/paunch-dir\n\nAn algorithm to generate a path from file name which directory structure could\nstore mass files\n\nYou could generated directory structure (from a uuid file name) just like:\n\n::\n\n \u251c\u2500\u2500 02\n \u2502 \u2514\u2500\u2500 9d\n \u2502 \u2514\u2500\u2500 5b\n \u2502 \u2514\u2500\u2500 cb7c89776a923d6050ff9cffcf1333284f.jpg\n | # Original file name : 029d5bcb7c89776a923d6050ff9cffcf1333284f.jpg\n \u251c\u2500\u2500 03\n \u2502 \u251c\u2500\u2500 2b\n \u2502 \u2502 \u2514\u2500\u2500 f9\n \u2502 \u2502 \u2514\u2500\u2500 7cdb028c51ec56ec53cbe34946525a3e37.jpg\n \u2502 \u2514\u2500\u2500 f9\n \u2502 \u2514\u2500\u2500 4d\n \u2502 \u2514\u2500\u2500 9458a9ee5396911268b0da6b3552f154e8.jpg\n ...\n\nIt's ineffectively for file system parse large number files in same directory.\nAnd there have limit files that could be sotre in a directory depends on\ndifferent file system format. You will see it's very slow if you open a\ndirectory with hundreds of thousands files in file browser. Separate them into\ndifferent directory with specific algorithm that could greatly improve\nefficiency when parse those files.\n\nUsage\n--------\n\n\n.. code-block:: python\n\n from paunchdir import PaunchDir\n\n # Generate path from uuid file name\n pdir = PaunchDir(\".\")\n print(pdir.compose('032bf97cdb028c51ec56ec53cbe34946525a3e37.jpg'))\n # ==> \"./03/2b/f9/7cdb028c51ec56ec53cbe34946525a3e37.jpg\"\n\n # Decompose uuid file name from a path\n print(pdir.decompose(\"./03/2b/f9/7cdb028c51ec56ec53cbe34946525a3e37.jpg\"))\n # ==> \"032bf97cdb028c51ec56ec53cbe34946525a3e37.jpg\"\n\n # Generate path from uuid file name with one level (Just like what the git\n # store it's objects)\n pdir = PaunchDir(\"./objects\", levels=1)\n print(pdir.compose('032bf97cdb028c51ec56ec53cbe34946525a3e37'))\n # ==> \"./03/2bf97cdb028c51ec56ec53cbe34946525a3e37\"\n\nLicense\n-------\n\nThis library license under Apache-2.0\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the `PyPackageTemplate`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`PyPackageTemplate`: https://github.com/starofrainnight/rtpl-pypackage\n\n\n\n=======\nHistory\n=======\n\n0.0.2 (2018-06-21)\n------------------\n\n* First release on PyPI.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/starofrainnight/paunch-dir", "keywords": "paunchdir,paunch-dir", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "paunch-dir", "package_url": "https://pypi.org/project/paunch-dir/", "platform": "", "project_url": "https://pypi.org/project/paunch-dir/", "project_urls": { "Homepage": "https://github.com/starofrainnight/paunch-dir" }, "release_url": "https://pypi.org/project/paunch-dir/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "An algorithm to generate a path from file name which directory structure could store mass files", "version": "0.0.4" }, "last_serial": 3987618, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "ca0cce78701e1f59f6611c0dbe35e3c4", "sha256": "92c2bc10034c22b31aa167116b6568a22cb5a9cf3682539e892f2b47a76c1cb8" }, "downloads": -1, "filename": "paunch-dir-0.0.2.zip", "has_sig": false, "md5_digest": "ca0cce78701e1f59f6611c0dbe35e3c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22130, "upload_time": "2018-06-21T14:54:44", "url": "https://files.pythonhosted.org/packages/4c/76/d67218c99a3072d439607998552e8945990553fae9d3154ccf803338f23c/paunch-dir-0.0.2.zip" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7844e6e1281c65806226e385b6505102", "sha256": "7ef93a9cb434057f9e2ecc701d9e71d9a8bf4ffcbea79b0ae228313d2c5e03c1" }, "downloads": -1, "filename": "paunch-dir-0.0.3.zip", "has_sig": false, "md5_digest": "7844e6e1281c65806226e385b6505102", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15046, "upload_time": "2018-06-22T02:42:45", "url": "https://files.pythonhosted.org/packages/33/c1/d4e548ce06228133138ccc869a843dbf310a35ccd1dba07ceb6d4b222bd2/paunch-dir-0.0.3.zip" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "a07ac2398555e3f3d189a2bbdefe1fc8", "sha256": "ae35436cd536b5d5d3fbcf0eb32933a8e68bcbf02b132f9a5c31b5861f8ac88a" }, "downloads": -1, "filename": "paunch-dir-0.0.4.zip", "has_sig": false, "md5_digest": "a07ac2398555e3f3d189a2bbdefe1fc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15085, "upload_time": "2018-06-22T02:52:53", "url": "https://files.pythonhosted.org/packages/b6/02/7e4a09da074b5efece686bd9b23e5bf70d7384adf78ba6e26eaaa8def6c9/paunch-dir-0.0.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a07ac2398555e3f3d189a2bbdefe1fc8", "sha256": "ae35436cd536b5d5d3fbcf0eb32933a8e68bcbf02b132f9a5c31b5861f8ac88a" }, "downloads": -1, "filename": "paunch-dir-0.0.4.zip", "has_sig": false, "md5_digest": "a07ac2398555e3f3d189a2bbdefe1fc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15085, "upload_time": "2018-06-22T02:52:53", "url": "https://files.pythonhosted.org/packages/b6/02/7e4a09da074b5efece686bd9b23e5bf70d7384adf78ba6e26eaaa8def6c9/paunch-dir-0.0.4.zip" } ] }