--- id: python-logstash version: "0.4.8" license: MIT license_treatment: permissive maintenance: dormant --- # python-logstash — Python logging handler for Logstash. License: permissive · Maintenance: dormant · Downloads: 629.3K/mo ## What it is and what it does python-logstash is a Python logging handler that bridges your application's logs to Logstash by formatting log records as JSON and sending them over UDP or TCP. It integrates directly with Python's standard logging module, allowing you to attach it to any logger and forward events to a Logstash instance for centralized aggregation, parsing, and analysis. The handler supports custom fields via the logging `extra` parameter, multiple transport protocols (UDP, TCP, AMQP), and can be configured in Django settings for framework-level integration. The package has been dormant since March 2022, with no active maintenance or recent releases. While the repository remains archived-free and the code is stable for basic use cases, it has not been updated to address modern Python versions or Logstash schema changes that may have occurred in the past four years. Installation requires building from source, which adds friction compared to pre-built wheels. Use it for: - Forward application logs from a Python service to a centralized Logstash instance for aggregation and analysis. - Integrate Django application logging with Logstash by configuring the handler in Django's LOGGING settings. - Send structured log events with custom fields (strings, booleans, dicts, lists) to Logstash for enriched log analysis. - Route logs through AMQP to Logstash when direct UDP/TCP is not available or when message queuing is required. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sends Python log records to Logstash over UDP or TCP, formatting them as JSON events compatible with Logstash's input pipeline. Yes, with conditions. The package is stable and permissively licensed, with no known vulnerabilities and a straightforward integration path. However, dormant maintenance since 2022 and source-only distribution create friction. Install only if you are already committed to Logstash and can tolerate the lack of active support; do not rely on it for new projects where you need ongoing compatibility updates or modern Python version guarantees. ## Install pip install python-logstash uv add python-logstash poetry add python-logstash ## Installing python-logstash Before you install: High install friction due to source-only distribution. Maintenance is dormant: last release was 2022-03-30, over 1598 days ago, though the repository remains active with 462 stars and a final commit on 2024-08-02. No runtime dependencies to manage. License in practice: MIT license is permissive and poses no restrictions on use, modification, or redistribution in proprietary or open-source projects. Quickstart: pip install python-logstash import logging import logstash test_logger = logging.getLogger('test') test_logger.setLevel(logging.INFO) test_logger.addHandler(logstash.LogstashHandler('localhost', 5959, version=1)) test_logger.info('Test message') Requires a running Logstash instance listening on the specified host and port; AMQP handler requires pika to be installed separately. Verify before relying: - Whether Python 3.8+ compatibility has been validated since the last release in 2022. - Current status of AMQP handler reliability and whether pika dependency is actively maintained. - Whether the package works with modern Logstash versions beyond those tested during active development. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 629.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags logstash logging handler, send logs to logstash, python logstash integration, logstash json formatter, centralized log aggregation, udp tcp logging handler, log-aggregation, logstash-integration [View on SkillFed](https://skillfed.io/packages/python-logstash) · [View on PyPI](https://pypi.org/project/python-logstash/)