Skip to main content

Threaded directory iteration via os.scandir() with progress indicator and resume function.

Project description

IterFilesystem

Threaded directory iteration via os.scandir() with progress indicator and resume function.

among other things these packages are used:

Requirement:

  • Python 3.6 or newer.

  • Pipenv. Packages and virtual environment manager.

Please: try, fork and contribute! ;)

Build Status on travis-ci.org

travis-ci.org/jedie/IterFilesystem

Build Status on appveyor.com

ci.appveyor.com/project/jedie/IterFilesystem

Coverage Status on codecov.io

codecov.io/gh/jedie/IterFilesystem

Coverage Status on coveralls.io

coveralls.io/r/jedie/IterFilesystem

Requirements Status on requires.io

requires.io/github/jedie/IterFilesystem/requirements/

Example

Use example CLI, e.g.:

~$ git clone https://github.com/jedie/IterFilesystem.git
~$ cd IterFilesystem
~/IterFilesystem$ pipenv install
~/IterFilesystem$ pipenv shell
(IterFilesystem) ~/IterFilesystem$ print_fs_stats --help
usage: print_fs_stats.py [-h] [-v] [--path PATH]
                         [--skip_dirs [SKIP_DIRS [SKIP_DIRS ...]]]
                         [--skip_filenames [SKIP_FILENAMES [SKIP_FILENAMES ...]]]
                         [--force_restart] [--complete_cleanup]

Scan filesystem and print some information

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --path PATH           The file path that should be scanned e.g.: "~/foobar/"
                        default is "~"
  --skip_dirs [SKIP_DIRS [SKIP_DIRS ...]]
                        Directory names to exclude from scan.
  --skip_filenames [SKIP_FILENAMES [SKIP_FILENAMES ...]]
                        File names to ignore.
  --force_restart       Don't use resume data: Delete persist queue data
                        before start.
  --complete_cleanup    Delete persist queue after complete scan.

example output looks like this:

(IterFilesystem) ~/IterFilesystem$ $ print_fs_stats --path ~/IterFilesystem --skip_dirs .tox .pytest_cache
Read/process: '/home/foobar/IterFilesystem'...
Skip directories:
    * .tox
    * .pytest_cache

[INFO:  61 2019-09-15 12:37:17,973] Save persist queue to: /home/foobar/IterFilesystem/persisted_queue_4Aubn
[INFO:  37 2019-09-15 12:37:18,252] Skip dir: '.idea'
[INFO:  37 2019-09-15 12:37:18,252] Skip dir: '.tox'
[INFO:  37 2019-09-15 12:37:18,270] Skip dir: '.pytest_cache'
Read filesystem with 83 items in 0.3sec.
*** all items processed ***: 100%|████████████████████████████████████| 83/83 [00:00<00:00, 85.25it/s]

total filesystem items: 83
Finish in.............: 1.0sec.
File count.....: 73 with 10991860 Bytes
Directory count: 10
Other count....: 0

History

Donating

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

iterfilesystem-0.2.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distributions

iterfilesystem-0.2.0-py3.6.egg (13.1 kB view details)

Uploaded Source

iterfilesystem-0.2.0-py2.py3-none-any.whl (15.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file iterfilesystem-0.2.0.tar.gz.

File metadata

  • Download URL: iterfilesystem-0.2.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for iterfilesystem-0.2.0.tar.gz
Algorithm Hash digest
SHA256 77d46abee0487b019eca6218725c513cdb7266c09fc2029eca201ec0438ea403
MD5 5b2b6ee5e9742da7f5a9c070117dabcc
BLAKE2b-256 34b3dbdd5041777220b7bcd9a8ad7c952382e520e95ecafa0de173287a09ee97

See more details on using hashes here.

Provenance

File details

Details for the file iterfilesystem-0.2.0-py3.6.egg.

File metadata

  • Download URL: iterfilesystem-0.2.0-py3.6.egg
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for iterfilesystem-0.2.0-py3.6.egg
Algorithm Hash digest
SHA256 352072403b36766f06ecbfa5869259ae06feec7d180a434dfdf8d7c4fa451661
MD5 10be87f11bb9e5113ec574cbdec61b96
BLAKE2b-256 97beda955fd1195d4c6cc310df8f1438783a7169a438d1f8aa8888c889cbb1de

See more details on using hashes here.

Provenance

File details

Details for the file iterfilesystem-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: iterfilesystem-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for iterfilesystem-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ff420b6c11c13677ae16160c0ecf38f27739ad78ccf8f45e65771f87c9b542f8
MD5 ea1169023a1fdc64d36c7809972d3605
BLAKE2b-256 53947b00f80317623d0bc686e0e57371ade20f9de0bd354d6eac82d2477c487d

See more details on using hashes here.

Provenance

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