Skip to main content

sPyTial: Lightweight Diagrams for Structured Python Data

PyPI version Python versions License: MIT CI Docs

pip install spytial-diagramming

Docs: https://sidprasad.github.io/spytial/ — start with Getting Started for install, badges, and your first diagram.


Sometimes you just want to see your data.

You're working with a tree, a graph, a recursive object — maybe an AST, a neural network, or a symbolic term. You don't need an interactive dashboard or a production-grade visualization system. You just need a diagram that lays it out clearly so you can understand what's going on.

That's what sPyTial is for. It is designed for developers, educators, and researchers who work with structured data and need to make that structure visible — to themselves or to others — with minimal effort.

Why spatial layout

Spatial arrangement helps people understand structure: when elements are grouped, aligned, and oriented meaningfully, patterns and errors become easier to see. sPyTial gives you that layout by default — the diagram reflects how the parts are connected, not how they happen to be stored.

You get:

  • a box-and-arrow diagram that shows the shape of your data
  • a layout driven by declarative constraints (orientation, align, cyclic, group)
  • a tool that flags when a constraint can't be satisfied

Quick start

import spytial

data = {
    "name": "root",
    "children": [
        {"value": 1},
        {"value": 2},
        {"value": 3},
    ],
}

# Opens in a browser tab, or inline in a Jupyter notebook.
spytial.diagram(data)

# Or save to a file:
spytial.diagram(data, method="file")

Not sure where to start with a class of your own? from spytial.suggest import suggest then suggest(MyClass) reads the class and scaffolds a starting set of layout directives you can edit — see Suggesting Specs.

For stepping through sequences of states, custom relationalizers, and annotation-driven layouts, see the docs.

Related projects

  • spytial-clrs — a Jupyter notebook collection that implements the data structures from the CLRS algorithms textbook (Cormen, Leiserson, Rivest, Stein) using sPyTial: heaps, linked lists, hash tables, BST / red-black / B / van Emde Boas trees, disjoint-set forests, graphs with MST and SCC views, and more. The best place to see sPyTial on realistic structures.
  • spytial-core — the browser-side rendering engine sPyTial uses under the hood. Shared across all sPyTial language hosts (Python, Rust, Pyret, Lean).

License

MIT — see LICENSE.

Download files

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

Source Distribution

spytial_diagramming-1.11.2.tar.gz (566.1 kB view details)

Uploaded Source

Built Distribution

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

spytial_diagramming-1.11.2-py3-none-any.whl (382.9 kB view details)

Uploaded Python 3

File details

Details for the file spytial_diagramming-1.11.2.tar.gz.

File metadata

  • Download URL: spytial_diagramming-1.11.2.tar.gz
  • Upload date:
  • Size: 566.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for spytial_diagramming-1.11.2.tar.gz
Algorithm Hash digest
SHA256 413f938510d827eb1810f37200a2f84aa94308299a9ca0498ffd6b8782cddcfb
MD5 b3487c10b94bfc0b224a9ae1f61dfb0a
BLAKE2b-256 3fdc66d6b510c631d3f6a3e8693476f61d29243a146404364870f4abe9dac80a

See more details on using hashes here.

File details

Details for the file spytial_diagramming-1.11.2-py3-none-any.whl.

File metadata

File hashes

Hashes for spytial_diagramming-1.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec69d1f604d24ffe00d940042dff2f8b86bddc4686d5d688bfd552ca927e4be5
MD5 6461d32cb28ffcc888e824ea9c770a86
BLAKE2b-256 1e1adc08e444e005d2abc2636a18b2955d43bd08b3676bca8f0ed4c274f4e535

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

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