Python bindings for aiken
Project description
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 maturin
maturin build
The package will be installed in the active python environment.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyaiken-0.2.1.tar.gz
(14.7 kB
view hashes)
Built Distributions
Close
Hashes for pyaiken-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e364c97cc4d2f4602e9370b1ff42de81b45366f3d23314a2005971f830c3aa8 |
|
MD5 | 72f24117b3d5393e32aa45469631df4c |
|
BLAKE2b-256 | 80ef8c4494d85aec9e33366b952aefac3ad0c01e8750dacf6c54e8ec2f370906 |
Close
Hashes for pyaiken-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a19dc258e7caac1d4840812ab83618d8645ddef60ad0041edb11e872a41b8b62 |
|
MD5 | 7ad3c862fd0a1957fe8ff8881285282a |
|
BLAKE2b-256 | a3577bd80731bc40d0a051bcced4e28f6633d97aa152b1f00f5771ae50ac4ab3 |
Close
Hashes for pyaiken-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 099a946d7cff1c32cc98a28fefc4e5198b5b6c1d171baae0b494c86571e4f2ad |
|
MD5 | b4d98771bca3d73311fce4d60b0669ff |
|
BLAKE2b-256 | bfa84581f1d94d16dca9c683bfeedc5a5bf7b5c4a44c4af32fe2b61b5697fb66 |
Close
Hashes for pyaiken-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c42dfbc8737e23b28af4da4a96c952f101e4e0ceb4b217b567d298131cc66433 |
|
MD5 | 5e0ed48f231aa5d1c2d2436f30314ee8 |
|
BLAKE2b-256 | 158b6a37a5ca105991660998620d3933dbfa2a7f86bcd82a959793d2a8135883 |
Close
Hashes for pyaiken-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5603f9b28f42392198847b9ea16d5a32fd7557f3d9e3f572f2d6ae414823dbe0 |
|
MD5 | 5422759d5e6c629fab2756e4832fd2c2 |
|
BLAKE2b-256 | 597e5f9dde1e640dd735e1aeeff09d2ceb5a098e49902acc2259cffa829878bb |
Close
Hashes for pyaiken-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed98bbb002c2ab69ff3c0b6adb2c548720934742b29936f1deb465b537b553f7 |
|
MD5 | bee26c90eddddcede413917bef064a9a |
|
BLAKE2b-256 | 1883843af277a931ff599ca78c4912ddc57b3bbc1fb2b3d6c9512dc97c71b84f |
Close
Hashes for pyaiken-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f315cbe8cc41759f07cf388194d6dc6d2b4ad80c4d04298681b38bce3211fdb9 |
|
MD5 | a50fa17d79186e5caed2f8bfbe7faa7d |
|
BLAKE2b-256 | 9d228d95915e534eada25d35d1da1602a9562b2ec0e43e3deb00cc201258ba2e |
Close
Hashes for pyaiken-0.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d5aaafba2150d3dc9e73c1f4a10753643556959d418762fdcb95fd9ce307105 |
|
MD5 | 841c0fe9a6cf30c62145f669c4a4042d |
|
BLAKE2b-256 | deb99dc9397b858d01ace933410dec904f864f83cf5a0be5524b65224faaede6 |