Skip to main content

Python-Capellambse

PyPI - Python Version Code QA License: Apache-2.0 REUSE status Code style: ruff

A Python 3 headless implementation of the Capella modeling tool

Intro

capellambse allows you reading and writing Capella models from Python without Java or the Capella tool on any (reasonable) platform. We wanted to "talk" to Capella models from Python, but without any Java on the way. We thought this project will help individuals and organisations getting through the MBSE adoption journey with Capella faster and so we made it public and open-source.

With capellambse you can access all (or almost all) Capella model elements, and render diagrams as SVG and PNG. We made it for automation of Systems Engineering work, so it integrates nicely into most CI/CD toolchains. We also found it at the core of our artifact generation pipelines (model to documents, model to SW interfaces).

The library works with PVMT and Requirements extensions without any additional efforts.

It started as a basic library somewhere mid 2019. Since then it was re-architected a few times and now has a full read/write capability for most of the present Capella ontology. We are continuously improving the API (introducing shortcuts), increasing the meta-model coverage and have more engineering automations and improvements in the pipeline to share.

  • capellambse-context-diagrams — A capellambse extension that visualizes the context of Capella objects, and exposes it on element attributes like .context_diagram, .tree_view, etc.

  • capella-diff-tools — A set of tools to compare Capella models.

  • capella-polarion — Synchronize information from the Capella model into a Polarion project

  • capella-ros-tools — Import and export ROS *.msg files to/from Capella models, or transform *.msg files into a declarative YAML file.

Did you make something cool that is using or extending capellambse? Tell us about it, so we can add it to this list!

Documentation and examples

The library is designed to be easy to use and discover, especially in an interactive environment such as JupyterLab. Additionally, API documentation is automatically generated and published whenever new features and bug fixes are added.

You are encouraged to explore our test models and demo notebooks. Click on the button below to launch a Jupyter notebook server on the public myBinder service, and get started in seconds:

myBinder

Warning: Do not enter confidential information, such as passwords for non-public models, into a notebook hosted on myBinder. If you want to try out capellambse with those models, please install and run it in a local, trusted environment!

The docs/source/examples directory contains several hands-on example notebooks that you can immediately run and start experimenting with. Below is a short summary of each notebook's goal. If you are in the JupyterLab environment, you can click the notebook names to directly open them in a new lab tab. On Github, you will be shown a statically rendered preview of the notebook.

  • 01 Introduction.ipynb provides a high-level overview of the library features. It visualizes examples like a Component - Function allocation table by leveraging Jupyter's and IPython's rich display functionality.

  • 02 Intro to Physical Architecture.ipynb explores some more advanced concepts on the example of the Physical Architecture Layer. It shows how to derive tabular data, like a Bill of Materials or a Software to Hardware allocation table, by using pandas dataframes.

  • 03 Data Values.ipynb shows how the API can be used to explore classes, class instances and other objects related to data modeling.

  • 04 Intro to Jinja templating.ipynb demonstrates how to effectively combine capellambse with the powerful Jinja templating engine. This enables the creation of all sorts of model-derived documents and artifacts, including interactive web pages, PDF documents and any other textual representations of your models.

  • 05 Introduction to Libraries.ipynb shows how to use Capella Library Projects within capellambse. In this example you'll learn how the API can be used to open a project that is based on a library and find objects in both models.

  • 06 Introduction to Requirement access and management.ipynb shows how the API can be used to work with requirements objects, introduced by the Capella Requirements Viewpoint. In this example you'll see how to find requirements in the model, see which objects requirements are linked / traced to and even export requirements to Excel or ReqIF formats.

  • 07 Code Generation.ipynb shows how to generate code from class diagrams. In particular, we focus on Interface Descriptive Languages with concrete examples for Class to ROS2 IDL and Google Protocol Buffers. We also show how simple Python stubs could be generated given a Class object.

  • 08 Property Values.ipynb shows how to access property values and property value groups, as well as the Property Value Management (PVMT) extension.

  • 09 Context Diagrams.ipynb shows the capellambse-context-diagrams extension that visualizes contexts of Capella objects. The extension is external to the capellambse library and needs to be installed separately.

  • 10 Declarative Modeling.ipynb demonstrates a basic application of the declarative approach to modeling on a coffee machine example.

  • 11 Complexity Assessment.ipynb quickly demonstrates how to use and view the model complexity badge for a Capella model.

We are constantly working on improving everything shown here, as well as adding even more useful functionality and helpful demos. If you have any new ideas that were not mentioned yet, don't hesitate to contribute!

Installation

In order to use private models that are not publicly available, please install and use capellambse in a local, trusted environment.

You can install the latest released version directly from PyPI.

pip install capellambse

On supported platforms, the downloaded wheel includes an optional native module, which provides faster implementations of some functions. Other platforms will fall back to a pure Python wheel without this speedup. To build the native module, a Rust compiler is required.

Development

For details on how to set up a local development environment, please refer to the CONTRIBUTING guide.

Current limitations

As we started in mid 2019 and there was no such thing as Python4Capella yet, we are not API compatible with that project.

The generated diagrams are currently not persisted in .aird files, and currently there is no plan to implement this. If there is a genuine usecase for that we may re-consider it - feel free to create an issue or add comments to an existing one.

Contributing

We'd love to see your bug reports and improvement suggestions! Please take a look at our guidelines for contributors for details.

Licenses

This project is compliant with the REUSE Specification Version 3.0.

Copyright DB InfraGO AG, licensed under Apache 2.0 (see full text in LICENSES/Apache-2.0.txt)

Dot-files are licensed under CC0-1.0 (see full text in LICENSES/CC0-1.0.txt)

To provide the same look and feel across platforms, we distribute our library bundled with the OpenSans font (capellambse/OpenSans-Regular.ttf). The OpenSans font is Copyright 2020 The Open Sans Project Authors, licensed under OFL-1.1 (see full text in LICENSES/OFL-1.1.txt).

Metadata

Release files for capellambse 0.8.1

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

Source distribution (sdist)

Source distribution for capellambse 0.8.1
File Size Uploaded
capellambse-0.8.1.tar.gz 5.1 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for capellambse 0.8.1
File
capellambse-0.8.1-py3-none-any.whl Python 3 none any Details
capellambse-0.8.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
capellambse-0.8.1-cp311-abi3-win32.whl CPython 3.11 abi3 Windows x86-32 Details
capellambse-0.8.1-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details
capellambse-0.8.1-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details
capellambse-0.8.1-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
capellambse-0.8.1-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
capellambse-0.8.1-cp311-abi3-macosx_11_0_x86_64.whl CPython 3.11 abi3 macOS 11.0+ x86-64 Details
capellambse-0.8.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 11.0 MB

Release files / capellambse-0.8.1.tar.gz

Download URL capellambse-0.8.1.tar.gz
Size 5.1 MB
Tags Source
SHA-256 checksum
How to use checksums
b5f9528e3936f60d95fd2cec60d92fdbee06030ff80e6e99baa8a38d2f899b7e
BLAKE2b-256 checksum
How to use checksums
2acfcd894179975960d554d8a2bf9371b2cc951d398bfaed9cdaa30047ee16e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-py3-none-any.whl

Download URL capellambse-0.8.1-py3-none-any.whl
Size 430.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69d16c7082bc559d0925532c48cef175309fdcc23504dafc81721f3cc8d5309d
BLAKE2b-256 checksum
How to use checksums
76de82388783f2da3c013f772393461c290ed40b9667fd730c3aba2adb376a75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-win_amd64.whl

Download URL capellambse-0.8.1-cp311-abi3-win_amd64.whl
Size 566.4 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
79e68b0dc27fdaa8db51ff8c828f8d403d79e40c411b39883987d79a932f8ecb
BLAKE2b-256 checksum
How to use checksums
759298ee4d7c499d9daea17f225719179adb582b846c7cc4364715917cd037aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-win32.whl

Download URL capellambse-0.8.1-cp311-abi3-win32.whl
Size 563.3 kB
Tags CPython 3.11 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
bc7fbbfeb1a76bf247cf3857088107033b5ddca5e2219ba5fabd29decb1b6bda
BLAKE2b-256 checksum
How to use checksums
c6c04e7df5f802246ca1c6962e051f1078566dbcc46d2edbd6f63fbf2610d408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL capellambse-0.8.1-cp311-abi3-musllinux_1_2_x86_64.whl
Size 787.3 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
e94fcc97e80aa5c3487ecb3efdf1dd1d999919d47375af46622f139a4e8c64f9
BLAKE2b-256 checksum
How to use checksums
04d6a49760ab6a937df12aac0651014817d5d5c6160f489ab9d016af4bd01d7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL capellambse-0.8.1-cp311-abi3-musllinux_1_2_aarch64.whl
Size 773.0 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
cd3049f3f305f67076ff2180192906331a8dbe0b7becfa3cd2d4aa1969b3f627
BLAKE2b-256 checksum
How to use checksums
fed840ffa2d4f0ee57e8cefef9224b1e7f08a7c37b4420cb731a802203792b1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL capellambse-0.8.1-cp311-abi3-manylinux_2_28_x86_64.whl
Size 716.2 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
f45fdb2ba7b20a01f6b897727cd2c814a84a0fcd71f7c17e1313ecc93be795e7
BLAKE2b-256 checksum
How to use checksums
2e74fa600688f180cc4b610d3d5da85ff9756bc7c9a3e908cd70a1d2001f9b69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL capellambse-0.8.1-cp311-abi3-manylinux_2_28_aarch64.whl
Size 706.6 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
b8274a20a760cf45feec0ce6bc12dd332b0d2508572e408a7fc5d6de58826ff0
BLAKE2b-256 checksum
How to use checksums
f153aeb2725ccfa1c9a5eac905d309215b8e524066a726e06518fd5d5f876028
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-macosx_11_0_x86_64.whl

Download URL capellambse-0.8.1-cp311-abi3-macosx_11_0_x86_64.whl
Size 683.3 kB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
fb66239bde08ae747b15666f8f18eab459ddd235d1762157aaeff912f0191aa6
BLAKE2b-256 checksum
How to use checksums
4b54727847f0f6c3426e1069662e9253a24dee5585c4da6cc1ab2c07ca233f68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / capellambse-0.8.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL capellambse-0.8.1-cp311-abi3-macosx_11_0_arm64.whl
Size 677.0 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
939be01e5ff0c6903ebc798ada43dd0631bb3b6af64943ea739d16c67044b67b
BLAKE2b-256 checksum
How to use checksums
f3d3aa78ddcd538dfc935dabfaca6f15a09ff02f11cdb9a55d66644a81200978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.1 This release

10 release files

0.7.9

10 release files

0.7.8

10 release files

0.7.7

10 release files

0.7.6

10 release files

0.7.5

10 release files

0.7.4

10 release files

0.7.3

10 release files

0.7.2

10 release files

0.7.1

10 release files

0.7.0

10 release files

0.6.15

2 release files

0.6.14

2 release files

0.6.13

2 release files

0.6.11

2 release files

0.6.10

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.72

2 release files

0.5.71

2 release files

0.5.69

2 release files

0.5.68

2 release files

0.5.67

2 release files

0.5.66

2 release files

0.5.64

2 release files

0.5.63

2 release files

0.5.62

2 release files

0.5.60

2 release files

0.5.59

2 release files

0.5.58

2 release files

0.5.57

2 release files

0.5.55

2 release files

0.5.54

2 release files

0.5.53

2 release files

0.5.52

2 release files

0.5.51

2 release files

0.5.50

2 release files

0.5.49

2 release files

0.5.47

2 release files

0.5.46

2 release files

0.5.45

2 release files

0.5.44

2 release files

0.5.43

2 release files

0.5.41

2 release files

0.5.39

2 release files

0.5.36

2 release files

0.5.35

2 release files

0.5.33

2 release files

0.5.32

2 release files

0.5.30

2 release files

0.5.29

2 release files

0.5.28

2 release files

0.5.27

2 release files

0.5.26

2 release files

0.5.25

2 release files

0.5.24

2 release files

0.5.20

2 release files

0.5.19

2 release files

0.5.18

2 release files

0.5.17

2 release files

0.5.16

2 release files

0.5.15

2 release files

0.5.14

2 release files

0.5.13

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.19

2 release files

0.4.16

2 release files

0.4.15

2 release files

0.4.14

2 release files

0.4.13

2 release files

0.4.12

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

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