skillfed

pylogbeat

Simple, incomplete implementation of the Beats protocol used by Elastic Beats and Logstash.

pylogbeat v2.1.0 1.2M downloads/30d#4,290 on PyPI17
Permissive license Apache License 2.0 AGING released

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 pylogbeat

uv

uv add pylogbeat

poetry

poetry add pylogbeat

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Logging

Tags

logstash beats protocol clientreliable log shippingbeats protocol implementationlogstash data transportelastic beats integrationlog delivery with acknowledgmentpython logstash client
logstash-integrationlog-shippingbeats-protocol

More Python Modules packages