Reading and writing size rotate file.
Project description
# os-rotatefile
[](https://www.travis-ci.org/cfhamlet/os-rotatefile)
[](https://codecov.io/gh/cfhamlet/os-rotatefile)
[](https://pypi.python.org/pypi/os-rotatefile)
[](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.
[](https://www.travis-ci.org/cfhamlet/os-rotatefile)
[](https://codecov.io/gh/cfhamlet/os-rotatefile)
[](https://pypi.python.org/pypi/os-rotatefile)
[](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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
os-rotatefile-0.2.0.tar.gz
(4.9 kB
view details)
File details
Details for the file os-rotatefile-0.2.0.tar.gz.
File metadata
- Download URL: os-rotatefile-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e75987c0270088a1858e1b6db308dafb6c1a07a347ace826bf15f04b9c81d263
|
|
| MD5 |
d5893d28187d3c17c644ea495e8235d9
|
|
| BLAKE2b-256 |
e610441a5aef644e821c12e259bc143f07173530be730542e185d42a9c61fdbc
|