Metadata-Version: 2.4
Name: findtools
Version: 1.2.0
Summary: Python implementation of GNU Findutils
Author-email: Yauhen Yakimovich <eugeny.yakimovitch@gmail.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/ewiger/findtools
Project-URL: Documentation, https://ewiger.github.io/findtools/
Project-URL: Repository, https://github.com/ewiger/findtools
Keywords: find,files,search,findutils,filesystem
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# findtools

[![CI](https://github.com/ewiger/findtools/actions/workflows/ci.yml/badge.svg)](https://github.com/ewiger/findtools/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/findtools)](https://pypi.org/project/findtools/)

Findtools is a pythonic implementation of file search routines inspired by
GNU Findutils.

**Documentation: <https://ewiger.github.io/findtools/>**

```python
from findtools.find_files import find_files, Match


# Recursively find all *.sh files in /usr/bin
sh_files_pattern = Match(filetype='f', name='*.sh')
found_files = find_files(path='/usr/bin', match=sh_files_pattern)

for found_file in found_files:
    print(found_file)
```

The above is equivalent to

```sh
find /usr/bin -type f -name '*.sh'
```

## Install

```sh
pip install findtools
```

or with [uv](https://docs.astral.sh/uv/):

```sh
uv add findtools
```

Requires Python 3.9+. Findtools has no dependencies outside the standard
library.

## Develop

The project is managed with [uv](https://docs.astral.sh/uv/):

```sh
git clone https://github.com/ewiger/findtools.git && cd findtools
uv sync --group dev
```

## Test

Run the test suite with pytest:

```sh
uv run pytest
```

or via make:

```sh
make test
```

## Documentation

The docs are built with [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/)
and deployed to GitHub Pages on every push to `master`. To preview locally:

```sh
make docs-serve
```

Please report issues at <https://github.com/ewiger/findtools/issues>.
