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.)
  • Supports percentages
  • Derive preferred units for a quantity type, for example kg for an ISQ::mass quantity
  • Gracefully handle units that are not supported by SysML v2: stored as doc _units /* <units> */ (opt-in)
  • Conversion functions between SysML v2 units and Pint Unit, and string parsing functions
  • 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

Metadata

Release files for sysmlv2-units 1.3.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 sysmlv2-units 1.3.0
File Size Uploaded
sysmlv2_units-1.3.0.tar.gz 24.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sysmlv2-units 1.3.0
File Interpreter ABI Platform
sysmlv2_units-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.8 kB

Release files / sysmlv2_units-1.3.0.tar.gz

Download URL sysmlv2_units-1.3.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8de09bb58c257eb546c76b9839d9c2d62df7cd14bd36d472e1e9a09b5bcba6af
BLAKE2b-256 checksum
How to use checksums
5eb82e0f986e58ae9d5d43e1cb61ecdc8699607501d6e9ee76c5b104a596cbc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 23, 2026.

Transparency log

Release files / sysmlv2_units-1.3.0-py3-none-any.whl

Download URL sysmlv2_units-1.3.0-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5be01d29c2a67a69c5a6f8f3bd466fe67abed6bc479287d340495f1eb80d8eca
BLAKE2b-256 checksum
How to use checksums
d4c3e36f5ccd76b9456b04f119bd9570b21334d68565ee6e692f2c9fce05449c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

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