tailer
Python tail is a simple implementation of GNU tail and head.
What it is and what it does
Tailer is a file-reading library that implements GNU tail and head functionality in pure Python. It provides three main functions: tail() to read lines from the end of a file, head() to read lines from the beginning, and follow() to continuously read lines as a file grows. The package also includes pytail, a command-line tool that mimics GNU tail, which can be useful on Windows systems that lack a native tail equivalent.
The library works with any file-like object that supports seek() and tell() operations. It has no external runtime dependencies, making it lightweight to install. However, the package is in Alpha status and has not been updated since 2015, which means it may have compatibility issues with modern Python versions and lacks recent maintenance or bug fixes.
Use it for:
- Read the last N lines from a log file without loading the entire file into memory.
- Implement a tail -f equivalent on Windows to monitor growing log files in real time.
- Extract the first N lines from a file for header inspection or data validation.
- Build a file-monitoring script that continuously reads new lines as they are appended.
- Port Unix shell scripts that rely on tail/head to Windows without external dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Tailer provides functions to read lines from the end, beginning, or continuously from growing files, plus a command-line tool equivalent to GNU tail for systems lacking it.
No, not recommended for new projects. The package is unmaintained since 2015 (Alpha status), with unspecified Python version support and no recent testing on modern Python releases. While the MIT license is permissive and there are no known vulnerabilities, the aging codebase and high install friction due to lack of maintenance make it risky. For modern Python, consider using built-in file handling or actively maintained alternatives.
Install
tailer on PyPI
pip
pip install taileruv
uv add tailerpoetry
poetry add tailerInstalling tailer
Before you install
Installation friction is high; the package has not been updated since 2015 and is classified as Alpha. No runtime dependencies, but the aging codebase and long maintenance gap raise questions about compatibility with modern Python versions.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
import tailer
# Get the last 3 lines of a file
lines = tailer.tail(open('test.txt'), 3)
# ['Line 9', 'Line 10', 'Line 11']
# Get the first 3 lines
lines = tailer.head(open('test.txt'), 3)
# ['Line 1', 'Line 2', 'Line 3']
# Follow a file as it grows
for line in tailer.follow(open('test.txt')):
print(line)
Python version compatibility is unspecified; the package has not been updated since 2015 and may not work with modern Python versions without modification.
Verify before relying
- Whether the package works with Python 3.x versions without modification or compatibility issues.
- Whether the command-line tool pytail is functional and installable on modern systems.
- Current test coverage and whether doctests still pass on recent Python releases.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | aging — 3,901 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 239,031/month — #8,926 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tailer-0.4.1.tar.gz
Keywords: tail, head
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pygtailPygtail reads only the new lines from a log…
copyleft · top 15,000 on PyPI
trampolineEnables recursive functions to bypass Python's…
permissive · top 5,000 on PyPI
file-read-backwardsReads files line-by-line from end to beginning…
permissive · top 15,000 on PyPI
supervisorSupervisor is a client/server system that…
permissive · top 5,000 on PyPI
inotify-simpleA lightweight Python wrapper around the Linux…
permissive · top 5,000 on PyPI
scpProvides file transfer over SSH using the SCP…
copyleft · top 5,000 on PyPI
pipePipe enables shell-like infix syntax for…
permissive · top 15,000 on PyPI
nose-py3nose-py3 extends unittest with automatic test…
copyleft · top 15,000 on PyPI
seekablehttpfileProvides a file-like object that fetches remote…
permissive · top 15,000 on PyPI
pampyPampy provides pattern matching for Python,…
permissive · top 15,000 on PyPI