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.3

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.3
File
loglite-1.3.3-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
loglite-1.3.3-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
loglite-1.3.3-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
loglite-1.3.3-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
loglite-1.3.3-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
loglite-1.3.3-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
loglite-1.3.3-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
loglite-1.3.3-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details

Total release size: 11.8 MB

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

Download URL loglite-1.3.3-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
012103153d744c93fac71a9cab061088e838505f8451623eb3eef28bfcbdd7e4
BLAKE2b-256 checksum
How to use checksums
2e6cdf77f7babd9013bd2da9c18e460776385df480e2705ee7fb2a901ff09a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

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

Download URL loglite-1.3.3-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
6333eefe489098cc576a0638288d927f75f005513af03a0ad6e03bc57d658a86
BLAKE2b-256 checksum
How to use checksums
3125292d28ecee352c73e9c0870f4ad48c2233e25f9dca8776f0ebe3a904dc82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

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

Download URL loglite-1.3.3-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
acc7adb021cc29bb25b4f348de0f7c8f1d62323524b79f3939005b9fc74f2194
BLAKE2b-256 checksum
How to use checksums
62443c0436b07bc66b148affc565ccce613627b5bad394db765006d2ac8a5893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

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

Download URL loglite-1.3.3-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
3e61ce3fca545278b3af256eabe51c48add18dadfab7b1544005dc9e6b1b5661
BLAKE2b-256 checksum
How to use checksums
d5ffca6b6a01e4d06040a32a6af7265f6257d1780fb57f7c4986e04cf9346944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

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

Download URL loglite-1.3.3-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
17e08e0b576a31dda2ff29c2f82867a4487395b1bf078a91741094d31547ed62
BLAKE2b-256 checksum
How to use checksums
f7ea33617ab8d31808cd79864f10b375090ad412727d9620f98a2cf2148a8312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

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

Download URL loglite-1.3.3-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
fe806e89a602866591929dd67d72bc32fc39f528a061868a5d8c3f0b397128c7
BLAKE2b-256 checksum
How to use checksums
9ae10879792b0bc152fcbf147a06097646b7f24a2367ece6c1e5eae84e012dc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

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

Download URL loglite-1.3.3-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
b674271145976c5a9f5faf3cfea4b170005ee4f1eb39b4a43f317b38bbe63929
BLAKE2b-256 checksum
How to use checksums
88812699007dbf087b04f194a5beba5e162e6916730b02c1345395d4d2356bca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

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

Download URL loglite-1.3.3-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
b91cf6fa46fca0aaa5869ff41c3262e2dbfc0574bec03b721c7a78cc12b5baea
BLAKE2b-256 checksum
How to use checksums
33dd83d24c7300072ae26f55b99d8d62ef4daf3233c6c63bdae4cdc095c333a4
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

This release

1.3.3 This release

8 release files

1.3.2

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