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.1.tar.gz (16.4 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.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slough-0.2.1.tar.gz
  • Upload date:
  • Size: 16.4 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.1.tar.gz
Algorithm Hash digest
SHA256 5f3d320639770372535ead3533035be036b6a7e1abba085eb0e79190a34f84b0
MD5 61509099b11b7baa07b69c8dea3f2ff4
BLAKE2b-256 a314a9d964c0f20875d4edab4497c103f0af27ac67247e88c7c57858724c8fae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slough-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa137d1d2337fcc4c970ee688aaf52f18f2aa52c0bf10190837fa83eae6da71c
MD5 2f5024e232e6ca096ddaefa266b07ca9
BLAKE2b-256 27624717634289a300b8d78c8d54a67de0119c3f100c3ee20a1a9b80fda8aa0d

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