Skip to main content

file_read_backwards

https://img.shields.io/pypi/v/file_read_backwards.svg https://img.shields.io/travis/robin81/file_read_backwards.svg?branch=master Documentation Status Updates

Memory efficient way of reading files line-by-line from the end of file

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

Metadata

Release files for file-read-backwards 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for file-read-backwards 1.2.1
File Size Uploaded
file_read_backwards-1.2.1.tar.gz 20.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for file-read-backwards 1.2.1
File Interpreter ABI Platform
file_read_backwards-1.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 29.3 kB

Release files / file_read_backwards-1.2.1.tar.gz

Download URL file_read_backwards-1.2.1.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3bd1519f1baa8beb867dfb209c3349a37b38f2042c19bb582aa000a3565c35d1
BLAKE2b-256 checksum
How to use checksums
1a66c0e4035d893b455f6fdbff14b56d12eb24c1950a33a28388457bcd944843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / file_read_backwards-1.2.1-py2.py3-none-any.whl

Download URL file_read_backwards-1.2.1-py2.py3-none-any.whl
Size 8.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9599ab00162c08cec6eb87e3376e0a1facc9bd2d99852bc4a0a4e410eed5aa69
BLAKE2b-256 checksum
How to use checksums
a83d47e447abc608884f6f9c780bc8d8cfdea8bf5b688359d47f139c43ed275d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.2.2

2 release files

This release

1.2.1 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page