Skip to main content

datamorph-python

datamorph-python exposes the DataMorph transformation engine as a normal Python package.

Install it with:

pip install datamorph-python

Then import it with:

from datamorph import evaluate, read, write

Quick Start

from datamorph import evaluate

script = """
output application/json
---
{
  id: payload.id,
  requestId: headers.requestId,
  stage: attributes.stage,
  env: vars.env
}
"""

result = evaluate(
    script,
    payload={"id": 42},
    headers={"requestId": "req-001"},
    attributes={"stage": "test"},
    variables={"env": "dev"},
)

assert result == {
    "id": 42,
    "requestId": "req-001",
    "stage": "test",
    "env": "dev",
}

API

  • evaluate(script, payload=None, headers=None, attributes=None, variables=None, payload_mime=None)
  • transform(...) as an alias for evaluate(...)
  • eval_expression(expression)
  • read(input_text, mime_type)
  • write(data, mime_type)
  • validate(script)
  • version()

Notes

  • Package name on PyPI: datamorph-python
  • Import name in Python: datamorph
  • Wheels built from this folder contain the Rust engine, so users do not need a separate DataMorph installation.

Metadata

Release files for datamorph-python 1.22.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 datamorph-python 1.22.3
File Size Uploaded Provenance Actions
datamorph_python-1.22.3.tar.gz 1.2 MB Without provenance Details for datamorph_python-1.22.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for datamorph-python 1.22.3
File Interpreter ABI Platform Actions
datamorph_python-1.22.3-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for datamorph_python-1.22.3-cp38-abi3-win_amd64.whl
datamorph_python-1.22.3-cp38-abi3-manylinux_2_31_x86_64.whl CPython 3.8 abi3 Linux glibc 2.31+ x86-64 Details for datamorph_python-1.22.3-cp38-abi3-manylinux_2_31_x86_64.whl

Total release size: 82.5 MB

Release files / datamorph_python-1.22.3.tar.gz

Download URL datamorph_python-1.22.3.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
ef85950b81a5852b58e3ee398c11f34d43c8b84a2781fe13f4d79e4f85f6d934
BLAKE2b-256 checksum
How to use checksums
094f8f11594ef45a7d22dd9a668c77a36ad194a5f6d2faa7f24d682ef7368f94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / datamorph_python-1.22.3-cp38-abi3-win_amd64.whl

Download URL datamorph_python-1.22.3-cp38-abi3-win_amd64.whl
Size 40.7 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a2edd0cb87ca941f2578d6bccb12095409a4887731dd2f96e13951db35bf085a
BLAKE2b-256 checksum
How to use checksums
c6a7c7e66679695a48d51dcdd3b3ec34a8c1c67b7b6f28377a96dd0235de5e0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / datamorph_python-1.22.3-cp38-abi3-manylinux_2_31_x86_64.whl

Download URL datamorph_python-1.22.3-cp38-abi3-manylinux_2_31_x86_64.whl
Size 40.7 MB
Tags CPython 3.8 Linux glibc 2.31+ x86-64 abi3
SHA-256 checksum
How to use checksums
c85c7c2a121d980a0d6b0d2114ae9406e1146e34609ce79e5e6c565729d8a338
BLAKE2b-256 checksum
How to use checksums
2f9e7f12c55e726a4b5768dd3e83073e9d240e138ab0ed9e3da53c62700570be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Security for datamorph-python 1.22.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.

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.

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