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
# 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.unflat
# Print the UPLC in textual notation from the hex of the CBOR encoded flat-encoding
code = uplc.unflat("490100004c0101010001")
print(code)
# prints "(program 1.0.0 (con data #01))"
### 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.3.0.tar.gz
(14.9 kB
view hashes)
Built Distributions
pyaiken-0.3.0-cp39-none-win_amd64.whl
(453.3 kB
view hashes)
pyaiken-0.3.0-cp38-none-win_amd64.whl
(453.4 kB
view hashes)
pyaiken-0.3.0-cp37-none-win_amd64.whl
(453.4 kB
view hashes)
Close
Hashes for pyaiken-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93e9112188b51d4eae42b92d91f9fda6cf96fb12e851ebe1ef319f6b1ddc3279 |
|
MD5 | cff192f2638498a67e298c547fcb97e8 |
|
BLAKE2b-256 | e5ac66c55d129e6b51830811f856ff88c144b73cd7b54387029cf38b94a683c5 |
Close
Hashes for pyaiken-0.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4293accc7aa7e4e544ef5669efb3c4ba9888f80fe455996b4cf87223efabebd7 |
|
MD5 | 1367f557bca4b322084ca16080890169 |
|
BLAKE2b-256 | cb4f3a50e2738a8014b3634606f97d99f3cf50fd173ad207f417781546de9520 |
Close
Hashes for pyaiken-0.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41ada7341b20dcc2d720292bf390b3bbbd610ea24f4ac7fc7e834f931c033e13 |
|
MD5 | 6ba3f3b8e5ea1d243fa435f6a8712847 |
|
BLAKE2b-256 | cbc3a4b62df58fc91330e1c6ea7eef247d04e09d1f559687075d8ffface635c6 |
Close
Hashes for pyaiken-0.3.0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e193f908deacdb6ececb24459dadf7b932763d87e1f49706c35be33225f8b75 |
|
MD5 | f54b10b171edef54696746a9fefa9f96 |
|
BLAKE2b-256 | 63414dee9ae11d9a1a42d3f8aea52c8056d96f3362a12b9841a0d5c7f9e37949 |
Close
Hashes for pyaiken-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d829c118fd41280c0eea82cb2fe42652b869e220657397d05df77d3d59b66f6 |
|
MD5 | 80b613d6a6caf5a531168d262987827e |
|
BLAKE2b-256 | 1efdbdd49de4fe6958d9b90ed4e1d1e946995b341814736825c66ec172b59d4e |
Close
Hashes for pyaiken-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82658d8faf8bd1860a5bf3397febc65d7fcbadfdb210815368b1c8a42b470d6b |
|
MD5 | f30e7a9915094bbe3bf65cd9fb991c99 |
|
BLAKE2b-256 | 22802cbde0e047d27a0eba25432283ddfbcb202914efccff560c2638c90b5cf6 |
Close
Hashes for pyaiken-0.3.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 345b5e7abbb93768c2ae46ce4aee01af56d9bfadb494c6edfdb86e0b2ec971f8 |
|
MD5 | ed1bba36b4983381bfa41f1c09307fcf |
|
BLAKE2b-256 | 1a0e46b8984d0e3de4b1534e8a65b4c3128f62ff412b77b859258895a33de32a |
Close
Hashes for pyaiken-0.3.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3603d14f369d62dfb17c8b6a84ee9ea8c63692b0ca9d902bdb3fd06215cacbd2 |
|
MD5 | af71b584335be9939a1a8e2330ef5a93 |
|
BLAKE2b-256 | 0207e4d54afab5f50060b8f860907a76ae820207d1c15501053e2a018ddc7ca4 |
Close
Hashes for pyaiken-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 626d9094334e80c569effbf6ae8ea04ce21551d5f54f6f9348ce66b0945f01c7 |
|
MD5 | e3215c930ca18be7f0d1d04ff27bf9f1 |
|
BLAKE2b-256 | 531db862056b02b9dcd652e693a3cc470c57887d6ffa527827e773c5a4e50565 |
Close
Hashes for pyaiken-0.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f39f3dc031d9e49143d7c7efc3ec8e5d6f64f64887906d89cad3bfac2e16dafc |
|
MD5 | 7aa1941f8287a2ea75acf1487ee639cb |
|
BLAKE2b-256 | dd49273ab7bf1df115c76588bba7d7222c273ba9d5f6f2e5e2ee1f2a59b70344 |
Close
Hashes for pyaiken-0.3.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26b09472fb7eab4d5726a7bb864397960f23e6ea8e9957ab8645ece499b5ee98 |
|
MD5 | 9763c526ec926da927a06e828f0ebc34 |
|
BLAKE2b-256 | ed1b12192a1f5dce150ef96a24548a3c68ed324c0ff2b58527d437a737f418bd |
Close
Hashes for pyaiken-0.3.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14d6682cb7ebf54e6f398108daf9d71173f1bd9284ee41690509d4a0a6fc4525 |
|
MD5 | 4aecbd24075a1eb382de0c80be361707 |
|
BLAKE2b-256 | 1e2edd4a83fa8f77a8f2daaa7fe957b74f50b9bc93c42743d2417d3cabc61bdc |
Close
Hashes for pyaiken-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6600c098f6474621ce8dcc7fae477c95d455216ebb2e887f3ee0d3a85869d923 |
|
MD5 | 21911417d7b1c05a17ee75853cc3825f |
|
BLAKE2b-256 | d3b1d1c5c284020fb34d97d33a383e10c114e9915bd2155c81ae269779fb8e54 |
Close
Hashes for pyaiken-0.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b255af234e098dd46416a58a8918d33b29f9382a8f87fee03924fbaf7d96811 |
|
MD5 | a699b767a838821a5351384844cb0a91 |
|
BLAKE2b-256 | 184378e9cbf7e496e5c59b0187aeadfcb64da86c2e75332572eb05b5eaecd3e9 |
Close
Hashes for pyaiken-0.3.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c09620b22f8f9747e35f17fe82371c5b582ad3b1e077d97cae6c3dc1c450bc5d |
|
MD5 | f95d485b9195daefd8298e864533d5f0 |
|
BLAKE2b-256 | 77474a0bd78517ec3de50205c13d630dfd5ce32c61efc11bf6b42a92a3b8085c |
Close
Hashes for pyaiken-0.3.0-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 570ae3660ecf41b5dffb75f4a3a3850fd0143ba2f2ab415d575fd0aa2decbc41 |
|
MD5 | b248140528e9a109bdbafe4a75b97531 |
|
BLAKE2b-256 | 6e49ed23481b9515f520877da3df1759e81ce74a41112fecdcec2898224cf01d |
Close
Hashes for pyaiken-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b53bf6d5a67b209a585043c61ceb2ab405caaef37b1cfbcd026fb8de692d6d7 |
|
MD5 | 531f6eaa4e1c54fe7f4a35040a31a075 |
|
BLAKE2b-256 | ef8c3d354b2ca55e3352669c3413e5bafdc80158e560fb0ed03d61d6435c918e |
Close
Hashes for pyaiken-0.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88daba1c22e0fb0d8994a32ce5292f2421d5a72678a322fe72fe6b318842a65f |
|
MD5 | 7d1d3ed04f26449e0102e6c99c375133 |
|
BLAKE2b-256 | 3119343226172d70465cef8a19f711910a717323937db2a5e7351560c23e0796 |
Close
Hashes for pyaiken-0.3.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27146f350d7cabbf9b0c3af31d03b7911619e3a536c30330828987a18280b46e |
|
MD5 | c08566ebdde0870c2bb6901fc4082fdb |
|
BLAKE2b-256 | 488e4c76ad5cfd0f345dedf035e478e76fa6c08e99ee259269ee82b08d931777 |
Close
Hashes for pyaiken-0.3.0-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d54b0e9d70f3ef1fc5e1ed86c6546e41471dabb1f36435eb104730eaec53ede7 |
|
MD5 | d22456775aec1af7087cd11033d1b2b6 |
|
BLAKE2b-256 | cdc32f56c8c3fdf68190c20ae33197555e377fe725c0cd1a3d2fbdd543377e4f |
Close
Hashes for pyaiken-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67536b8d4605bad776da354b6d8c734474be8ed41cfb1cb3d75f1fe792c86614 |
|
MD5 | a90ab239b2a195a708c7f1494162356a |
|
BLAKE2b-256 | 3c1fdccb955c8db15b090ba6b848887b1c2f0a1ba06df40b962d09bcb1f31736 |
Close
Hashes for pyaiken-0.3.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0012fbaed978d47cd60f8dadcb75d8c5ecaaf8dd9598cea0da5fbf45a1978b52 |
|
MD5 | 3339ebc20a62a6eef878a353714be46e |
|
BLAKE2b-256 | c04dc8b56f7cd62364c20370bf3103f645a2c149a84f2db4cd3afad17643cc9c |