Skip to main content

Internal Python client SDK and CLI for the SysML refinement API used by the Visual Design and Engineering Lab at Carnegie Mellon University

Project description

sysmlv2copilot

sysmlv2copilot is the Python SDK and CLI for the SysML Copilot service used by the Visual Design and Engineering Lab at Carnegie Mellon University.

This package is for authorized internal users. Installing it does not by itself grant service access.

What Users Can Do

  • Generate SysML from text requirements
  • Repair existing SysML
  • Use either Python or the command line

Install

python -m pip install sysmlv2copilot

Authentication

Set your API key once:

export SYSMLV2COPILOT_API_KEY=sysml_live_...

Or pass it directly in code:

from sysmlv2copilot import generate, repair

sysml = generate(
    "Design a compact warehouse inspection drone that can hover for 15 minutes.",
    api_key="sysml_live_...",
)

repaired = repair(
    "broken.sysml",
    api_key="sysml_live_...",
)

Python

Generate SysML:

from sysmlv2copilot import generate

sysml = generate("Design a compact warehouse inspection drone that can hover for 15 minutes.")
print(sysml)

Repair SysML:

from pathlib import Path

from sysmlv2copilot import repair

repaired = repair(Path("broken.sysml"))
print(repaired)

If a .txt file contains SysML, repair() can use that too:

from pathlib import Path

from sysmlv2copilot import repair

repaired = repair(Path("broken.txt"))
print(repaired)

You can pass:

  • raw strings
  • Path objects
  • path strings like "broken.sysml" or "requirements.html"
  • open text files

Use generate() for natural-language requirements and repair() for SysML, regardless of whether the file extension is .sysml or .txt.

CLI

Generate SysML from inline text:

sysmlv2copilot --api-key sysml_live_... \
  generate \
  --input "Design a compact warehouse inspection drone that can hover for 15 minutes."

Repair SysML from a file:

sysmlv2copilot --api-key sysml_live_... \
  repair \
  --input-file ./broken.sysml

The CLI accepts .txt, .sysml, and .html files for --input-file. HTML files are converted to plain text before being sent to the API.

Project details


Download files

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

Source Distribution

sysmlv2copilot-0.2.8.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

sysmlv2copilot-0.2.8-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file sysmlv2copilot-0.2.8.tar.gz.

File metadata

  • Download URL: sysmlv2copilot-0.2.8.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for sysmlv2copilot-0.2.8.tar.gz
Algorithm Hash digest
SHA256 f13b8f264767963bce42033edeed54babd02801cfdbdbd4e95a0bc0d00a3b48a
MD5 6329910f501f24c73205c670219dea22
BLAKE2b-256 e404a3462a5db8890623fd7b20898f7fa5fa9ed1acbd69ece375417e07cb67fc

See more details on using hashes here.

File details

Details for the file sysmlv2copilot-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: sysmlv2copilot-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for sysmlv2copilot-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9d2e2669ae3685045b84ab6d4c613f67396c72a1d1773a6ad9d01df086107fa2
MD5 e3ac8249d2b9d31d5fe6132ecddad8d9
BLAKE2b-256 cce96dcc902ad7ec4da46ad20dbe60fee6efe5ff0133aad31da6cfe15e9d571b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page