Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyfiletools

A lightweight, modular Python library for efficient file and directory management. pyfiletools offers utilities for analysis, hashing, duplicate detection, text search, file organization, renaming, encoding conversion, and reports.


🚀 Key Features

  • File Analysis & Stats: Line counting, byte-size calculations, and file extensions.
  • Hashing & Integrity: Memory-safe hashing (MD5, SHA-1, SHA-256, SHA-512) and validation.
  • Search: Text and regex searching within files, with filter options.
  • File Management: Duplicate detection and directory organization.
  • Automation: Batch renaming and safe encoding conversions.
  • Reports: Generate file system reports (JSON, CSV, Markdown).

📦 Installation

git clone https://github.com/v80dn/pyfiletools.git
cd pyfiletools
pip install .

Requires Python 3.10+


💡 Usage

from pyfiletools import count_lines, file_size, format_size, file_hash

# Basic Analysis
path = "example.txt"
print(f"Lines: {count_lines(path)}")
print(f"Size: {format_size(file_size(path))}")

# Hashing
hash_val = file_hash(path, algorithm="sha256")

🛠 Project Structure

  • pyfiletools/: Core package (archives, duplicates, hashing, search, etc.)
  • tests/: pytest automation suite
  • pyproject.toml: Project metadata

🧪 Testing

pip install pytest
pytest

📄 License

MIT License.

About

A modular Python library for local file management, analysis, and automation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages