Skip to main content

FileSystemPro is a powerful toolkit designed to handle file and directory operations with ease and efficiency across various operating systems.

Project description

FileSystemPro

PyPI Python License: MIT

Ask DeepWiki Contributor Covenant

FileSystemPro is a powerful, cross-platform Python toolkit for file and directory management, system monitoring, compression, and enhanced console output. It provides seamless abstractions for OS-specific paths, resource tracking (CPU, disks, memory, network), archive handling (tar/zip), change detection, and colored terminal styling. Built for developers, it integrates standard library tools with optional psutil for hardware insights, ensuring portability across Linux, macOS, and Windows.

Key Pillars:

  • FileSystem Abstraction: OS-agnostic paths to user folders (e.g., Desktop, Documents).
  • Resource Monitoring: Track CPU/memory/disks/network via device submodule.
  • File/Directory Ops: Creation, manipulation, enumeration, and integrity checks.
  • Compression & Watching: Tar/zip handling and real-time filesystem change detection.
  • Console Enhancement: ANSI colors/styles with Windows compatibility.

Compatibility: Python 3.10+; cross-platform (Linux/macOS/Windows).


Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


Getting Started

Requirements

  • Python 3.10+ (download).
  • Optional: psutil for device module (pip install psutil).

Installation

Upgrade pip first:

pip install --upgrade pip

Install FileSystemPro:

pip install FileSystemPro

For Developers/Contributors

Clone the repo:

git clone https://github.com/hbisneto/FileSystemPro.git
cd FileSystemPro

Upgrade build tools:

pip install --upgrade setuptools wheel

Note: Requires setuptools 69.5.1+; wheel for packaging.

Run tests or build: See CONTRIBUTING.md.

Table of Contents

Jump to module documentation for detailed APIs, examples, and best practices:

  • FileSystem Module: OS detection and standard folder paths (desktop, documents, etc.).
  • Core Module: Config management, logging, performance tuning, and update checks.
  • Compression Module: Tar/zip creation, extraction, and reading.
  • Directory Module: Path operations, creation/deletion, enumeration, timestamps, and tree views.
  • File Module: I/O, integrity (SHA-256), copy/move, splitting, and timestamps.
  • Watcher Module: Polling-based filesystem change detection with callbacks.
  • Wrapper Module: Unified metadata dicts (paths, sizes, timestamps).
  • Console Module: ANSI colors, backgrounds, and styles (chainable, Windows-compatible).
  • Device Module: CPU/disks/memory/network monitoring (requires psutil).

Quick Start

Import core modules:

import filesystem as fs  # Paths
from filesystem import file, directory, compression  # Ops
from filesystem import device  # Monitoring (needs psutil)
from filesystem import console  # Colored output

Example: List Downloads files with colors:

from filesystem import fs, file, console

files = file.get_files(fs.downloads)
for f in files:
    size = file.get_size(f, show_unit=True)
    print(console.green()(f) + f" ({size})")

Monitor CPU:

import time
from filesystem import device

while True:
    usage = device.cpu.cpu_percent()
    print(console.red() if usage > 80 else console.green()(f"CPU: {usage}%"))
    time.sleep(1)

Architecture

FileSystemPro follows a modular design:

  • Core (__core__): Config/logging/updates.
  • FileSystem: Entry point for paths.
  • Ops (file/directory/compression): Manipulation.
  • Monitoring (watcher/device): Changes/resources.
  • Utilities (wrapper/console): Metadata/styling.

See submodule READMEs for internals.

Contributing

  1. Fork/clone the repo.
  2. Install dev deps: pip install -e .[dev].
  3. Add tests in tests/.
  4. Run: pytest / black . / flake8.
  5. PR to main.

Guidelines: CONTRIBUTING.md.

License

MIT License. See LICENSE.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

filesystempro-3.0.0.0.tar.gz (61.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filesystempro-3.0.0.0-py2-none-any.whl (74.8 kB view details)

Uploaded Python 2

File details

Details for the file filesystempro-3.0.0.0.tar.gz.

File metadata

  • Download URL: filesystempro-3.0.0.0.tar.gz
  • Upload date:
  • Size: 61.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.0

File hashes

Hashes for filesystempro-3.0.0.0.tar.gz
Algorithm Hash digest
SHA256 9ffc4cf0c6c5192280b8cd8cd1504a85fbb5c0fafd36faa7cfc9207e98b8da49
MD5 631f688f6ed3d928037c36f980ce4000
BLAKE2b-256 a3beeedcff4f5c2f8f745c4dd0d2beb6564084cf7faab9eec5f1a5894196bb17

See more details on using hashes here.

File details

Details for the file filesystempro-3.0.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for filesystempro-3.0.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 fd834ade303eadf73976758eb8fda37d487ad46bceb2e5750be4f93da7bf5bcf
MD5 2c1276ac2c67409a5dc05f6c52842a82
BLAKE2b-256 621fe7a37631116617848bbee4b1a2fbd552c845590877dc219dae2be796ba77

See more details on using hashes here.

Supported by

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