{ "info": { "author": "Juan Carlos", "author_email": "juancarlospaco@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Other Environment", "Intended Audience :: Developers", "Intended Audience :: Other Audience", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development" ], "description": "\n\n# Faster-than-Walk\n\n[![screenshot](https://source.unsplash.com/eH_ftJYhaTY/800x402)](https://youtu.be/QiKwnlyhKrk?t=5)\n\n| Library | Speed |\n|-------------------------------|----------|\n| os.walk (std lib) | `225.98` |\n| faster_than_walk | `70.0` |\n\n
\n\n- Benchmarks run on Docker from Dockerfile on this repo.\n- Speed is IRL time to complete 10000 full recursive directory walks to `/usr/share/`.\n- Stats as of year 2019.\n- x86_64 64Bit AMD, SSD, Arch Linux.\n\n
\n\n\n# Use\n\n```python\nimport faster_than_walk as ftw\n\nprint(ftw.walks(\"/path/to/some/folder\")) # From path string\nprint(ftw.walks(\"/path/to/some/folder\", [\".py\", \".txt\"])) # Filter by Extension\nprint(ftw.walks(\"/path/to/some/folder\", [\".py\"], followlinks=True)) # Follow SymLinks\nprint(ftw.walks(\"/path/to/some/folder\", [\".py\"], followlinks=True, yieldfiles=False)) # Folders only\nprint(ftw.walks_glob(\"*.txt\")) # Standard POSIX Globs\nprint(ftw.walks_glob(\"**/*.txt\")) # Recursive standard POSIX Globs\n```\n\n\n# walks()\n
\n\n**Description:**\nTakes a path string, makes a full recursive walk of folders and returns a list with the result.\nRecursive directory walk from path to list of strings.\n\n**Arguments:**\n- `folderpath` A local path, `str` type, required, must not be empty string.\n- `extensions` list of file Extensions, `list` type, optional, list must contain `str`, must not be empty list.\n- `followlinks` Set to `True` to follow SymLinks, `bool` type, optional.\n- `yieldfiles` Set to `False` to return folders only, `bool` type, optional.\n- `debugs` Set to `True` for Debug mode, `bool` type, optional, not needed for normal usage.\n\n**Returns:**\nResult, `list` type, values of the list are `str` type.\n\n
\n\n\n# walks_glob()\n
\n\n**Description:**\nTakes a path string, makes a full recursive walk of folders and returns a list with the result.\nRecursive directory walk from standard POSIX like Glob Pattern string to list of strings, allows Recursive and Non-Recursive Globs.\n\n**Arguments:**\n- `globpattern` A standard POSIX like Glob Pattern string, `str` type, required, must not be empty string.\n\n**Returns:**\nResult, `list` type, values of the list are `str` type.\n\n
\n\n\n[**For more Examples check the Examples.**](https://github.com/juancarlospaco/faster-than-walk/blob/master/examples/example.py)\n\nInstead of having a pair of functions with a lot of arguments that you should provide to make it work,\nwe have tiny functions with very few arguments that do one thing and do it as fast as possible.\n\n\n# Install\n\n- `pip install faster_than_walk`\n\n\n# Dependencies\n\n- **None**\n\n\n# Docker\n\n- Make a quick test drive on Docker!.\n\n```bash\n$ ./build-docker.sh\n$ ./run-docker.sh\n$ ./run-benchmark.sh # Inside Docker.\n```\n\n\n# Platforms\n\n- \u2705 Linux\n- \u2705 Windows\n- \u2705 Mac\n- \u2705 Android\n- \u2705 Raspberry Pi\n- \u2705 BSD\n\n\n# Extras\n\nMore Faster Libraries...\n\n- https://github.com/juancarlospaco/faster-than-csv#faster-than-csv\n- https://github.com/juancarlospaco/faster-than-requests#faster-than-requests\n- We want to make Open Source faster, better, stronger.\n\n\n# Requisites\n\n- Python 3.\n- GCC.\n- 64 Bit.\n\n\n# FAQ\n\n- Whats the idea, inspiration, reason, etc ?.\n\n[Feel free to Fork, Clone, Download, Improve, Reimplement, Play with this Open Source. Make it 10 times faster, 10 times smaller.](http://tonsky.me/blog/disenchantment)\n\n- This requires Cython ?.\n\nNo.\n\n- This runs on PyPy ?.\n\nNo.\n\n- This runs on Python2 ?.\n\nI dunno. (Not supported)\n\n- This runs on 32Bit ?.\n\nNo.\n\n- This runs with Clang ?.\n\nNo.\n\n- How can I Install it ?.\n\n`pip install faster_than_walk`\n\n- How can be faster than `os.walk` ?.\n\nI dunno.\n\n- How to Filter by File Extensions ?.\n\n`extensions = [\".py\", \".txt\", \".tar.gz\"]`\n\n(Glob Pattern may be faster for several file extensions than the extensions argument)\n\n- How to force Follow SymLinks ?.\n\n`followlinks = True`\n\n- How to force return Folders only and Not Files ?.\n\n`yieldfiles = False`\n\n- How to enable Debug ?.\n\n`debugs = True`\n\n- How to use a Glob Pattern ?.\n\n`globpattern = \"*.txt\"`\n\n- How to use a Recursive Glob Pattern ?.\n\n`globpattern = \"**/*.txt\"`\n\n- I need to `import glob` on my code to use a Glob Pattern ?.\n\nNo.\n\n- Whats a Glob Pattern ?.\n\nhttps://en.wikipedia.org/wiki/Glob_%28programming%29\n\n- Why needs 64Bit ?.\n\nMaybe it works on 32Bit, but is not supported, integer sizes are too small, and performance can be worse.\n\n- Why needs Python 3 ?.\n\nMaybe it works on Python 2, but is not supported, and performance can be worse, we suggest to migrate to Python3.\n\n- Can I wrap the functions on a `try: except:` block ?.\n\nFunctions do not have internal `try: except:` blocks,\nso you can wrap them inside `try: except:` blocks if you need very resilient code.\n\n- PIP fails to install or fails build the wheel ?.\n\nAdd at the end of the PIP install command:\n\n` --isolated --disable-pip-version-check --no-cache-dir --no-binary :all: `\n\nNot my Bug.\n\n- How to Build the project ?.\n\n`build.sh`\n\n- How to Package the project ?.\n\n`package.sh`\n\n- This requires Nimble ?.\n\nNo.\n\n- Whats the unit of measurement for speed ?.\n\nUnmmodified raw output of Python `timeit` module.\n\nPlease send Pull Request to Python to improve the output of `timeit`.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/juancarlospaco/faster-than-walk/releases", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/juancarlospaco/faster-than-walk#faster-than-walk", "keywords": "python3,cpython,speed,walk,cython,performance,c", "license": "MIT", "maintainer": "Juan Carlos", "maintainer_email": "juancarlospaco@gmail.com", "name": "faster-than-walk", "package_url": "https://pypi.org/project/faster-than-walk/", "platform": "Linux", "project_url": "https://pypi.org/project/faster-than-walk/", "project_urls": { "Bugs": "https://github.com/juancarlospaco/faster-than-walk/issues", "CoC": "https://github.com/juancarlospaco/faster-than-walk/blob/master/CODE_OF_CONDUCT.md", "Docs": "https://github.com/juancarlospaco/faster-than-walk#faster-than-walk", "Download": "https://github.com/juancarlospaco/faster-than-walk/releases", "Homepage": "https://github.com/juancarlospaco/faster-than-walk#faster-than-walk" }, "release_url": "https://pypi.org/project/faster-than-walk/0.5/", "requires_dist": null, "requires_python": ">3.6", "summary": "Faster recursive directory walk for Python.", "version": "0.5" }, "last_serial": 5301081, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "63066cdb449254ef47ad81ca14610d80", "sha256": "21af300a7912e9923b14185fc58d334b134a9dbf08c1038301c1e7e16d3251e2" }, "downloads": -1, "filename": "faster_than_walk-0.1.zip", "has_sig": false, "md5_digest": "63066cdb449254ef47ad81ca14610d80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 106666, "upload_time": "2019-01-04T18:55:51", "url": "https://files.pythonhosted.org/packages/3f/df/dfcd4a19ef492dfd7a08f4fc3de33deafc600029fb77ca5a11133b06ad89/faster_than_walk-0.1.zip" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "080ae442c8177a333c0a67ac348ca5cd", "sha256": "aa5c0dd068b2caef380299e2e5d904f893186f0620d01bfbb956bb8f211dd509" }, "downloads": -1, "filename": "faster_than_walk-0.5.zip", "has_sig": false, "md5_digest": "080ae442c8177a333c0a67ac348ca5cd", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6", "size": 115746, "upload_time": "2019-05-22T06:02:41", "url": "https://files.pythonhosted.org/packages/94/88/89bf68d0470947551d6b7916d0c9f0789c502cd41386c52538f75eb4cb80/faster_than_walk-0.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "080ae442c8177a333c0a67ac348ca5cd", "sha256": "aa5c0dd068b2caef380299e2e5d904f893186f0620d01bfbb956bb8f211dd509" }, "downloads": -1, "filename": "faster_than_walk-0.5.zip", "has_sig": false, "md5_digest": "080ae442c8177a333c0a67ac348ca5cd", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6", "size": 115746, "upload_time": "2019-05-22T06:02:41", "url": "https://files.pythonhosted.org/packages/94/88/89bf68d0470947551d6b7916d0c9f0789c502cd41386c52538f75eb4cb80/faster_than_walk-0.5.zip" } ] }