Skip to main content

Python implementation of GNU Findutils

Project description

findtools

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

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

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

Install

You can install this library by via pip:

pip install findtools

Develop

Alternatively you can clone this git repository. Then if you are using pyenv or miniconda as your local development setup

git clone https://github.com/ewiger/findtools.git findtools && cd findtools pip install -e .

This will symlink you local copy and help you testign the package locally.

Test

You can run tests yourself with built-in unittest lib:

cd tests && python test_findtools.py

or with pytest:

cd tests && pytest

Package has been tested on python3.8+ and python2.7+.

Upgrade to latest with pip install findtools==1.1.0

Please report issues if this breaks for you.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

findtools-1.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distributions

findtools-1.1.0-py3.8.egg (8.5 kB view details)

Uploaded Source

findtools-1.1.0-py2.7.egg (8.3 kB view details)

Uploaded Source

File details

Details for the file findtools-1.1.0.tar.gz.

File metadata

  • Download URL: findtools-1.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for findtools-1.1.0.tar.gz
Algorithm Hash digest
SHA256 346f53d04b71ee1e6c8358185fd1a5f12afd2f2812be9aaecb925e1351454158
MD5 8efc2204e37b851d87d1fde53c96b681
BLAKE2b-256 86805f42e2e31fc147a7975ec8580ac5c9fd0a1bf0ad8f45432770c4f9209f22

See more details on using hashes here.

File details

Details for the file findtools-1.1.0-py3.8.egg.

File metadata

  • Download URL: findtools-1.1.0-py3.8.egg
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for findtools-1.1.0-py3.8.egg
Algorithm Hash digest
SHA256 1b8b42989602af73b6a2a9f5af2a40a260e029a1704646f9cffd613be3c3991d
MD5 d0f44acb423d500b95de102e4d7589fb
BLAKE2b-256 2abdce0940c7d2f619110b4d204859ec5f76dcf2d7123e45dc4b5c2f9cc3fa7c

See more details on using hashes here.

File details

Details for the file findtools-1.1.0-py2.7.egg.

File metadata

  • Download URL: findtools-1.1.0-py2.7.egg
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for findtools-1.1.0-py2.7.egg
Algorithm Hash digest
SHA256 4392f3526198f7e59eabdb1db5b034454c76e5ebaf1f00386270d29bd47f4130
MD5 545165aca027fb12644720b89fb50409
BLAKE2b-256 1c49c9e91ef1e2d13bc706e4803dabf2e0e886e561b0fb41325a535f52dd13ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page