{ "info": { "author": "Matt GdV", "author_email": "matthewgdv@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 3.7" ], "description": "Overview\n====================\n\nPathmagic implements two classes, `File` and `Dir`, to represent mapped file system obects in a manner similar to database ORMs like sqlalchemy. These objects have properties which\nperform file system operations when set, and implement many useful methods to abstract away nearly all file system I/O to a much higher degree than `os.path` or `pathlib`.\n\nThe `Dir` class\n--------------------\n* Properties that perform rename and move operations when set (`Dir.path`, `Dir.dir`, `Dir.name`)\n* Two accessor objects (`Dir.files`, `Dir.dirs`) which allow iteration over their respective collections, item access, membership tests, and more\n* Two specialized accessor objects (`Dir.d`, `Dir.f`), which dynamically populate themselves with snake_cased attributes that represent the files/folders in their `Dir`, such that\n the filesystem tree can be traversed purely through attribute access\n* Methods to create new files/dirs, copy/move self to another path/dir, delete self or contents, and join self to a relative path\n* Recursively walk the tree downwards, comparing own tree to a parallel filesystem tree\n* Recursively seek files or dirs down the directory tree with inclusions/exclusions based on valid extensions and regex patterns matching name, path, and contents.\n* Compress self into a zipfile\n* Visualize tree to arbitrary depth with an ascii representation\n* Initialize from homepath, desktop, or package\n\nThe `File` class\n--------------------\n* Properties that perform rename and move operations when set (`File.path`, `File.dir`, `File.name`,\n `File.prename`, `File.extension`)\n* Methods to copy/move self to another path/dir or delete self\n* Initialize from script entry point (in traditional interpreter), and from a package resource\n* `File.read()` and `File.write()` methods (and associated `File.contents` property) which invokes the `FormatHandler` class to determine how to read from/write to the file based\n on its extension. `FormatHandler` uses the factory design pattern and can be extended at runtime to enable `File` to handle types of files that are not supported by default.\n* By default, recognized formats are the following:\n\n | format | class accepted/returned | file extensions |\n | ------------- | --------------------------------- | ------------------------- |\n | Pdf | PyPDF2 | pdf |\n | Tabular | subtypes.Frame | xlsx, csv |\n | Word | docx.Document | docx |\n | Image | PIL.Image | png, jpf, jpeg |\n | Audio | pydub.AudioSegment | mp3, wav, ogg, flv |\n | Video | Moviepy.editor.edit | mp4, mkv, avi, gif |\n | Compressed | pathmagic.Dir | zip, tar |\n | Link | pathlib.File or Pathlib.Dir | lnk |\n | Serialized | Any | pkl |\n | Json | subtypes.NameSpace or Any | json |\n | MarkUp | subtypes.Markup | html, xml |\n | Default | str | everything else |\n\n\nInstallation\n====================\n\nTo install use pip:\n\n $ pip install pathmagic\n\n\nOr clone the repo:\n\n $ git clone https://github.com/matthewgdv/pathmagic.git\n $ python setup.py install\n\n\nUsage\n====================\n\nDetailed usage examples coming soon.\n\nContributing\n====================\n\nContributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.\n\nYou can contribute in many ways:\n\nReport Bugs\n--------------------\n\nReport bugs at https://github.com/matthewgdv/pathmagic/issues\n\nIf you are reporting a bug, please include:\n\n* Your operating system name and version.\n* Any details about your local setup that might be helpful in troubleshooting.\n* Detailed steps to reproduce the bug.\n\nFix Bugs\n--------------------\n\nLook through the GitHub issues for bugs. Anything tagged with \"bug\" and \"help wanted\" is open to whoever wants to implement a fix for it.\n\nImplement Features\n--------------------\n\nLook through the GitHub issues for features. Anything tagged with \"enhancement\" and \"help wanted\" is open to whoever wants to implement it.\n\nWrite Documentation\n--------------------\n\nThe repository could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.\n\nSubmit Feedback\n--------------------\n\nThe best way to send feedback is to file an issue at https://github.com/matthewgdv/pathmagic/issues.\n\nIf you are proposing a new feature:\n\n* Explain in detail how it would work.\n* Keep the scope as narrow as possible, to make it easier to implement.\n* Remember that this is a volunteer-driven project, and that contributions are welcome :)\n\nGet Started!\n--------------------\n\nBefore you submit a pull request, check that it meets these guidelines:\n\n1. If the pull request adds functionality, it should include tests and the docs should be updated. Write docstrings for any functions that are part of the external API, and add\n the feature to the README.md.\n\n2. If the pull request fixes a bug, tests should be added proving that the bug has been fixed. However, no update to the docs is necessary for bugfixes.\n\n3. The pull request should work for the newest version of Python (currently 3.7). Older versions may incidentally work, but are not officially supported.\n\n4. Inline type hints should be used, with an emphasis on ensuring that introspection and autocompletion tools such as Jedi are able to understand the code wherever possible.\n\n5. PEP8 guidelines should be followed where possible, but deviations from it where it makes sense and improves legibility are encouraged. The following PEP8 error codes can be\n safely ignored: E121, E123, E126, E226, E24, E704, W503\n\n6. This repository intentionally disallows the PEP8 79-character limit. Therefore, any contributions adhering to this convention will be rejected. As a rule of thumb you should\n endeavor to stay under 200 characters except where going over preserves alignment, or where the line is mostly non-algorythmic code, such as extremely long strings or function\n calls.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/matthewgdv/pathmagic", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pathmagic", "package_url": "https://pypi.org/project/pathmagic/", "platform": "", "project_url": "https://pypi.org/project/pathmagic/", "project_urls": { "Homepage": "https://github.com/matthewgdv/pathmagic" }, "release_url": "https://pypi.org/project/pathmagic/0.0.4/", "requires_dist": [ "Pillow", "PyPDF2", "appdirs", "bs4", "dill", "docx", "lazy-property", "maybe-else", "moviepy", "pydub", "pysubtypes" ], "requires_python": "", "summary": "Provides ORM path classes (File and Dir), which automatically emit file system IO operations upon having their attributes modified. File objects allow for easy content manipulation of many forms of files.", "version": "0.0.4" }, "last_serial": 5959770, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "563ba600a70dec2bae46782262b1d13b", "sha256": "f6f4fb52ea3de98e67ae11bf5db7e872bb0b390924254bd68097c9c00309b48d" }, "downloads": -1, "filename": "pathmagic-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "563ba600a70dec2bae46782262b1d13b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20210, "upload_time": "2019-07-29T15:10:06", "url": "https://files.pythonhosted.org/packages/94/bc/f133a9a6ea89eaca2cfdab00f6e0f8afaf6074c76e7c2658cc38e509501e/pathmagic-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff1fe3f4842793fb1c92c362d96a6325", "sha256": "a48acf7c2298b14c6ea99a4ac4745d963938748889a166150026540305451194" }, "downloads": -1, "filename": "pathmagic-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ff1fe3f4842793fb1c92c362d96a6325", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19120, "upload_time": "2019-07-29T15:10:08", "url": "https://files.pythonhosted.org/packages/c4/45/6131b1197b5ded20e38629e7884e0b8008d10c0735dd672a3d9eace12d2a/pathmagic-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "049990ddbeb1390cc43bb7dbfb88af7b", "sha256": "af6c7120eb9a6e60d20977fb300b0519f04ae3ad0e5d1e3ac18cac1f0e4a036c" }, "downloads": -1, "filename": "pathmagic-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "049990ddbeb1390cc43bb7dbfb88af7b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20218, "upload_time": "2019-07-29T15:19:45", "url": "https://files.pythonhosted.org/packages/4b/cc/1eac76f75dfec797b2e438a3e17c17ffa3eb8fe8ad2f607a343adf99c8bb/pathmagic-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d4e49e40363ab2ee686b2fe64d99121", "sha256": "20357a648bec1f8ef6067cfdeff5c8a3880dd3ec8d010f6ce6271325dd73bc1c" }, "downloads": -1, "filename": "pathmagic-0.0.2.tar.gz", "has_sig": false, "md5_digest": "2d4e49e40363ab2ee686b2fe64d99121", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19123, "upload_time": "2019-07-29T15:19:46", "url": "https://files.pythonhosted.org/packages/0c/c3/128bdac3cab4a8574d62a384074a0bb0f3141dcda0f664e10498b8af6a95/pathmagic-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a963c9dba1cd68eb52621e4ab8c16fc4", "sha256": "ef0fd37f57db14738451def56678aea5da93a58f942f3829947fab27ec393da2" }, "downloads": -1, "filename": "pathmagic-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a963c9dba1cd68eb52621e4ab8c16fc4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20221, "upload_time": "2019-07-29T15:33:47", "url": "https://files.pythonhosted.org/packages/20/f7/28bc89b32cbd195c4390fd80b26c4375c5d18eb06702e462740c95f486f5/pathmagic-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e12b213f044955529a03939f110e3961", "sha256": "331c14f61f08560288a0a10d6f3a1288e521800f23f9e02b9b9bad39bcb056b8" }, "downloads": -1, "filename": "pathmagic-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e12b213f044955529a03939f110e3961", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19120, "upload_time": "2019-07-29T15:33:49", "url": "https://files.pythonhosted.org/packages/35/ff/18a20977d956307a5d65a764b469d77325a07984677da502679750432f47/pathmagic-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "b9ee62446a1f2428f0551526edd0682a", "sha256": "dd0700fefd8275b0f1beb54708966fa0c4844e5d39a5264b9a1e40bae627122a" }, "downloads": -1, "filename": "pathmagic-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "b9ee62446a1f2428f0551526edd0682a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20118, "upload_time": "2019-10-11T10:59:49", "url": "https://files.pythonhosted.org/packages/4e/d9/e7968805ce09e35594c08348c93b7d2686f3872fb8394e9938fc858aa77a/pathmagic-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59e12e446ab27c17fd9290349fcf3255", "sha256": "d1b2de9789907a11bdda6b42beb1e8ef8d5a9cf75fa139c80906f15775340001" }, "downloads": -1, "filename": "pathmagic-0.0.4.tar.gz", "has_sig": false, "md5_digest": "59e12e446ab27c17fd9290349fcf3255", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19105, "upload_time": "2019-10-11T10:59:51", "url": "https://files.pythonhosted.org/packages/34/2a/be956c6a5d1346bfa71589f0e79f134a9ff2178a3b60be5cbd59dc78976a/pathmagic-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9ee62446a1f2428f0551526edd0682a", "sha256": "dd0700fefd8275b0f1beb54708966fa0c4844e5d39a5264b9a1e40bae627122a" }, "downloads": -1, "filename": "pathmagic-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "b9ee62446a1f2428f0551526edd0682a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20118, "upload_time": "2019-10-11T10:59:49", "url": "https://files.pythonhosted.org/packages/4e/d9/e7968805ce09e35594c08348c93b7d2686f3872fb8394e9938fc858aa77a/pathmagic-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59e12e446ab27c17fd9290349fcf3255", "sha256": "d1b2de9789907a11bdda6b42beb1e8ef8d5a9cf75fa139c80906f15775340001" }, "downloads": -1, "filename": "pathmagic-0.0.4.tar.gz", "has_sig": false, "md5_digest": "59e12e446ab27c17fd9290349fcf3255", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19105, "upload_time": "2019-10-11T10:59:51", "url": "https://files.pythonhosted.org/packages/34/2a/be956c6a5d1346bfa71589f0e79f134a9ff2178a3b60be5cbd59dc78976a/pathmagic-0.0.4.tar.gz" } ] }