filesplit is a Python module designed for splitting large files into smaller, manageable chunks and subsequently merging them back together. It supports splitting by size, number of chunks, or number of lines, and works with both text and binary files. The current version is 4.1.0, and it maintains an active, somewhat regular release cadence for minor improvements and bug fixes, with major versions introducing breaking changes.
pip install filesplitVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a dummy file, split it into smaller chunks using `Filesplit.split_by_size`, and then merge those chunks back into a single file using `merge_files`. It includes cleanup of all generated files and directories.
Update method calls from generic `split()` or `split_by_encoding()` to `fs.split_by_size()`, `fs.split_by_chunks()`, or `fs.split_by_lines()` depending on your splitting criteria. Refer to the official documentation for the updated method signatures.
Ensure you are importing and instantiating `Filesplit` (capital F) instead of `FileSplit`. If using `splitbyencoding()`, refactor to use the `split()` method (for v3.x) or the more specific `split_by_...` methods (for v4.x and above).
Ensure your project is running on Python 3.x. The library supports Python versions 3.0 to 3.11.
Before calling a split method, use `os.makedirs(output_dir, exist_ok=True)` to ensure the target directory for split files exists.
No dependency data recorded yet.