Skip to main content

SysML v2 Python Units

Tests PyPI License

Convert units and quantities between standard SysML v2 and Python with Syside Automator and Pint.

  • Get/set quantity* as attribute value, specified using Pint Quantity objects
  • Get/set unit as attribute value, specified using Pint Unit objects
  • Supports numerical values, as well as inf (* in SysML v2) and NaN (set as null in SysML v2)
  • Supports compound units, for example K·kg·s²/m³
  • Supports unit prefixes (kilo, mega, milli, etc.)
  • Conversion functions between SysML v2 units and Pint Unit, and string parsing functions
  • Derive preferred units for a quantity type, for example kg for an ISQ::mass quantity
  • Syside Automator ReferencePrinter for printing unit references using their short name
  • Extensive caching to make units lookup fast

*: a quantity is a combination of a numerical value (the "magnitude") and units, for example: 10 kg, -1.0 m/s**2.

Note: this package uses Syside Automator for parsing SysML v2 models. Syside Automator is commercial software, so you have to obtain a license first. For academic uses you can request an academic license.

Installation

  1. Install the package from PyPI:
    pip install sysmlv2-units
    
    Note: currently Syside Automator only supports Python 3.12
  2. Make sure you activate Syside Automator

Usage

Refer to the documentation.

Citing

If you use this library in your work, please cite the paper that first introduces the use of these capabilities:

Bussemaker, J.H. et al., 2026, April. System Architecture Optimization Using SysML v2: Language Extension and Implementation. IEEE SysCon 2026, Halifax, Canada. doi: 10.1109/SysCon66367.2026.11503593

Contributing

The project is coordinated by: Jasper Bussemaker (jasper.bussemaker at dlr.de)

If you find a bug or have a feature request, please file an issue using the Github issue tracker. If you require support for using the library or want to collaborate, feel free to contact me.

Contributions are appreciated too:

  • Fork the repository
  • Add your contributions to the fork
    • Update/add documentation
    • Add tests and make sure they pass (tests are run using pytest)
  • Sign a Contributor License Agreement (CLA): please contact me for the template
  • Issue a pull request

Download files

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

Source Distribution

sysmlv2_units-1.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

sysmlv2_units-1.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file sysmlv2_units-1.1.0.tar.gz.

File metadata

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

File hashes

Hashes for sysmlv2_units-1.1.0.tar.gz
Algorithm Hash digest
SHA256 807c60c0e5c3a59228f7408e9c2e2e8eafd48a612ce5cf155aba6ef079eb2b7f
MD5 9dd6b8ec8b32b48feb544bd0d94e5188
BLAKE2b-256 9d9434cc4609efc7e4df3eac91854fcb3952643af57d516a2b604633a21a936a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sysmlv2_units-1.1.0.tar.gz:

Publisher: publish.yml on jbussemaker/SysML-v2-Python-Units

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

File details

Details for the file sysmlv2_units-1.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for sysmlv2_units-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4486a32e11ebe5b71d738d14b5217c9489ae3c04cac92d234d7052e8c7cd5fa
MD5 59dfa28f1378b44fbd0d75f7dea69ee4
BLAKE2b-256 0655005aa894c15dbf5f5004978f9e39474e6d6a02d68faaf179da3ff8d79847

See more details on using hashes here.

Provenance

The following attestation bundles were made for sysmlv2_units-1.1.0-py3-none-any.whl:

Publisher: publish.yml on jbussemaker/SysML-v2-Python-Units

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

Release history Release notifications | RSS feed

1.2.1

2 files

1.2.0

2 files

This release

1.1.0 This release

2 files

1.0.1

2 files

1.0.0

2 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