marlowe-rs bindings for using cardano marlowe in python
Project description
MARLOWE-PY
Python bindings for Marlowe_Lang marlowe-rs.
Features
- Deserialize contracts from: cbor-hex, dsl, json.
- Deserialize datums & redeemers from cbor-hex,json.
- Serialize contracts to json, dsl.
- Serialize datums & redeemers to cbor-hex, json.
- Unstable: View contract expected next inputs and other state info.
- Unstable: Define contracts directly in Python.
- Unstable: Code generator: Convert any contract to equivalent Python code
Project goals
- Provide easy to use API's for everything marlowe-rs supports.
- Provide easy to use way of designing Marlowe contracts in Python.
How to install
pip install marlowe
Alternatives:
- pip install wlh files directly using builds artifacts from CI: https://github.com/OlofBlomqvist/marlowe-py/actions/workflows/build_wheels.yml
- clone the repo, install prereqs: rust,python,maturin; run wheels.ps1 or wheels.sh
How to use
See the example notebook here.
Basic contract construction:
When(
case=[
Deposit(
by = Role("GUY1"),
value = Constant(42000000),
of_token = ADA,
into_account = Role("GUY2"),
then_continue_with = raw(Close()) # or merkleized("some hash")
)
],
timeout = TimeConst(999999999),
timeout_continuation = Close()
)
Building from source
- See development.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for marlowe-0.1.5-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25b1946cf5e8df9a5b20cb20c86000de5cfdde60a2bdb916a7c087b39bd2378c |
|
MD5 | ade0a3bc83ce64f29e0530c6788f118c |
|
BLAKE2b-256 | 0306912a3588558d4166f967f0eec4b689a5185846fe43e2070ab1094160c65b |
Close
Hashes for marlowe-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 528fdd46b27889026430f6274f7cd7cfb74b3330e81fb0332068f4888478e97b |
|
MD5 | 1e9fc6c0348463abab4587970413d530 |
|
BLAKE2b-256 | c17021e06082d9756d6a39692eddd26961eecd5941f1947854a424fe55b7d931 |
Close
Hashes for marlowe-0.1.5-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06dfe47b8e095d311c42e0902a8d019759b73b9b8f5a1cb256983cda11f18d14 |
|
MD5 | 810fed0a9d16f95100d4b0fa70bc2b40 |
|
BLAKE2b-256 | 8b5f932d4be43b11a256a40991cde04c662edbf63ba3907a9874efb8b7a6bc53 |
Close
Hashes for marlowe-0.1.5-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 608c93123d6b110533e6dc118e91948c7fd9b28ec93e79661f5fe284a2c21775 |
|
MD5 | 3297d94e07206399f5534079eedfc165 |
|
BLAKE2b-256 | c8ea529f360cf187a5b76d75074246f11e402e064d648486f9f4668cc6a9f9c5 |
Close
Hashes for marlowe-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be220ed10f4bdca0da765c466c71de120019503784832884157023400ded5d22 |
|
MD5 | 854f18dbed9510792148af777d41cc93 |
|
BLAKE2b-256 | 7528588501395686e53e3475b721883c65143a605a3002a476d29e0eb0381875 |
Close
Hashes for marlowe-0.1.5-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70179a39799088cdbad4e34d0c39b20a0dd455eb581ebca9cdd68be7332c27cb |
|
MD5 | 1d8b7e7cc3466d6068fe2f03d925b2d1 |
|
BLAKE2b-256 | 1d4fc91bd6f8f9c43c6bd4d61e0f168439ca9cdd309865b0ca49dfe0b5abb74b |