- 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.
- Live browser dashboard, zero setup.
- Filter and sample any stream from the UI.
Installation
Requires Python 3.10+.
pip install nulog
Usage
Two flavors of the same store - pick whichever fits the call site.
Plain Python
import nulog
log = nulog.init("logs.db") # `with nulog.init() 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(),
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}.
UI
A live browser dashboard: filter logs by stream, level, and text, and chart any metric over the last minute, five minutes, hour, and up. New streams and series show up on their own, no restart.
Open any nulog file
nulog view logs.db
Then open http://127.0.0.1:8080. Safe on a file another process is writing.
Serve alongside your Nu app
Add the viewer next to your writes - one process, one port:
import asyncio, nu, nulog
tree = nu.With(
nulog.store("logs.db"),
nulog.ui(port=8080),
body=your_app_body,
)
asyncio.run(nu.arun(tree))
Metadata
Release files for nulog 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nulog-0.1.9.tar.gz | 35.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nulog-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.6 kB
Release files / nulog-0.1.9.tar.gz
| Download URL | nulog-0.1.9.tar.gz |
|---|---|
| Size | 35.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05529576d0edebd5e5a88c59e69332b5dc105c62fe0a7f423ca0bcc333828c16
|
|
BLAKE2b-256 checksum How to use checksums |
d896203f8a16a707efeb122b3f473587e1b024509786512787575cb004d269ae
|
| 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 Sep 15, 2026.
Transparency logRelease files / nulog-0.1.9-py3-none-any.whl
| Download URL | nulog-0.1.9-py3-none-any.whl |
|---|---|
| Size | 33.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4793a62fd70a1238555980a157baf8341551726098be61fff40c15590484360a
|
|
BLAKE2b-256 checksum How to use checksums |
e7ee05975b9ca80b2d5567021a0527f425b7e67660fe4f68bef1f1158122c53b
|
| 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 Sep 15, 2026.
Transparency log