Skip to main content

sysml2py (generated)

Version 1.0.0 — generated by sysml2py-lab from the SysML v2 grammar + relationship model + corpus (issues #6/#7/#8/#9/#13).

Capabilities:

  • Generated AST node classes per grammar rule
  • Membership-dispatch table from children.json
  • dump() / get_definition() on every node (loss-minimizing)
  • Unsupported nodes carry raw text (zero NotImplementedError)
  • Provenance stamp in sysml2py.provenance

Building a model (friendly builder API)

Friendly names drop the Builder/Usage/Definition suffixes — Part, Attribute, Item, ... are builders; usage vs definition is chosen at creation via kind=; add() appends children so a full package dumps from nested composition:

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;
   }
}

Definitions are the same class with kind= at creation: Part('Stage_1', kind='definition') -> part def Stage_1;

Kinds without a definition form (Package, Comment, Actor, Reference, Transition, Import, Message, Succession, AliasMember, Subject, ObjectiveRequirement) reject kind='definition' with a ValueError — the generator never emits a definition it cannot cast back (and a class-name kind like 'PartDefinition' raises too, since that would print invalid SysML).

Package/Comment/Import/Message/Succession/AliasMember keep the *Builder suffix (their friendly names are the AST node classes). The classic *Builder names (PartUsageBuilder, ...) remain available.

Value-bearing attributes are supported: Attribute('mass', value=1000, unit='kg') renders attribute mass = 1000[kg];, with the unit imported automatically as public import SI::kg; (issue #26, lab repo). You may also pass an astropy Quantity and the unit is derived from it (value=1000*u.kg) — add import astropy.units as u yourself, since the runtime stays pure-stdlib (astropy is not bundled; see the migration note).

Compatibility: this is the 1.x line. Moving from 0.5.x? see the migration note: https://github.com/Westfall-io/sysml2py-lab/blob/main/docs/migration-0.5-to-1.0.md

Metadata

Release files for sysml2py 1.0.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 sysml2py 1.0.0
File Size Uploaded Provenance
sysml2py-1.0.0.tar.gz 82.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sysml2py 1.0.0
File Interpreter ABI Platform
sysml2py-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 170.0 kB

Release files / sysml2py-1.0.0.tar.gz

Download URL sysml2py-1.0.0.tar.gz
Size 82.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8ba4f8c800f7a01f134b0145212a0ead41390cfd5b3706bf3c642b7c9f31168b
BLAKE2b-256 checksum
How to use checksums
2555cd98aaeaf94e7f90ba27f1be34d317fde6ade7211337850397636743d240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / sysml2py-1.0.0-py3-none-any.whl

Download URL sysml2py-1.0.0-py3-none-any.whl
Size 87.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1eff1cb5618ed64852c0061ae26865e89ae6bd66178ba62f4bf78db5cd85cd09
BLAKE2b-256 checksum
How to use checksums
959ce5cdb9fd3349e119792fa6dfdca2cc45072011d8cef36047c71f8c07121a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for sysml2py 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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