Skip to main content

anywidget-archimate

Interactive ArchiMate model viewer for Jupyter, Marimo, and VS Code notebooks.

Renders ArchiMate models from Open Exchange Format XML or Archi .archimate files, or from Python data, with a layered layout:

  • Yellow: Business layer (top)
  • Blue: Application layer (middle)
  • Green: Technology layer (bottom)
  • Grey: Other (any other layer)

Draws all 11 ArchiMate relationship types with their notation, and nests elements joined by Composition or Aggregation.

anywidget-archimate demo

Install

uv add anywidget-archimate

Usage

from anywidget_archimate import ArchiMate

# From an XML file
widget = ArchiMate.from_xml("model.xml")
widget
# Or load later
widget = ArchiMate()
widget.load_xml("model.xml")

From Python data

widget = ArchiMate(
    elements=[
        {"id": "a1", "name": "Web shop", "type": "ApplicationComponent", "layer": "Application", "documentation": ""},
        {"id": "t1", "name": "App server", "type": "Node", "layer": "Technology", "documentation": ""},
    ],
    relationships=[
        {"id": "r1", "source": "t1", "target": "a1", "type": "Serving", "name": ""},
    ],
    height=500,
)
  • layer is Business, Application, Technology or Other, in any case; an element with another or no layer is drawn under Other.
  • type is an ArchiMate element type such as BusinessProcess or DataObject; types without their own icon draw as a plain box.
  • Relationship type is one of Composition, Aggregation, Assignment, Realization, Serving, Access, Influence, Triggering, Flow, Specialization or Association.
  • Names, documentation and the other values are shown as text, never as HTML.

Selection and highlights

Clicking an element sets selected_element to its dict and opens its details. The host can also select or outline elements:

widget.selected_element = {"id": "a1"}  # a dict with at least the id
widget.highlight_ids = ["a1", "t1"]     # outline several elements
widget.observe(lambda change: print(change["new"]), names="selected_element")

Comparison styling

To show several runs of one model, give elements and relationships an optional status:

status Element Relationship
partial dashed and faded faded
changed amber fill amber line
only_a red fill red line
only_b green fill green line
ghost very faint and dashed very faint

stable or no status draws as usual. An optional badge on an element (for example "2/3") is drawn in its top left corner; text longer than 26 characters is cut.

Toolbar

The toolbar opens the filter panel (hide layers, element types and relationship types, or turn off nesting), uploads an .xml or .archimate file, exports the diagram as SVG or PNG, fits the diagram to the view and switches between light and dark. The theme follows the host page (marimo, Jupyter, VS Code, or the operating system) unless you choose one: pass dark_mode=True or dark_mode=False, set widget.dark_mode, or use the toolbar switch.

Development

git clone https://github.com/StevenBtw/anywidget-archimate.git
cd anywidget-archimate
uv sync
uv run pytest

The examples/demo_marimo.py example needs marimo, which is an optional extra:

uv sync --extra examples

License

Apache-2.0

Metadata

Release files for anywidget-archimate 0.4.0

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

Source distribution (sdist)

Source distribution for anywidget-archimate 0.4.0
File Size Uploaded Provenance Actions
anywidget_archimate-0.4.0.tar.gz 246.9 kB With provenance Details for anywidget_archimate-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anywidget-archimate 0.4.0
File Interpreter ABI Platform Actions
anywidget_archimate-0.4.0-py3-none-any.whl Python 3 none any Details for anywidget_archimate-0.4.0-py3-none-any.whl

Total release size: 345.8 kB

Release files / anywidget_archimate-0.4.0.tar.gz

Download URL anywidget_archimate-0.4.0.tar.gz
Size 246.9 kB
Tags Source
SHA-256 checksum
How to use checksums
361b1857f649b9bb526d67a7c70d0cfeab9528f02f448624cfe490ce742d0061
BLAKE2b-256 checksum
How to use checksums
6e84e04f90da13baab717e49b2b47f175a1e944087c51ec92d3e189090c5b647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / anywidget_archimate-0.4.0-py3-none-any.whl

Download URL anywidget_archimate-0.4.0-py3-none-any.whl
Size 98.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbd932948304ee721e6be57a28008ac8497f24ad0a81f5241a56aee8b385b3e9
BLAKE2b-256 checksum
How to use checksums
719b1cdb53c57727db6fb5449e827ff828ecedc45c113507d86f5eeb68f2f7aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for anywidget-archimate 0.4.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for anywidget_archimate-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

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