Skip to main content

Morphir Python

CLI tools and extensions for Morphir Python.

This package provides:

  • Command-line interface for Morphir operations
  • Code generation backends
  • File I/O utilities
  • Development tools

Installation

pip install morphir-python

Or with uv:

uv add morphir-python

The morphir-python distribution contains the CLI and depends on the separate morphir library/SDK distribution. Python imports remain morphir and morphir_tools. Version 0.0.1 was a bundle; for migration to CLI-only 0.0.2, see the repository installation guide.

Usage

The morphir-python command inspects and converts versioned morphir-ir.json files. It reads format 3.0.x (what morphir-elm writes), format 3.1.x (which adds the v3 Specs distribution) and draft IR 4.0.x, reads the legacy formats 1 and 2 to upgrade them, and uses the morphir library for every read, write, and migration.

morphir-python ir inspect morphir-ir.json
morphir-python ir convert morphir-ir.json --to v4 -o out.json --package-version 1.2.0
morphir-python ir convert v4.json --to v3 -o out.json --drop-source-locations
morphir-python ir convert old-format-1.json --to v3 -o out.json

inspect prints the normalized format version, the distribution kind (Library, Specs or Application), and the package name, and labels v4 as draft and formats 1 and 2 as legacy. convert handles Library and Specs in both directions. It writes a v3 Library as format 3 and a v3 Specs as "3.1.0", the lowest version that holds each. A legacy format 1 or 2 file converts to a format 3.0.0 Library or draft v4; nothing writes format 1 or 2. convert writes through a temporary file and renames it only on success, so a failed conversion leaves no output file. Diagnostics go to standard error as code at location: message.

Exit codes are 0 for success (also with warnings), 1 for a diagnostic, and 2 for a usage error. 3.x releases from 3.2.0 on are rejected; see the morphir package README for the format-version rules and the draft v4 status.

Requirements

  • Python 3.14+
  • morphir>=0.0.2 and morphir-python-native==0.1.0 (installed as dependencies)

License

Apache-2.0 - see the LICENSE file for details.

Metadata

Release files for morphir-python 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for morphir-python 0.0.3
File Size Uploaded Provenance Actions
morphir_python-0.0.3.tar.gz 16.6 kB With provenance Details for morphir_python-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for morphir-python 0.0.3
File Interpreter ABI Platform Actions
morphir_python-0.0.3-py3-none-any.whl Python 3 none any Details for morphir_python-0.0.3-py3-none-any.whl

Total release size: 37.0 kB

Release files / morphir_python-0.0.3.tar.gz

Download URL morphir_python-0.0.3.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4f6f1c34aa0aa14297f62e77cb801f6bdef4251f52c289369eb9ca8e929766ac
BLAKE2b-256 checksum
How to use checksums
b0f67ceee51a9970920dd506cb5e6fe492a56b65f6441af515580968085a7a82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Release files / morphir_python-0.0.3-py3-none-any.whl

Download URL morphir_python-0.0.3-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d8a10590db0a61fdbaa2adced97f36e040b5016c0875945e7c7abad515b5f62
BLAKE2b-256 checksum
How to use checksums
a7c4bc45c4a28dda11ee742397fd9af44f6a9ff3abacb7ace7c77a70049fbf5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Security for morphir-python 0.0.3

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for morphir_python-0.0.3.tar.gz

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 Oct 27, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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