file_read_backwards
Memory efficient way of reading files line-by-line from the end of file
Free software: MIT license
Documentation: https://file-read-backwards.readthedocs.io.
Features
This package is for reading file backward line by line as unicode in a memory efficient manner for both Python 2.7 and Python 3.
It currently supports ascii, latin-1, and utf-8 encodings.
It supports “\r”, “\r\n”, and “\n” as new lines.
Usage Examples
An example of using file_read_backwards for python2.7:
#!/usr/bin/env python2.7
from file_read_backwards import FileReadBackwards
with FileReadBackwards("/tmp/file", encoding="utf-8") as frb:
# getting lines by lines starting from the last line up
for l in frb:
print l
# do it again
for l in frb:
print l
Another example using python3.3:
from file_read_backwards import FileReadBackwards
with FileReadBackwards("/tmp/file", encoding="utf-8") as frb:
# getting lines by lines starting from the last line up
for l in frb:
print(l)
# do it again
for l in frb:
print(l)
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
1.0.0 (2016-12-18)
First release on PyPI.
1.1.0 (2016-12-31)
Added support for “latin-1”.
Marked the package “Production/Stable”.
1.1.1 (2017-01-09)
Updated README.rst for more clarity around encoding support and Python 2.7 and 3 support.
1.1.2 (2017-01-11)
Documentation re-arrangement. Usage examples are now in README.rst
Minor refactoring
1.2.0 (2017-09-01)
Include context manager style as it provides cleaner/automatic close functionality
1.2.1 (2017-09-02)
Made doc strings consistent to Google style and some code linting
1.2.2 (2017-11-19)
Re-release of 1.2.1 for ease of updating pypi page for updated travis & pyup.
Metadata
Release files for file-read-backwards 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| file_read_backwards-1.2.2.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| file_read_backwards-1.2.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 29.5 kB
Release files / file_read_backwards-1.2.2.tar.gz
| Download URL | file_read_backwards-1.2.2.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e615cc1bf8d028c49d5498c200a650a20ee5670f96986e9c7e5995ba669dd9d0
|
|
BLAKE2b-256 checksum How to use checksums |
0bcc57f5f4a071ab753822959c032b66dfb001cc2d3aa75c6cdf66fd5bc457a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / file_read_backwards-1.2.2-py2.py3-none-any.whl
| Download URL | file_read_backwards-1.2.2-py2.py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
63b36fd93656b52e024cc1436fe40f67a270b6359f7259e7ad6a59749b0a6591
|
|
BLAKE2b-256 checksum How to use checksums |
ed6fb27b5c585d15390460248024736e136745ee41cc2a0f5fb509bf33e8ca10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |