Skip to main content

NiceTrace

NiceTrace is a Python module for user-friendly structured tracing and elegant display of resulting traces. Traces are stored as plain JSON files. NiceTrace support exploring traces of running processes. While designed for generic usage, it's particularly well-suited for tracing experiments with Large Language Models (LLMs).

Documentation

Installation

# For tracing only
pip install nicetrace

# For tracing & displaying traces
pip install nicetrace[server]

Getting started

Here's how to create a simple trace and write it to a JSON file:

from nicetrace import trace, FileWriter

with FileWriter("traces/my_trace.json"):
    with trace("Root node"):
        with trace("Child node", inputs={"x": 10, "y": 20}) as node:
            node.add_output("", "Hello world!")

To start a traceview server over the traces directory:

python3 -m nicetrace.server traces

Then, open your web browser and navigate to http://localhost:4090 to view your traces.

Metadata

Release files for nicetrace 0.4.10

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

Source distribution (sdist)

Source distribution for nicetrace 0.4.10
File Size Uploaded Provenance Actions
nicetrace-0.4.10.tar.gz 750.2 kB Without provenance Details for nicetrace-0.4.10.tar.gz

Built distribution (wheel)

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

Total release size: 870.5 kB

Release files / nicetrace-0.4.10.tar.gz

Download URL nicetrace-0.4.10.tar.gz
Size 750.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7d9d2fbe03375f8f01fc4f077a6f5f802c74756b58422ae932a6bfbad5849fde
BLAKE2b-256 checksum
How to use checksums
0b7c8c19aef6a348a284cae7e948b53d923d1efee0ea443623f8d3143e1efc54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / nicetrace-0.4.10-py3-none-any.whl

Download URL nicetrace-0.4.10-py3-none-any.whl
Size 120.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d8fcc147898d30b625f63b15897491563442cf5e285f8197e97e076e46c1163
BLAKE2b-256 checksum
How to use checksums
6e7765f952b126b75d18d5293b281e599c521e03a102ed787f0a40bbd0435372
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Security for nicetrace 0.4.10

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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