Lightweight log service — Python CLI and harvester layer over the loglite C++ core
Project description
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 —
SocketHarvesterand (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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loglite-1.3.1-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: loglite-1.3.1-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebb987542f153d766ed04b78f5a4c58ccfd78f2c9aa1bba0c3df6c49337642bd
|
|
| MD5 |
e8b9349fd14da4b163ded2716a64748f
|
|
| BLAKE2b-256 |
423f609cc7be798e5529231677d399400a661de161d1a05f667850ed57e1ffd3
|
File details
Details for the file loglite-1.3.1-cp313-cp313-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: loglite-1.3.1-cp313-cp313-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22215687a7a466f25599427656170129b12c595215e0e7bea0e30fda04a39985
|
|
| MD5 |
83d19aa76a5ad07a35a0bac3c2049ff0
|
|
| BLAKE2b-256 |
04a27856b95e0a99e6976fac037c88c0306033d8e619bde86b23406afbfbc0a4
|
File details
Details for the file loglite-1.3.1-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: loglite-1.3.1-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b684057768dc83d0324509eb675588a55fb964d1f451a7bea24373076b62bc86
|
|
| MD5 |
be525469a95b563e12306979ca17d0af
|
|
| BLAKE2b-256 |
5ea944fda07000626e5734d4723c09556b7fcd78fdfbd44fbb2dba9c16197c00
|
File details
Details for the file loglite-1.3.1-cp312-cp312-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: loglite-1.3.1-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8d62ded08d5147e66dfc82f01525b1d7d03ba88971a25a39a2a3eb03c7abbbc
|
|
| MD5 |
c55c706647ed4703de0591491ec881f8
|
|
| BLAKE2b-256 |
9150cdbac96b5d82272b81b6f519e10fdb10d908c7ad0ec5ced8445f865f413d
|
File details
Details for the file loglite-1.3.1-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: loglite-1.3.1-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee6bbde599e8c70a8ca8056a4ed740ae43de994af5e2b7a597591f4955e47adc
|
|
| MD5 |
b9d10273094ca15b27b89d2af5c3f358
|
|
| BLAKE2b-256 |
6d0becd616c6ab405e541551e98ce622f9bb9adf2946740cbc1387ed22f5d875
|
File details
Details for the file loglite-1.3.1-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: loglite-1.3.1-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c71b6007a7087dbab3d3627562d447092f9adfe2f8d4246ba08caaacc931a328
|
|
| MD5 |
c46096c8616dfef9a6abb5ce75d1f4c4
|
|
| BLAKE2b-256 |
f0ccd87046c6b270ee99bb2da4e4d315f30278722d25fff86499fddd547f62da
|
File details
Details for the file loglite-1.3.1-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: loglite-1.3.1-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7780193d464911b526b146a0d21ff31e7759dddcf3160213c93dc32d179309d
|
|
| MD5 |
44281a8257452968c6ad919c1e4a88e4
|
|
| BLAKE2b-256 |
6a14f952c0a81f287941bc2f7bf14a8b1fc7c8ff4a35389df3b7989a864c4457
|
File details
Details for the file loglite-1.3.1-cp310-cp310-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: loglite-1.3.1-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da605355ba1592e04978564b21b2b72885c8f279e967089feacb4516bf8c8c50
|
|
| MD5 |
d5b0a677a0f0a21e7840c3c3a61bafbe
|
|
| BLAKE2b-256 |
2171863b063b422d28586f77d022b84f13a0cce77c2dbab2b984f6c83ceea8c1
|