Metadata-Version: 2.4
Name: rexpand-pyutils-file
Version: 0.0.7
Summary: Python utilities for file system operations
Project-URL: Homepage, https://github.com/expand-app/rexpand-pyutils-file
Project-URL: Bug Tracker, https://github.com/expand-app/rexpand-pyutils-file/issues
Project-URL: Documentation, https://github.com/expand-app/rexpand-pyutils-file#readme
Author-email: Shuo Feng <shuo.feng@expand.app>
License: MIT
License-File: LICENSE
Keywords: csv,download,excel,file,filesystem,html,io,json
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Requires-Python: >=3.11
Requires-Dist: numpy>=1.24.0
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: flake8>=6.0.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: twine>=4.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# rexpand-pyutils-file

A comprehensive Python utility package for file system operations, providing easy-to-use functions for reading, writing, finding, and downloading files.

## Features

- **File Reading**: Read JSON, CSV, Excel, HTML, text files (including .txt, .log, .md) with a simple API
- **File Writing**: Write data to JSON, CSV, Excel, HTML, and text files with customizable options
- **File Finding**: Find files and folders in directories with filtering options and recursive search
- **File Downloading**: Download files from URLs with automatic extension detection
- **File Compression**: Unzip gzip (.gz) files
- **Path Refinement**: Clean and normalize file paths with cross-platform support

## Installation

You can install the package using pip:

```bash
pip install rexpand-pyutils-file
```

## Usage

```python
from rexpand_pyutils_file import read_file, write_file, find_files

# Read a JSON file
data = read_file("path/to/file.json")

# Write data to a CSV file
write_file("path/to/output.csv", data)

# Find all CSV files in a directory
csv_files = find_files("path/to/directory", file_suffix="csv")
```

## API Reference

### Main Functions

- `read_file(path, verbose=None, encoding=None, excel_sheet_name=None)`: Read a file (supports .json, .csv, .xlsx, .html, .txt, .log, .md)
- `write_file(path, data, verbose=None, encoding=None, csv_and_excel_overwrite=True, csv_fieldnames=None, excel_sheet_name="Sheet1", excel_enable_str_conversion=False)`: Write data to a file
- `download_file(url, file_path_without_extension, verbose=None)`: Download a file from a URL
- `unzip_file(path, output_path=None, verbose=None)`: Unzip a gzip (.gz) file
- `find_files(path, ignored_file_set=None, file_suffix=None, recursive=False)`: Find files in a directory
- `find_folders(path, ignored_folder_set=None, recursive=False)`: Find folders in a directory
- `refine_path(path)`: Refine a path with cross-platform support

## License

This project is licensed under the MIT License - see the LICENSE file for details.
