https://github.com/joellefkowitz/walkmate
Traverse the file tree.
https://github.com/joellefkowitz/walkmate
filesystem traverse tree walk
Last synced: 6 months ago
JSON representation
Traverse the file tree.
- Host: GitHub
- URL: https://github.com/joellefkowitz/walkmate
- Owner: JoelLefkowitz
- License: mit
- Created: 2020-03-15T19:07:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-11-20T18:28:41.000Z (8 months ago)
- Last Synced: 2025-11-30T21:42:23.123Z (8 months ago)
- Topics: filesystem, traverse, tree, walk
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Walkmate
Traverse the file tree.





## Installing
```bash
pip install walkmate
```
## Documentation
Documentation and more detailed examples are hosted on [Github Pages](https://joellefkowitz.github.io/walkmate).
## Usage
Given a multi-level directory structure:
```ascii
.
├── one.py
├── two.py
└── child
└── three.py
```
We can list all the files tree:
```python
>>> tree("test/fixtures")
["one.py", "two.py", "child/three.py"]
```
Filter with a regex:
```python
>>> tree("test/fixtures", r"one\.py$")
["one.py"]
```
Add exclude patterns too:
```python
>>> tree("test/fixtures", r"\.py$", [r"one\.py$"])
["two.py", "child/three.py"]
```
Specify the maximum depth:
```python
>>> tree("test/fixtures", depth=1)
["one.py", "two.py"]
```
## Tooling
### Dependencies
To install dependencies:
```bash
yarn install
pip install .[all]
```
### Tests
To run tests:
```bash
thx test
```
### Documentation
To generate the documentation locally:
```bash
thx docs
```
### Linters
To run linters:
```bash
thx lint
```
### Formatters
To run formatters:
```bash
thx format
```
## Contributing
Please read this repository's [Code of Conduct](CODE_OF_CONDUCT.md) which outlines our collaboration standards and the [Changelog](CHANGELOG.md) for details on breaking changes that have been made.
This repository adheres to semantic versioning standards. For more information on semantic versioning visit [SemVer](https://semver.org).
Bump2version is used to version and tag changes. For example:
```bash
bump2version patch
```
### Contributors
- [Joel Lefkowitz](https://github.com/joellefkowitz) - Initial work
## Remarks
Lots of love to the open source community!