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 opshin
Installation
Install python3. Then run the following command.
python3 -m pip install pyaiken
Usage
from pyaiken import uplc
code = uplc.flat("(program 1.0.0 (con data #01))")
print(code)
code = uplc.unflat("490100004c0101010001")
print(code)
((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))
Building
In case you need to build this package from source, install Python3 and Rust and proceed as follows.
git clone https://github.com/OpShin/pyaiken
cd pyaiken
python3 -m venv .env
source .env/bin/activate
pip install maturin
maturin build
The package will be installed in the active python environment.