A Python package that allows you to split CSV files
pip install datashearfrom datashear import Splitter
# Split by number of rows
splitter = Splitter("large_file.csv", output_dir="output")
splitter.by_rows(1000) # 1000 rows per file
# Split by file size
splitter.by_size(1024*1024) # 1MB per file- Clone the repository:
git clone https://github.com/HakumenNC/datashear.git
cd datashear- Install in development mode:
pip install -e ".[dev]"Writing tests means you don’t trust your code.
Running test with pytest
pytestpytest --cov=src --cov-report=xmlThe pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries.
https://docs.pytest.org/en/stable
- Method and function level setup/teardown
- Asserting with the assert statement
- Assertions about expected exceptions
Codecov doesn’t just measure code coverage—it helps you improve code quality at every step.
Build the package:
python -m buildPublishing with twine via github-actions on release
MIT License - see LICENSE file for details.