Socket
Socket
Sign inDemoInstall

async-tail

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-tail

tail -f utility library providing both sync and async interfaces


Maintainers
1

async-tail

CI Coverage pypi license

Asynchronous tailing library written in Rust.


Python wrapper around Rust linemux library, which uses the notify cross-platform filesystem notification library.

Uses PyO3 Rust bindings and PyO3-asyncio to manage Rust/Python event loops lifecycles.

Installation

async-tail requires Python 3.7 - 3.11.

pip install async-tail

Binaries are available for:

  • Linux: x86_64, aarch64, i686, armv7l, musl-x86_64, musl-aarch64, ppc64le & s390x
  • MacOS: x86_64 & arm64 (except python 3.7)
  • Windows: To be done

Otherwise, you can install from source which requires Rust stable to be installed.

Usage

Here are some examples of what async-tail can do:

tail Usage

from async_tail import tail

for line in tail('./path/to/file.log', './path/to/file_2.log'):
    print(line)

atail Usage

import asyncio
from async_tail import atail

async def main():
    async for line in atail('/path/to/file.txt', '/path/to/file_2.txt'):
        print(line)

asyncio.run(main())

Notes

async-tail is a way for me to learn Rust and experiment Rust bindings from Python. It is inspired from the great Samuel COLVIN's work on watchfiles, which provides a Python wrapper around Rust notify crate. This is still under development. More things will come:

  • Write tests
  • Setup proper CI
  • Build wheels for Windows
  • Build and expose docs
  • Provide benchmarks

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc