Skip to main content

Python bindings for aiken

Project description

pyaiken

Build Status PyPI version PyPI - Status

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


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 details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyaiken-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (522.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyaiken-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (489.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

pyaiken-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (522.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyaiken-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (489.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

pyaiken-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (522.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyaiken-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (489.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

pyaiken-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (522.4 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pyaiken-0.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (489.4 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

Details for the file pyaiken-0.2.1.tar.gz.

File metadata

  • Download URL: pyaiken-0.2.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.10

File hashes

Hashes for pyaiken-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1b2af5629a4967d78fa66065d7b4e5a38968082e86b09e0d91750e65b74991c5
MD5 1e266f1048ef87aa56c6b4e5ce06b191
BLAKE2b-256 eed2ff72f3f51a1ce1dedef9ccd00e4d36beffb37aee72672241134d7b80859f

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file pyaiken-0.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

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

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page