skillfed

tailer

Python tail is a simple implementation of GNU tail and head.

tailer v0.4.1 239.0K downloads/30d#8,926 on PyPI150
Permissive license MIT AGING released

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 tailer

uv

uv add tailer

poetry

poetry add tailer

Installing 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

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: POSIXProgramming Language :: PythonTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: LoggingTopic :: System :: System ShellsTopic :: System :: Systems AdministrationTopic :: Text Processing

Tags

read last lines from filetail implementation pythonfollow file as it growshead and tail functionsgnu tail alternativefile line readinglog file monitoring
file-operationsunmaintainedcli-tool

More Python Modules packages