python-logstash-async
Asynchronous Python logging handler for Logstash.
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-asyncuv
uv add python-logstash-asyncpoetry
poetry add python-logstash-asyncInstalling 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
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
python3-logstashA Python logging handler that forwards log…
permissive · top 15,000 on PyPI
pylogbeatPyLogBeat sends log messages and structured…
permissive · top 5,000 on PyPI
python-logstashSends Python log records to Logstash over UDP…
permissive · top 15,000 on PyPI
nexus-rpcNexus Python SDK provides a framework for…
permissive · top 1,000 on PyPI
asyncprawAsync PRAW provides asynchronous access to…
permissive · top 15,000 on PyPI
logging-azure-restProvides a Python logging handler that…
permissive · top 5,000 on PyPI
seqlogSeqLog sends Python log records to Seq, a…
permissive · top 15,000 on PyPI
logstash_formatterFormats Python logging output as JSON objects…
permissive · top 15,000 on PyPI
logzio-python-handlerA Python logging handler that sends logs in…
permissive · top 5,000 on PyPI
JSON-log-formatterFormats Python logging records as JSON,…
permissive · top 5,000 on PyPI