===============================
file_read_backwards
===============================
.. image:: https://img.shields.io/pypi/v/file_read_backwards.svg
:target: https://pypi.python.org/pypi/file_read_backwards
.. image:: https://readthedocs.org/projects/file-read-backwards/badge/?version=latest
:target: https://file-read-backwards.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/RobinNil/file_read_backwards/shield.svg
:target: https://pyup.io/repos/github/RobinNil/file_read_backwards/
:alt: Updates
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
--------------
Another example using `python3.11`::
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)
Another way to consume the file is via `readline()`, in `python3.11`::
from file_read_backwards import FileReadBackwards
with FileReadBackwards("/tmp/file", encoding="utf-8") as frb:
while True:
l = frb.readline()
if not l:
break
print(l, end="")
Credits
---------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
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.
2.0.0 (2018-03-23)
------------------
Mimicing Python file object behavior.
* FileReadBackwards no longer creates multiple iterators (a change of behavior from 1.x.y version)
* Adding readline() function retuns one line at a time with a trailing new line and empty string when it reaches end of file.
The fine print: the trailing new line will be `os.linesep` (rather than whichever new line type in the file).
3.0.0 (2023-03-29)
------------------
* Officially support Python 3.7 - 3.11.
3.1.0 (2024-05-02)
------------------
* Officially support Python 3.7 - 3.12
Raw data
{
"_id": null,
"home_page": "https://github.com/RobinNil/file_read_backwards",
"name": "file-read-backwards",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "file_read_backwards",
"author": "Robin Robin",
"author_email": "robinsquare42@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bf/e9/5a3235d4da8be53288fc5bb510d8bab5909fa810beeb4f5c40c3304c8345/file_read_backwards-3.1.0.tar.gz",
"platform": null,
"description": "===============================\nfile_read_backwards\n===============================\n\n\n.. image:: https://img.shields.io/pypi/v/file_read_backwards.svg\n :target: https://pypi.python.org/pypi/file_read_backwards\n\n.. image:: https://readthedocs.org/projects/file-read-backwards/badge/?version=latest\n :target: https://file-read-backwards.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/RobinNil/file_read_backwards/shield.svg\n :target: https://pyup.io/repos/github/RobinNil/file_read_backwards/\n :alt: Updates\n\n\nMemory efficient way of reading files line-by-line from the end of file\n\n\n* Free software: MIT license\n* Documentation: https://file-read-backwards.readthedocs.io.\n\n\nFeatures\n--------\n\nThis package is for reading file backward line by line as unicode in a memory efficient manner for both Python 2.7 and Python 3.\n\nIt currently supports ascii, latin-1, and utf-8 encodings.\n\nIt supports \"\\\\r\", \"\\\\r\\\\n\", and \"\\\\n\" as new lines.\n\nUsage Examples\n--------------\n\nAnother example using `python3.11`::\n\n from file_read_backwards import FileReadBackwards\n\n with FileReadBackwards(\"/tmp/file\", encoding=\"utf-8\") as frb:\n\n # getting lines by lines starting from the last line up\n for l in frb:\n print(l)\n\n\nAnother way to consume the file is via `readline()`, in `python3.11`::\n\n from file_read_backwards import FileReadBackwards\n\n with FileReadBackwards(\"/tmp/file\", encoding=\"utf-8\") as frb:\n\n while True:\n l = frb.readline()\n if not l:\n break\n print(l, end=\"\")\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n\n=======\nHistory\n=======\n\n1.0.0 (2016-12-18)\n------------------\n\n* First release on PyPI.\n\n1.1.0 (2016-12-31)\n------------------\n\n* Added support for \"latin-1\".\n* Marked the package \"Production/Stable\".\n\n1.1.1 (2017-01-09)\n------------------\n\n* Updated README.rst for more clarity around encoding support and Python 2.7 and 3 support.\n\n1.1.2 (2017-01-11)\n------------------\n\n* Documentation re-arrangement. Usage examples are now in README.rst\n* Minor refactoring\n\n1.2.0 (2017-09-01)\n------------------\n\n* Include context manager style as it provides cleaner/automatic close functionality\n\n1.2.1 (2017-09-02)\n------------------\n\n* Made doc strings consistent to Google style and some code linting\n\n\n1.2.2 (2017-11-19)\n------------------\n\n* Re-release of 1.2.1 for ease of updating pypi page for updated travis & pyup.\n\n2.0.0 (2018-03-23)\n------------------\n\nMimicing Python file object behavior.\n\n* FileReadBackwards no longer creates multiple iterators (a change of behavior from 1.x.y version)\n* Adding readline() function retuns one line at a time with a trailing new line and empty string when it reaches end of file.\n The fine print: the trailing new line will be `os.linesep` (rather than whichever new line type in the file).\n\n3.0.0 (2023-03-29)\n------------------\n\n* Officially support Python 3.7 - 3.11.\n\n3.1.0 (2024-05-02)\n------------------\n\n* Officially support Python 3.7 - 3.12\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "Memory efficient way of reading files line-by-line from the end of file",
"version": "3.1.0",
"project_urls": {
"Homepage": "https://github.com/RobinNil/file_read_backwards"
},
"split_keywords": [
"file_read_backwards"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c74fbe7aa2c013c2dc3fd1ab5916eaf2bf11c63ea88811c44c2477c7a9bd9718",
"md5": "1c5b393d805878e8764960c1fa20f5a2",
"sha256": "3dbb65559ca441ea2f5c94121e15e30040fbe9f8b23dff23f979553523c9c303"
},
"downloads": -1,
"filename": "file_read_backwards-3.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "1c5b393d805878e8764960c1fa20f5a2",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 7918,
"upload_time": "2024-05-04T17:43:51",
"upload_time_iso_8601": "2024-05-04T17:43:51.587728Z",
"url": "https://files.pythonhosted.org/packages/c7/4f/be7aa2c013c2dc3fd1ab5916eaf2bf11c63ea88811c44c2477c7a9bd9718/file_read_backwards-3.1.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bfe95a3235d4da8be53288fc5bb510d8bab5909fa810beeb4f5c40c3304c8345",
"md5": "2614aa9f67486aa0a7b75c8c23cd932b",
"sha256": "bd04593bc1938a003224be451d5d735f1f4490e1e70a568ce8d330bb7652a684"
},
"downloads": -1,
"filename": "file_read_backwards-3.1.0.tar.gz",
"has_sig": false,
"md5_digest": "2614aa9f67486aa0a7b75c8c23cd932b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23328,
"upload_time": "2024-05-04T17:43:52",
"upload_time_iso_8601": "2024-05-04T17:43:52.879389Z",
"url": "https://files.pythonhosted.org/packages/bf/e9/5a3235d4da8be53288fc5bb510d8bab5909fa810beeb4f5c40c3304c8345/file_read_backwards-3.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-04 17:43:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RobinNil",
"github_project": "file_read_backwards",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "file-read-backwards"
}