Skip to main content

nulog

Fast, serverless logger built on Nu, for infinite-scale streams

Powered by Nu PyPI - Python Version PyPI Package


  • Append-only logs and metric series in one library.
  • Serverless and in-process: no daemon, no extra service to run.
  • Billions of entries per stream, reads stay fast at any size.
  • Watch any store live from a nuspace space: one Log plane per store, as many as you like.

Installation

Requires Python 3.10+.

pip install nulog            # the logger
pip install "nulog[space]"   # and the Log planes, to watch it in nuspace

Usage

Two flavors of the same store, pick whichever fits the call site. A store is a RocksDB directory on disk.

Plain Python

import nulog

log = nulog.init("logs.db")  # `with nulog.init("logs.db") as log:` works too.

log.info("server started", stream="app", extra={"port": 8080})
log.warning("cache miss", stream="app", extra={"key": "user:42"})
log.error("request failed", stream="app", extra={"path": "/checkout"})
log.observe("cpu_load", 0.42)

print(log.tail("app", 3))
print(log.sample("cpu_load", 10))

log.close()

Native Nu

import nu, nustd, nulog

app = nulog.getLogger("app")

tree = nu.With(
    nulog.store("logs.db"),
    body=nustd.kv.Transaction(
        app.info("server started", extra={"port": 8080})
        >> app.warning("cache miss", extra={"key": "user:42"})
        >> app.error("request failed", extra={"path": "/checkout"})
        >> nulog.observe("cpu_load", 0.42),
    )
    >> nustd.kv.Snapshot(nu.print("tail:", nulog.messages.tail("app", 3)))
    >> nustd.kv.Snapshot(nu.print("cpu:", nulog.metrics.sample("cpu_load", 10))),
)

nu.run(tree)

Read atoms both flavors expose:

  • Messages: tail(stream, n), slice(stream, start, stop, step=1).
  • Metrics: range(name, begin_us, end_us), sample(name, n, begin_us=None, end_us=None).

Log rows: {"ts_us": int, "level": str, "msg": str, "fields": dict}. Metric rows: {"ts_us": int, "ts": float, "value": float}.

Watch it live

Install nulog[space] and open a space: Log shows under +. Each Log plane reads one store, set on its own Config plane, so one space can watch many stores side by side.

Plane What
Log Every stream with its newest entry, every series with its latest point
Messages One stream, newest or oldest first, filtered by level and text. Click a row to see the entry whole
Metrics One series over a window, charted from a kh57 sample: the same cost at a thousand points or a billion
Config The store's path, how often to read it, how much. A save takes effect at once, no restart

The planes open the store read only, as a RocksDB secondary, so they are safe on a store your program is still writing. See examples/nu_live.py for a program that keeps writing one.

Metadata

Release files for nulog 0.2.1

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

Source distribution (sdist)

Source distribution for nulog 0.2.1
File Size Uploaded Provenance Actions
nulog-0.2.1.tar.gz 29.8 kB With provenance Details for nulog-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nulog 0.2.1
File Interpreter ABI Platform Actions
nulog-0.2.1-py3-none-any.whl Python 3 none any Details for nulog-0.2.1-py3-none-any.whl

Total release size: 69.6 kB

Release files / nulog-0.2.1.tar.gz

Download URL nulog-0.2.1.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
51bc0721bf00b2745c52fd9fd4bba109cf5781acfeede7a965c9fecbdda5ac1d
BLAKE2b-256 checksum
How to use checksums
90c80859f51627dc63d00399ade082b14fc4602252adb0657a42f4a8a17b03d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / nulog-0.2.1-py3-none-any.whl

Download URL nulog-0.2.1-py3-none-any.whl
Size 39.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0651536c89c8de9aba5b58794ac9ddfd884977d279252fa3413e7c26fe9500e
BLAKE2b-256 checksum
How to use checksums
23ba3092cf17955ba5de29b43fc3f1f3f8ed8a12938480ceed17679d485923d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for nulog 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nulog-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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