Skip to main content

pyaiken

This package supplies python bindings for the package aiken. The bindings are added on a per-need basis, currently only serving the development of eopsin

Installation

Install python3. Then run the following command.

python3 -m pip install pyaiken

Usage

from pyaiken import uplc, script_address

# Tools for handling UPLC

### uplc.flat
# Print the hex of the CBOR encoded flat-encoding of the program in UPLC textual notation
code = uplc.flat("(program 1.0.0 (con data #01))")

print(code)
# prints "490100004c0101010001"

### uplc.eval
# Evaluate a UPLC program with the given arguments (all in textual representation) and cpu and memory budget (optional, in this order)
# Returns either computed UPLC value on success or thrown error on failure,
# logs generated through trace
# and the consumed cpu and memory steps
((suc, err), logs, (cpu, mem)) = uplc.eval("(program 1.0.0 (lam x x))", ["(con data #01)"], 1000000, None)

print((suc, err), logs, (cpu, mem))
# prints "('(con data #01)', None), [], (9907900, 13999500)"

Building

In case you need to build this package from source, install Python3 and Rust and proceed as follows.

git clone https://github.com/ImperatorLang/pyaiken
cd pyaiken
python3 -m venv .env
source .env/bin/activate  # or in whichever environment you want to have it installed
pip install manturin
manturin build

The package will be installed in the active python environment.

Release files for pyaiken 0.1.2

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

Source distribution (sdist)

Source distribution for pyaiken 0.1.2
File Size Uploaded
pyaiken-0.1.2.tar.gz 14.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyaiken 0.1.2
File Interpreter ABI Platform
pyaiken-0.1.2-cp38-cp38-manylinux_2_34_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.34+ x86-64 Details

Total release size: 535.9 kB

Release files / pyaiken-0.1.2.tar.gz

Download URL pyaiken-0.1.2.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
64a7b7722608a16d958c759f75dc810ba9373b43510bcd87fe821b2b0f165b56
BLAKE2b-256 checksum
How to use checksums
96db42eb25812c2fb693a2d62a9b0a1b42780250035eaf520b89d950406f3cd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.9

Release files / pyaiken-0.1.2-cp38-cp38-manylinux_2_34_x86_64.whl

Download URL pyaiken-0.1.2-cp38-cp38-manylinux_2_34_x86_64.whl
Size 521.5 kB
Tags CPython 3.8 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
14d2a0a574885345bd44a07f8d8d34246067b20be46fd2eb16619c013bf0538f
BLAKE2b-256 checksum
How to use checksums
619b59a6754e78f9c8a0105d7bb61b0078c1a8f495c9eae21bc61a8722a8e43f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.9

Release history Release notifications | RSS feed

0.5.4

44 release files

0.5.3

44 release files

0.5.0

19 release files

0.4.0

23 release files

0.3.0

23 release files

0.2.1

9 release files

This release

0.1.2 This release

2 release files

0.1.1

6 release files

0.1.0

2 release files

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