Skip to main content

Diagram-as-code: turn a declarative .diagram DSL — or a standard BPMN 2.0 .bpmn file — into animated SVG / WebP.

Project description

kymostudio

Diagram-as-code: turn a declarative .diagram DSL — or a standard BPMN 2.0 .bpmn file — into animated SVG / WebP.

Install

pip install kymostudio
# or
uv tool install kymostudio

Convert (CLI)

kymo path/to/diagram.diagram              # → path/to/diagram.svg
kymo path/to/diagram.diagram --animate    # → path/to/diagram-animated.svg
kymo path/to/diagram.diagram --figma      # → path/to/diagram.figma.js
kymo path/to/diagram.diagram --excalidraw # → path/to/diagram.excalidraw
kymo path/to/process.bpmn                 # → path/to/process.svg (BPMN 2.0)

See samples/ for complete example .diagram and .bpmn files.

BPMN 2.0 import

A standard .bpmn file (from bpmn.io / Camunda Modeler / Signavio …) renders to SVG using the geometry in the file's Diagram-Interchange section — no layout pass runs. See docs/BPMN.md for the element mapping.

from kymo import parse_bpmn, render

diagram = parse_bpmn(open("process.bpmn").read())
svg = render(diagram)

Python API

from kymo import parse, layout, resolve_alignments, render

diagram, layout_spec, external = parse(open("diagram.diagram").read())
if layout_spec:
    layout(diagram, layout_spec, external)
resolve_alignments(diagram)
svg = render(diagram, animate=True)

Develop

uv run --group dev python -m pytest -q       # run the test suite
uv run ../../playground/server.py            # local showcase + playground

License

Apache License 2.0 — see LICENSE.

Project details


Download files

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

Source Distribution

kymostudio-0.2.4.tar.gz (288.1 kB view details)

Uploaded Source

Built Distribution

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

kymostudio-0.2.4-py3-none-any.whl (76.9 kB view details)

Uploaded Python 3

File details

Details for the file kymostudio-0.2.4.tar.gz.

File metadata

  • Download URL: kymostudio-0.2.4.tar.gz
  • Upload date:
  • Size: 288.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kymostudio-0.2.4.tar.gz
Algorithm Hash digest
SHA256 d5efaed27c33e9a7e90c7f36024c925375fae5666c297293420f937a428a1c73
MD5 3956b285fbbfcaf9b711cf521cc82626
BLAKE2b-256 5fac95066a531d0e6cf1493d2c622c03f220c886e017870c9a68fc79bd62f55a

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio-0.2.4.tar.gz:

Publisher: release-pypi.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kymostudio-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: kymostudio-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 76.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kymostudio-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2f57b28f867f296d1e12c045d5c13715be2b4a697cf1c05409278ddc0a29c9ba
MD5 41077facf8ad78edf05347fccb1cf06a
BLAKE2b-256 93c0806a791c0c5dd03d363ed1402945d2fac049fed84dafca1561ef7b79ee8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio-0.2.4-py3-none-any.whl:

Publisher: release-pypi.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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