A Framework for building PyTeal Applications
Project description
Beaker
Beaker is a smart contract development framework for PyTeal inspired by Flask
With Beaker, we build a class that represents our entire application including state and routing.
Mostly Untested - Expect Breaking Changes
Hello, Beaker
from pyteal import *
from beaker import *
class HelloBeaker(Application):
@external
def hello(name: abi.String, *, output: abi.String):
return output.set(Concat(Bytes("Hello, "), name.get()))
if __name__ == "__main__":
from algosdk.atomic_transaction_composer import AccountTransactionSigner
from beaker import sandbox, client
app = HelloBeaker()
addr, secret = sandbox.get_accounts().pop()
app_client = client.ApplicationClient(
sandbox.get_client(), app, signer=AccountTransactionSigner(secret)
)
app_id, app_addr, txid = app_client.create()
result = app_client.call(app.hello, name="Beaker")
print(result.return_value) # Hello, Beaker
Install
Currently only installing from github is supported
pip install git+https://github.com/algorand-devrel/beaker
Use
Please feel free to file issues/prs
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
Built Distribution
Close
Hashes for beaker-pyteal-0.0.2.post2.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e9c5c93935da1fe206b13263986f8ff8112e62de95b2889893af405e2a468cf |
|
MD5 | 670525925534f52b9cef6b5cd56e9b02 |
|
BLAKE2b-256 | ff141999260b653b3824a14dba8158fbccd7435ee283a7170d21515506a468cd |
Close
Hashes for beaker_pyteal-0.0.2.post2.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 528902fd0ced835b22539f3c31f413cdf438e380111663df0f91279249a7b0c9 |
|
MD5 | 81212ecb491a90259e894a7f697b3d8d |
|
BLAKE2b-256 | a903040f055c338aaf6da85c1f515add7984692621e3420a570310561941e790 |