Skip to main content
# sUTL_py
sUTL Universal Transform Language for Python

This is a python implementation of sUTL. See the [sUTL spec](https://github.com/emlynoregan/sUTL-spec) here.

Import sUTL like this:

from sUTL_py import sUTL

Evaluate a transform like this:

transform = {
"&": "+",
"a": "^@",
"b": 5
}

source = 6

result = sUTL.evaluate(source, transform, {})

# here result is 11

To use library distributions, do the following:

1: Load the libraries. The following loads the core library.

coreString = urllib2.urlopen("http://emlynoregan.github.io/sUTL-spec/sUTL_core.json").read()
distributions = [json.loads(coreString)]

2: Add your transform to a declaration

transform = {
"&": "map_core",
"list": "^@",
"t": {":": {
"&": "+",
"a": "^@.item",
"b": 1
}}
}

declaration = {
"transform-t": transform,
"requires": ["map_core"]
}

3: Compile a set of libraries from the distribution

lib = sUTL.compilelib([declaration], distributions, false)

4: Evaluate your transform

source = [1, 2, 3, 4]

result = sUTL.evaluate(source, transform, lib)

# here result is [2, 3, 4, 5]


Release files for sUTL 1.0.6

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

Source distribution (sdist)

Source distribution for sUTL 1.0.6
File Size Uploaded
sUTL-1.0.6.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sUTL 1.0.6
File Interpreter ABI Platform
sUTL-1.0.6-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 15.6 kB

Release files / sUTL-1.0.6.tar.gz

Download URL sUTL-1.0.6.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bbfe81d14517871713da7f7bbf232ec1146caadb77d724d5894a42d1e4968ed6
BLAKE2b-256 checksum
How to use checksums
1091a386476fe1e39249fe0b77e8644e4c68f5c890859177dfa93909bb60415b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sUTL-1.0.6-py2.py3-none-any.whl

Download URL sUTL-1.0.6-py2.py3-none-any.whl
Size 8.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f0c0faa7dd29bf600a20d045ad425ed129e43ca727480f1a2467e6fbddf76bb4
BLAKE2b-256 checksum
How to use checksums
0228df607e26f5d455bf2c603784fc7b7593f603b06822b95edc308fd3c8b460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
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