Skip to main content

A library for dealing with splittable files

Project description

# 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
```

Project details


Release history Release notifications

This version
History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.5

History Node

0.1.1

History Node

0.1.0

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
splits-0.1.9.tar.gz (5.5 kB) Copy SHA256 hash SHA256 Source None May 21, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page