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.1.post4.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a030d7f3b9f741db456f0153c3cbef15739f1562750d1bef562946bb75e12386 |
|
MD5 | 0801dfb4f556f015638f2bcaf4b55f4f |
|
BLAKE2b-256 | b03b9b59e58ac7c9a5b10680509449e8c3871e0cb3b5c31cb7dcd6ebc8e59b44 |
Close
Hashes for beaker_pyteal-0.0.1.post4.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 880acceef85a77d5c904f576607372b048c1101df08fa8d87458104c8d58692e |
|
MD5 | a9d5b653ac0448895c2dbf9e72ca04bc |
|
BLAKE2b-256 | 83b10e204e52cd8d96e773fe2440e9cd1439f87f50128341791e16710da13ecd |