{"id":20269566,"url":"https://github.com/omnilib/trailrunner","last_synced_at":"2025-07-02T01:35:06.051Z","repository":{"id":37100324,"uuid":"354413444","full_name":"omnilib/trailrunner","owner":"omnilib","description":"Walk paths and run things","archived":false,"fork":false,"pushed_at":"2024-07-22T20:29:04.000Z","size":127,"stargazers_count":16,"open_issues_count":15,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-01T03:46:35.481Z","etag":null,"topics":["hacktoberfest","multiprocessing","python","runner"],"latest_commit_sha":null,"homepage":"https://trailrunner.omnilib.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omnilib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-03T23:14:11.000Z","updated_at":"2025-06-19T14:48:48.000Z","dependencies_parsed_at":"2024-05-01T09:40:50.712Z","dependency_job_id":"ef461071-f5bf-4304-8d27-defc87dbca40","html_url":"https://github.com/omnilib/trailrunner","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/omnilib/trailrunner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Ftrailrunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Ftrailrunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Ftrailrunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Ftrailrunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omnilib","download_url":"https://codeload.github.com/omnilib/trailrunner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Ftrailrunner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263060935,"owners_count":23407596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","multiprocessing","python","runner"],"created_at":"2024-11-14T12:25:55.171Z","updated_at":"2025-07-02T01:35:06.026Z","avatar_url":"https://github.com/omnilib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trailrunner\n\nWalk paths and run things\n\n[![version](https://img.shields.io/pypi/v/trailrunner.svg)](https://pypi.org/project/trailrunner)\n[![documentation](https://readthedocs.org/projects/trailrunner/badge/?version=latest)](https://trailrunner.omnilib.dev)\n[![changelog](https://img.shields.io/badge/change-log-blue)](https://trailrunner.omnilib.dev/en/latest/changelog.html)\n[![license](https://img.shields.io/pypi/l/trailrunner.svg)](https://github.com/omnilib/trailrunner/blob/master/LICENSE)\n[![build status](https://github.com/omnilib/trailrunner/workflows/Build/badge.svg?branch=main)](https://github.com/omnilib/trailrunner/actions)\n[![code coverage](https://img.shields.io/codecov/c/gh/omnilib/trailrunner)](https://codecov.io/gh/omnilib/trailrunner)\n\ntrailrunner is a simple library for walking paths on the filesystem, and executing\nfunctions for each file found. trailrunner obeys project level `.gitignore` files,\nand runs functions on a process pool for increased performance. trailrunner is designed\nfor use by linting, formatting, and other developer tools that need to find and operate\non all files in project in a predictable fashion with a minimal API:\n\n`walk()` takes a single `Path`, and generates a list of significant files in that tree:\n\n```pycon\n\u003e\u003e\u003e from trailrunner import walk\n\u003e\u003e\u003e sorted(walk(Path(\"trailrunner\")))\n[\n    PosixPath('trailrunner/__init__.py'),\n    PosixPath('trailrunner/__version__.py'),\n    PosixPath('trailrunner/core.py'),\n    PosixPath('trailrunner/tests/__init__.py'),\n    PosixPath('trailrunner/tests/__main__.py'),\n    PosixPath('trailrunner/tests/core.py'),\n]\n```\n\n`run()` takes a list of `Path` objects and a function, and runs that function once\nfor each path given. It runs these functions on a process pool, and returns a mapping\nof paths to results:\n\n```pycon\n\u003e\u003e\u003e from trailrunner import run\n\u003e\u003e\u003e paths = [Path('trailrunner/core.py'), Path('trailrunner/tests/core.py')]\n\u003e\u003e\u003e run(paths, str)\n{\n    PosixPath('trailrunner/core.py'): 'trailrunner/core.py',\n    PosixPath('trailrunner/tests/core.py'): 'trailrunner/tests/core.py',\n}\n```\n\n`walk_and_run()` does exactly what you would expect:\n\n```pycon\n\u003e\u003e\u003e from trailrunner import walk_and_run\n\u003e\u003e\u003e walk_and_run([Path('trailrunner/tests')], str)\n{\n    PosixPath('trailrunner/tests/__init__.py'): 'trailrunner/tests/__init__.py',\n    PosixPath('trailrunner/tests/__main__.py'): 'trailrunner/tests/__main__.py',\n    PosixPath('trailrunner/tests/core.py'): 'trailrunner/tests/core.py',\n}\n```\n\n\nInstall\n-------\n\ntrailrunner requires Python 3.6 or newer. You can install it from PyPI:\n\n```shell-session\n$ pip install trailrunner\n```\n\n\nLicense\n-------\n\ntrailrunner is copyright [Amethyst Reese](https://noswap.com), and licensed under\nthe MIT license.  I am providing code in this repository to you under an open\nsource license.  This is my personal repository; the license you receive to\nmy code is from me and not from my employer. See the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnilib%2Ftrailrunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomnilib%2Ftrailrunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnilib%2Ftrailrunner/lists"}