Registry / observability / eliot
library1.18.0pypypi✓ verified 88d ago

Eliot is a structured logging library for Python designed to capture causality in distributed systems. It allows you to log actions as trees, showing what caused what, and integrates with serialization formats like JSON. Current version 1.17.5, requires Python >=3.9.0. Maintained actively with minor releases every few months.

pip install eliot
INSTALL
IMPORT
SIG · ELIOT
E
eliot
observabilitypythonv1.18.0
Install
2.5s avg
Import
115ms
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.18.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.122s · 22.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.5s · import 0.108s · 24MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

start_action
✓ from eliot import start_action
Action
✓ from eliot import Action
log_call
✓ from eliot import log_call
Message
✓ from eliot import Message
to_file
✓ from eliot import to_file

Initialize Eliot with to_file() and use start_action context managers to log nested actions.

import sys from eliot import start_action, to_file # Send logs to stderr log_file = sys.stderr # If you prefer JSON to a file, use open('log.json', 'w') as f: to_file(f) to_file(log_file) with start_action(action_type="hello"): print("Hello, world!") with start_action(action_type="inner"): pass
Debug
Known issues
gotchaDo not mix Eliot with the standard logging module unless you configure a bridge. Using both simultaneously may result in duplicate log lines or missing log entries.
fix
Use eliot.logging.bridge_logging() to bridge standard logging into Eliot, or set up Eliot as the sole logging system.
affects: >=1.0.0
breakingBefore 1.17.0, the default output was JSON lines. In 1.17.0+, the default changed to human-readable output via to_console() or to_file(). If you rely on JSON parsing, explicitly call to_file(sys.stdout) with a file-like object or set output format.
fix
Replace log_output = sys.stdout with to_file(log_output) in your initialization code. For JSON lines, use to_file(sys.stdout, format='json').
affects: >=1.17.0
gotchaEliot's start_action is a context manager that automatically logs the action's start and end. If you forget to use it as a context manager (e.g., not using 'with'), the action will not be logged correctly and may cause resource leaks.
fix
Always use 'with start_action(...) as action:' and avoid calling start_action without entering the context.
affects: >=1.0.0
deprecatedThe 'eliot.parse' module (eliot.parse_logs) is deprecated as of 1.17.0. Use the eliot-tree CLI tool or parse logs manually with json.loads instead.
fix
Replace from eliot.parse import parse_logs with manual JSON parsing or switch to the external eliot-tree package.
affects: >=1.17.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'eliot'
Eliot is not installed in the current environment.
fix
Run 'pip install eliot' to install the package.
TypeError: to_file() missing 1 required positional argument: 'file'
to_file() is called without providing a file-like object.
fix
Provide a file-like object, e.g., to_file(sys.stderr) or to_file(open('log.json', 'w')).
AttributeError: module 'eliot' has no attribute 'parse_logs'
The parse_logs function was removed in Eliot 1.17.0.
fix
Use the eliot-tree CLI tool or parse JSON lines manually with json.loads.
Upgrade
Version history
1.18.0latest on PyPI · released May 7, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
2
Resources
eliot — pip install eliot · libregistry