Skip to main content

slough

Experimental toy library to dry-run Python code — traces every variable value line-by-line through execution.

Usage

# Text output with variable annotations
slough path/to/solution.py -t test_cases.json

# Generate a turtle animation of the trace
slough path/to/solution.py -t test_cases.json -a animation.py
python animation.py

How it works

Hooks sys.settrace before calling your solution function, recording locals at each line. Outputs source code with live variable annotations and pass/fail for each test case.

Install

uv tool install slough

Status: Experimental. Not intended for production use.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slough-0.2.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slough-0.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file slough-0.2.0.tar.gz.

File metadata

  • Download URL: slough-0.2.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for slough-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1990b40fbd0b9c8c86494893ec43910c211d815f15abba4e1c70ec765cf0e636
MD5 a56d7abd2c33aa8c9fb9658fcc68cbed
BLAKE2b-256 d7f67d1c60370521b4abf97e5e0feb7971f99b7277478b7938dd6b308324644a

See more details on using hashes here.

File details

Details for the file slough-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: slough-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for slough-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58936f674c1f45bb7ade808fd6f76f05436c0b3d7c845854ba1704cf82d4ec4d
MD5 e26b0067eaf142372082226e68451e02
BLAKE2b-256 06978cf97bde0b3e42a8753ca419ab1e123faa7bc41c64d4378d294ccb9030f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page