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.post1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6f02ca51f204909e6dd6b29b0087a3bee54045516ce9de18d43a2541608d96c |
|
MD5 | 569d8c488e768ebe9ebc89531c289910 |
|
BLAKE2b-256 | c5916615def9a5fbc9e6bd77eb740ba90a17cee8f1fd99b28b0fdc0211bbd7e7 |
Close
Hashes for beaker_pyteal-0.0.2.post1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0e00de56c9fc56772b9776db3ce358f89db383762c1dac54d55ccf3a2c3935 |
|
MD5 | eb61e33bd3766d281004cc24801ee4c1 |
|
BLAKE2b-256 | 172fb4e36a0dc1287ce80e7934d32cec6875014e5ebd918d4ac78fb08fb02381 |