Skip to content
Jasper Quillweld edited this page Oct 20, 2026 · 2 revisions

Welcome to the sysml2py wiki

sysml2py is a pure-Python library for building SysML v2 models. You write Python; it emits spec-correct .sysml notation. This wiki is the practical guide — how to install it, build your first model, and go deeper.

For the project overview and the story behind the 1.0.0 overhaul, see the README.

In this wiki


Quick start

pip install sysml2py
from sysml2py import PackageBuilder, Part, Attribute

pkg = PackageBuilder('MyModel')
stage = Part('Stage_1')
stage.add(Attribute('mass'))
stage.add(Attribute('thrust'))
pkg.add(stage)
print(pkg.dump())
package MyModel
{
   part Stage_1
   {
      attribute mass;
      attribute thrust;
   }
}

Everything in this library — the AST node classes, the builders, and the printer — is deterministically generated from the SysML v2 grammar by the companion sysml2py-lab project, so it stays in lockstep with the language instead of drifting behind a hand-written parser.

Keep the wiki in sync: the pages here are maintained alongside the code. If you find a mismatch between a wiki page and what the library actually does, file it on the sysml2py-lab repo — generated behavior is generator error, not a license to hand-edit the library.

Clone this wiki locally