Skip to main content

Loglite (Python)

The Python package is a thin convenience layer on top of the loglite C++ core. It provides:

  • CLI (loglite server run, loglite migrate rollout/rollback) — delegates directly to the C++ server via a pybind11 extension (_core).
  • Built-in harvesters — SocketHarvester and (optional) ZMQHarvester.
  • Custom harvesters — subclass loglite.Harvester[Config] to write custom log ingestors in Python. Ingested entries are pushed directly into the C++ server's backlog in the same process.

The C++ core handles everything else: the HTTP server, SQLite read/write, migrations, SSE, and vacuuming. The Python package adds zero server-side overhead.

Installation

Pre-built wheels are published to PyPI:

pip install loglite

# With ZeroMQ harvester support
pip install "loglite[zmq]"

Writing a custom harvester

from dataclasses import dataclass
from loglite.harvesters.base import BaseHarvesterConfig, Harvester

@dataclass
class MyConfig(BaseHarvesterConfig):
    source: str

class MyHarvester(Harvester[MyConfig]):
    async def run(self):
        while self._running:
            log = await fetch_from_somewhere(self.config.source)
            self.ingest(log)  # pushes into the C++ backlog, thread-safe

Register it in your YAML config:

harvesters:
  - type: myapp.harvesters.MyHarvester
    name: my-source
    config:
      source: "tcp://localhost:5000"

Local development

Prerequisites

  • uv
  • Conan 2 — pip install conan && conan profile detect
  • CMake ≥ 3.25
  • A C++20-capable compiler (GCC 12+, Clang 16+, or Homebrew LLVM on macOS)

Build

cd py
uv sync --all-groups

That's it. CMake automatically invokes Conan during the configure step, so no separate Conan command is needed. The first sync compiles the C++ dependencies (SQLite3, Boost headers, yaml-cpp); subsequent syncs use Conan's binary cache and are fast 💪.

For building docs

uv run --group docs sphinx-build -W --keep-going -b html ../docs ../docs/_build/html

Running tests

cd py
uv run pytest                    # all tests
uv run pytest tests/test_cli.py  # single file

Metadata

Release files for loglite 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for loglite 1.3.2
File
loglite-1.3.2-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
loglite-1.3.2-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
loglite-1.3.2-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
loglite-1.3.2-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
loglite-1.3.2-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
loglite-1.3.2-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
loglite-1.3.2-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
loglite-1.3.2-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details

Total release size: 11.6 MB

Release files / loglite-1.3.2-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL loglite-1.3.2-cp313-cp313-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8aa93b9213265d8f1782781833d23f79802ad539c16130e1dd51142192614bfd
BLAKE2b-256 checksum
How to use checksums
ffdbc4771cf385af04fe448f1bd9a609675daf58f5cd48074b6a738adefa7a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / loglite-1.3.2-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL loglite-1.3.2-cp313-cp313-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
9be386305e5e43e70f15b89e4b8b20ea6e67e2c88cd40dd15a0382cda6a3c640
BLAKE2b-256 checksum
How to use checksums
e362bdda536460e55a4a6f6a8a899b50cdff7b713145a0b4649136bd4eb30dc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / loglite-1.3.2-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL loglite-1.3.2-cp312-cp312-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
03309d3869406fde6df4fb94dd6e1fd8341567bb0093e7c5023aae4bd8b3e983
BLAKE2b-256 checksum
How to use checksums
e93ef709b9459deff22194299ce3aca8893a0df7e53870f1729ec2750735daaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / loglite-1.3.2-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL loglite-1.3.2-cp312-cp312-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
c7911ff1d727fa7b0c326a0c5077184ad71956c706832479f116eb5fce22fdd3
BLAKE2b-256 checksum
How to use checksums
532e578ac2e927a0cbf7f892e4d835cf40658527e2611dfe412ff8d3445fa37d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / loglite-1.3.2-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL loglite-1.3.2-cp311-cp311-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
38977e1a7a6894c53269a1cf4ddd60828d273d6a3365605a8829996eac5218d1
BLAKE2b-256 checksum
How to use checksums
ecad8fa50551fb705512d43fa72201acc6e3afecb49c0c8e754483a33bdf4a36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / loglite-1.3.2-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL loglite-1.3.2-cp311-cp311-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
ca79a9ca3eccdcaa8273f74acf98a59e72928291cc4450f304bda9ebf5bf2320
BLAKE2b-256 checksum
How to use checksums
f6efcfda77c58fad5d0d756b476c77bfac8e82e434ebae75fa072b44ccbc66fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / loglite-1.3.2-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL loglite-1.3.2-cp310-cp310-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e94f58b4f119698f9aa1fedf8143b891a57f142701bd14e0f269ec5ec1aa1e4a
BLAKE2b-256 checksum
How to use checksums
e11ba1b434936ee2ecfbd4c25fde97133e1e160782ed496c35643536b2e20d5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / loglite-1.3.2-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL loglite-1.3.2-cp310-cp310-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
b8a64681ef381195f68ee08bcd0682581c86f77fba11304b2786b79ece82f478
BLAKE2b-256 checksum
How to use checksums
fc31442d57e53cb5c86a1bf9521060345a8597d3827d598b8bb7ecc71e0c62eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release history Release notifications | RSS feed

1.4.0

8 release files

1.3.3

8 release files

This release

1.3.2 This release

8 release files

1.3.1

8 release files

1.3.0

8 release files

1.2.0

8 release files

1.1.0

8 release files

1.0.0

8 release files

0.4.1

1 release file

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page