pylogbeat
Simple, incomplete implementation of the Beats protocol used by Elastic Beats and Logstash.
What it is and what it does
PyLogBeat is a client library that implements the Beats protocol, an Elastic-defined transport mechanism for sending log messages and structured data to Logstash or other compatible services. Unlike raw TCP or UDP, the Beats protocol includes server acknowledgment, so the client knows whether data was received and what needs to be resent, providing higher reliability for log delivery.
The library accepts messages as dictionaries, JSON strings, or bytes, and supports both plain and SSL-encrypted connections. It is intentionally incomplete—the protocol specification is not officially published—and implements the core send-and-acknowledge flow. The package has no external runtime dependencies, making installation straightforward, but it requires Python 3.11 or later and a compatible Logstash version to function.
Use it for:
- Send application logs from Python services to a Logstash beats input with guaranteed delivery acknowledgment.
- Ship structured event data (with timestamps, metadata, and context) to Logstash for centralized log aggregation.
- Replace direct TCP/UDP logging with a protocol that confirms receipt, reducing log loss in production environments.
- Integrate Python applications into an Elastic Stack (Beats/Logstash/Elasticsearch) logging pipeline.
- Use SSL-encrypted connections to send logs securely to a remote Logstash server with certificate validation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyLogBeat sends log messages and structured data to Logstash's beats input plugin or other services implementing the Beats protocol, with server acknowledgment for reliable delivery.
Yes, if you are already using Logstash with beats input and need a Python client. The package is stable, dependency-free, and actively maintained. However, the incomplete protocol implementation and aging maintenance status (264 days since last release) mean it is best suited for straightforward send-and-acknowledge workflows; verify compatibility with your Logstash version and confirm the protocol gaps do not affect your use case before adopting.
Install
pylogbeat on PyPI
pip
pip install pylogbeatuv
uv add pylogbeatpoetry
poetry add pylogbeatInstalling pylogbeat
Before you install
Low friction installation as a pure-Python wheel with no runtime dependencies. Maintenance status is aging—last release was 264 days ago, though the repository remains active and the package is marked Production/Stable.
License in practice
Licensed under Apache License 2.0 (permissive), imposing no significant restrictions on use or distribution in most contexts.
Quickstart
from pylogbeat import PyLogBeatClient
message = {'@timestamp': '2018-01-02T01:02:03', '@version': '1', 'message': 'hello world'}
with PyLogBeatClient('localhost', 5959, ssl_enable=False) as client:
client.send([message])
Requires Python >= 3.11. Logstash server must be >= 5.6.12 or >= 6.4.0 due to a known bug in earlier versions.
Verify before relying
- Whether the Beats protocol implementation is feature-complete or whether gaps beyond 'sending data and waiting for ACK' affect real-world use.
- Current compatibility with recent Logstash versions beyond the documented requirement of Logstash >= 5.6.12 or >= 6.4.0.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 264 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,155,229/month — #4,290 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pylogbeat-2.1.0-py2.py3-none-any.whl
Keywords: logging, logstash, beats
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
python-logstashSends Python log records to Logstash over UDP…
permissive · top 15,000 on PyPI
python3-logstashA Python logging handler that forwards log…
permissive · top 15,000 on PyPI
python-logstash-asyncAsynchronous Python logging handler that…
permissive · top 5,000 on PyPI
logstash_formatterFormats Python logging output as JSON objects…
permissive · top 15,000 on PyPI
JSON-log-formatterFormats Python logging records as JSON,…
permissive · top 5,000 on PyPI
ecs-loggingFormats Python logs as Elastic Common Schema…
permissive · top 5,000 on PyPI
elastic-opentelemetryElastic's customized distribution of…
permissive · top 15,000 on PyPI
pygelfProvides Python logging handlers that send log…
permissive · top 15,000 on PyPI
pygrokParses strings and extracts structured data…
permissive · top 15,000 on PyPI
google-cloud-loggingWrites log entries to Google Cloud Logging and…
permissive · top 1,000 on PyPI