Skip to main content

Reading and writing size rotate file.

Project description

# os-rotatefile
[![Build Status](https://www.travis-ci.org/cfhamlet/os-rotatefile.svg?branch=master)](https://www.travis-ci.org/cfhamlet/os-rotatefile)
[![codecov](https://codecov.io/gh/cfhamlet/os-rotatefile/branch/master/graph/badge.svg)](https://codecov.io/gh/cfhamlet/os-rotatefile)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/os-rotatefile.svg)](https://pypi.python.org/pypi/os-rotatefile)
[![PyPI](https://img.shields.io/pypi/v/os-rotatefile.svg)](https://pypi.python.org/pypi/os-rotatefile)

Read and write size rotate file.

# Install
`pip install os-rotatefile`

# Usage
* Write
```
from os_roatefile import open_file

f = open_file('file', 'w', roll_size='1G')
f.write('Your data')
f.close()
```
* Read
```
from os_roatefile import open_file

f = open_file('file', 'r', buffer_size='128K')
f.readline()
f.read(100)
if not f.read():
f.close()
```


# Unit Tests
`$ tox`

# License
MIT licensed.

Project details


Release history Release notifications

This version
History Node

0.2.0

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

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
os-rotatefile-0.2.0.tar.gz (4.9 kB) Copy SHA256 hash SHA256 Source None Mar 19, 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