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.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distributions

iterfilesystem-0.1.0-py3.6.egg (12.4 kB view details)

Uploaded Source

iterfilesystem-0.1.0-py2.py3-none-any.whl (14.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: iterfilesystem-0.1.0.tar.gz
  • Upload date:
  • Size: 11.9 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.1.0.tar.gz
Algorithm Hash digest
SHA256 2aa017b742c9eb8bf7310ebe65aeac500aa9d467ed34b38e325e84914b01ba20
MD5 5ca87efcf2cffb247118e9665c73d01b
BLAKE2b-256 96430a7d8491628fb07055962d59d6a1a9b8e0db6e6f5e2e8d0280a4b154f6cf

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: iterfilesystem-0.1.0-py3.6.egg
  • 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.1.0-py3.6.egg
Algorithm Hash digest
SHA256 1056abf9fd6eb829a0b5e9c35f941ce725545e31fa8ae1b9d464ae1cb5e8695f
MD5 2110f029a0269c95ae39fe595572c44b
BLAKE2b-256 40353d27dd88dc2916cdd8a44a10eb9c9c32050c5cd5cc8ca346574db8c0c51b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: iterfilesystem-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.4 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.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 794d56c55f7aa151fd8482a4f5347330cc2f91208fab24a2acdd5d7b906a2f3f
MD5 e7773006a8d6b875b2cc478c464b64f0
BLAKE2b-256 07ab83ebc590f84be05750580aa48d83908240eae3ad95fcad4bac0964d75f02

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