Metadata-Version: 2.4
Name: easypath
Version: 0.3.0
Summary: Cross-platform file and folder utility functions in Python made simple.
Home-page: https://github.com/aaravmaloo/easypath
Author: Aarav Maloo
Author-email: aaravmaloo06@gmail.com
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Topic :: Utilities
Classifier: Topic :: System :: Filesystems
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# easypath

`easypath` is a lightweight Python toolkit for file, folder, and path workflows on top of `pathlib`, now expanded with a major advanced utility layer for automation, integrity checks, and data pipelines.

## Installation

```bash
pip install easypath
```

## What Is New In This Expansion

This release extends the library with **45 new tools** focused on high-impact workflows:

- Atomic and resilient file writes
- Backup and restore flows
- File checksum and verification
- Fast search/replace and file grep
- Zip/Tar/Gzip archive workflows
- Directory snapshots + diffing
- Folder synchronization and filtered copy
- NDJSON + CSV append helpers
- JSON deep merge and merge-from-files
- Permission inspection and executable toggles

## New Advanced Tools (45)

### Path intelligence

- `normalize_path`
- `is_absolute_path`
- `path_depth`
- `common_path`
- `same_path`

### Safe I/O and recovery

- `read_text_safe`
- `write_text_atomic`
- `backup_file`
- `restore_file`
- `copy_if_newer`
- `remove_files`
- `touch_files`
- `wait_for_path`

### Integrity, inspection, and content operations

- `file_checksum`
- `verify_checksum`
- `compare_file_contents`
- `count_lines`
- `head_file`
- `tail_file`
- `find_in_file`
- `replace_in_file`
- `grep_files`
- `merge_text_files`
- `concat_binary_files`
- `list_recent_files`
- `list_largest_files`

### Archives and structure workflows

- `make_zip_archive`
- `extract_zip_archive`
- `make_tar_archive`
- `extract_tar_archive`
- `gzip_file`
- `gunzip_file`
- `hardlink_file`
- `duplicate_tree_structure`

### Snapshot and sync workflows

- `snapshot_directory`
- `diff_snapshots`
- `sync_folders`
- `copy_folder_filtered`

### Structured data workflows

- `read_ndjson`
- `write_ndjson`
- `append_csv_row`
- `json_merge`
- `merge_json_files`

### Permissions and executability

- `get_path_permissions`
- `make_executable`

## Quick Example

```python
from easypath import (
    write_text_atomic,
    backup_file,
    file_checksum,
    snapshot_directory,
    diff_snapshots,
    sync_folders,
    merge_json_files,
)

write_text_atomic("data/config.txt", "version=2\n")
backup = backup_file("data/config.txt")
print("backup:", backup)

digest = file_checksum("data/config.txt")
print("sha256:", digest)

before = snapshot_directory("data", include_checksum=False)
write_text_atomic("data/notes.txt", "hello\n")
after = snapshot_directory("data", include_checksum=False)
print(diff_snapshots(before, after))

print(sync_folders("data", "mirror", delete_extras=False, dry_run=True))
print(merge_json_files("base.json", "override.json"))
```

## Existing Core API

All existing folder/file/path helpers remain available (creation, deletion, move/copy, JSON/CSV read-write, path transforms, permissions, tree listing, and disk usage).

For usage examples across both legacy and new APIs, see [DOCUMENTATION.md](./DOCUMENTATION.md).
