Skip to main content
# Splits

Splits is a library for reading and writing files in splittable chunks.
It works on any file-like object.
There is built in support for writing and reading split files from S3.
It also has built in support for gzip.

## Installation

```
$ pip install splits
```

## Usage

```python
from splits import SplitWriter, SplitReader
from splits.s3 import S3File, GzipS3File

if __name__ == '__main__':

with SplitWriter('s3://test-bucket/test-multifile',
suffix='.txt', lines_per_file=100,
fileClass=GzipS3File) as w:
w.writelines([str(x) for x in range(0, 1000)])

with SplitReader('s3://test-bucket/test-multifile',
fileClass=GzipS3File) as r:
for line in r:
print line

```

## Tests

```
$ pip install tox
```

To run the tests in both Python2 and Python3 run,

```
$ tox
```

Metadata

Release files for splits 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splits 0.1.9
File Size Uploaded
splits-0.1.9.tar.gz 5.5 kB Details

Release files / splits-0.1.9.tar.gz

Download URL splits-0.1.9.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0d599bdf25482d0a9cb8a5b095542fe3cdf2c4bc8bd13e8ef3cb2b83f7e36678
BLAKE2b-256 checksum
How to use checksums
5d81bc07f052628e2a035ab2b3dae55bb9cb15cf0d9cfde83936cbd504a1e977
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.9 This release

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.5

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page