skillfed

python-logstash-async

Asynchronous Python logging handler for Logstash.

python-logstash-async v4.1.0 994.5K downloads/30d#4,553 on PyPI194
Permissive license MIT AGING released

What it is and what it does

Python-logstash-async is a logging handler that integrates Python's standard logging subsystem with Logstash by forwarding log events asynchronously. Instead of blocking the main application thread while sending logs to a remote Logstash instance, it collects events and transmits them in a background worker thread. This is particularly valuable for latency-sensitive applications like web services or APIs where response times matter.

The package depends on limits, pylogbeat, and requests to support its core functionality. It targets Python 3.11 or later and is classified as Beta. With low install friction and no known security vulnerabilities, it is suitable for production use in applications that already run Logstash and need non-blocking log aggregation.

Use it for:

  • Web services or REST APIs that need to log events without introducing latency into request handling.
  • High-throughput applications that generate many log events and would benefit from batching transmission to Logstash.
  • Microservices architectures where centralized log aggregation is required but blocking on log I/O is unacceptable.
  • Background job workers or task queues that must log activity without slowing down job processing.
  • Multi-threaded applications where logging from many threads should not contend for I/O resources.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Asynchronous Python logging handler that collects log events and transmits them to a remote Logstash instance in a separate worker thread, preventing the main application from blocking on log submission.

Yes, if you run Logstash and need non-blocking log submission from Python. The package has low install friction, permissive licensing, no known vulnerabilities, and addresses a real problem in latency-sensitive applications. Maintenance is aging (last release 264 days ago), so verify that the feature set and bug-fix status meet your needs before adopting for new projects.

Install

python-logstash-async on PyPI

pip

pip install python-logstash-async

uv

uv add python-logstash-async

poetry

poetry add python-logstash-async

Installing python-logstash-async

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance status is aging—last release was 264 days ago—but the repository remains active with recent commits and no archived status.

License in practice

MIT license is permissive, imposing no restrictions on commercial or proprietary use; you may use, modify, and distribute this package with minimal legal friction.

Quickstart

pip install python-logstash-async

import logging
from python_logstash_async.handler import AsynchronousLogstashHandler

handler = AsynchronousLogstashHandler('localhost', 5000)
logger = logging.getLogger('myapp')
logger.addHandler(handler)

Requires Python 3.11 or later; Logstash instance must be accessible at the configured host and port.

Verify before relying

  • Whether the package supports TLS/SSL encryption for Logstash connections.
  • Performance characteristics and queue size limits under high-volume logging scenarios.
  • Behavior and data loss guarantees when the worker thread encounters network failures or Logstash downtime.
  • How limits, pylogbeat, and requests dependencies are used in the handler implementation.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 3 — limits, pylogbeat, requests
Maintenance aging — 264 days since the last release
Last repo commit
First released
Downloads 994,478/month — #4,553 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_logstash_async-4.1.0-py2.py3-none-any.whl

Keywords: logging, logstash, asynchronous

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Logging

Tags

logstash logging handlerasynchronous log submissionpython logging to logstashnon-blocking log eventslogstash async handlerremote log aggregationbackground log transmission
logginglogstashasync-handler

More Python Modules packages