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 opshin
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), [], (92100, 500)"
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 # 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.5.0.tar.gz
(17.1 kB
view hashes)
Built Distributions
Close
Hashes for pyaiken-0.5.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e405770205d1681d68b92c9c0ac8f7abf167f5658ed9d6ce59349107d82a0e49 |
|
MD5 | 03a703ad8cc80ca77f2be0e1f2ef6c6a |
|
BLAKE2b-256 | e1d4061dad06752bd62ce7b8f622523e059fdb0259803d6a7b49d346d1da7b88 |
Close
Hashes for pyaiken-0.5.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 522ed4d072b5fa025dad8c66ae0f1dbcc74b89c5d7176d5187dd3d2bb6824d80 |
|
MD5 | fc90f45f5de1fae2f4556bd643b61876 |
|
BLAKE2b-256 | ba5c2853d9b801759a6c155114c6b62c9d64a1f44589b1fff82d0a356283b0fe |
Close
Hashes for pyaiken-0.5.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2caebaf99050c1416fb17c1cfc9a253c12a1e5152b4878e2c67a0f8a35652575 |
|
MD5 | 8767647ff0776ed9d8d918db5075b44c |
|
BLAKE2b-256 | 53161da53ded2d7ad8560bf4e17b1b55fce522642f6ea883efb09b5455a562b3 |
Close
Hashes for pyaiken-0.5.0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 834ad9d46d362a9406ca73e6b790f6ab8045227ec39f51c03e93d5be6ca07a9e |
|
MD5 | a309310297e13a33a1403446d1e07762 |
|
BLAKE2b-256 | f75c73ad9de0c8f95f970a7e3b72d0e8b59e6d949a048a89dd69a461662a3643 |
Close
Hashes for pyaiken-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308e15b3c5995f6ae3498e79b22ef5e5bbdf001a395680c5e8941ab81d2c1407 |
|
MD5 | b8a07c8abef830e0f387abc85757f47e |
|
BLAKE2b-256 | c51ff76b541dd5e2d0c7aeaed09b5dbe457c16503779122549ef8925af903260 |
Close
Hashes for pyaiken-0.5.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ca9aa27aa582c6c4659b343d42c629bd3e57f4076adce320130c075dfe0f676 |
|
MD5 | 83a5420592c443714f988890a86da2d5 |
|
BLAKE2b-256 | f921227f3606886d20da50b1e2b00a82b33e54b1057284aeca790473471bb28b |
Close
Hashes for pyaiken-0.5.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad110df45cd6eb25411b2a02b7a19a5597a2de3810ca0e7f93c9931178d5fa22 |
|
MD5 | c7854491b154027fcb6bb625bf08f005 |
|
BLAKE2b-256 | 9b5ffb18a71c5068c57e5863f2c587654e3ef1cf57d594581edf83b74f9c6ff9 |
Close
Hashes for pyaiken-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 115b7f7454aa331249bd091e8797bc3b4f1095e7fc44448e9d839c41e077961f |
|
MD5 | c67f3b4840fedf4d153e00e7e6d27f53 |
|
BLAKE2b-256 | b8940769616b873c0904cd41fac7f1647a3fb561954f41b91cc68a619928102f |
Close
Hashes for pyaiken-0.5.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d603c0f87dd9e1c02598ae228726942a6ab186f2bc280dfc44110e0c05cd2bfb |
|
MD5 | eb352b8618673875ab337a2ec506647f |
|
BLAKE2b-256 | c8576e96b0de64798e314f2da5c475eb676bad2cdb57ef69d5b5bd399c905c65 |
Close
Hashes for pyaiken-0.5.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb556b16ffc8ff1e9e41dc452560f489df82e1fc2ce13c270e5ec48bb7ee26d |
|
MD5 | 022d2ea23bf74e69844d230b95b13a9f |
|
BLAKE2b-256 | 0520260b895598e763a3425ed7397af27918836ee55b5224e02fe4086f5978c7 |
Close
Hashes for pyaiken-0.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23867398ca557ce717af96aeb5ead2fcec7234883b22a6278bafb4ab4b98b514 |
|
MD5 | 2f503924e30888b096888c2b313202c9 |
|
BLAKE2b-256 | 8a35601d6e4068b964e715fb71586caa9966fd0a70dd0108f03d1edefab5acd5 |
Close
Hashes for pyaiken-0.5.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f98859c19e85e7b590b439b370d17914eccad7a6646fe9111d39e584899b6625 |
|
MD5 | 23c946af9266a1bbf712a13e27e844de |
|
BLAKE2b-256 | 5cdfa20e62f346f9d970af7bf47bf6d4f7aa7d4da4520db2118247278887dda1 |
Close
Hashes for pyaiken-0.5.0-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5608bbbb0a7ea4236385e2e93aa46cdaaa75428f7f1b2efb1d7e45871c209031 |
|
MD5 | 8d0c9118d396791974ad008baf1dac87 |
|
BLAKE2b-256 | a26c88e90c8e05a8223f0e7c809456b37116a395d1818c13ef71fa0cbd3d1d51 |
Close
Hashes for pyaiken-0.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63d49b21c0f018dc0c4ccaf501c0fb276c8bd23e599c42e6696b69c6998543d4 |
|
MD5 | 95e179bfd5027dba1c10a6737020abf1 |
|
BLAKE2b-256 | 6dbe0f8ad53a1c074266712be84de200ed77329aa8bc5cb0d3a00c7ed42eeac1 |
Close
Hashes for pyaiken-0.5.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc970fd655b2768d566b5cb69c097e04d30bfce601e3168fff6bc69ababf015f |
|
MD5 | bd4a62393f89b4103335b2af639e9dd6 |
|
BLAKE2b-256 | b5968a14706898390b7903f8969e745f3d1ef529b8c1c1dff37187c2476903d3 |
Close
Hashes for pyaiken-0.5.0-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c5ed7c799bfccd06471db9a3dc1621370eff23f2f1599a8bba6bbd367c16c1c |
|
MD5 | daa09268cee1ca8b2765bb9f62e017a2 |
|
BLAKE2b-256 | 14a2ad4b3cd49fa5094fa404223fc5b7c938a10af1f0a520affb356aa8b30bdd |
Close
Hashes for pyaiken-0.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a755f4d701bf2879d063cfd28d42f9020233cc48e5fc12c601db98534a2ed53 |
|
MD5 | 5ddb73d7705f6d10d9432409347e2b24 |
|
BLAKE2b-256 | f019c414b8e6bef15aad702e2c1c38bae62816ebaf8e8a27949240f8d7fe1044 |
Close
Hashes for pyaiken-0.5.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df57db70baca1c52ccc1403245eb48c5b26195e850a25765a977f81219027975 |
|
MD5 | 3eff8125a3c4335972ea1f310bf5e2ec |
|
BLAKE2b-256 | 0a1e1db77528472c351cf648a3a22ee05addd67e03e07e270edd7e72de8f850b |