os-rotatefile

Reading and writing size rotate file.


Keywords
file
License
MIT
Install
pip install os-rotatefile==0.1.0

Documentation

os-rotatefile

Build Status codecov PyPI - Python Version PyPI

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(b'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.