Skip to content

Python framework for handling the stream of Algorand transactions

License

Notifications You must be signed in to change notification settings

algobolson/algobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

algobot

Python framework for handling the stream of Algorand transactions

Generally it works like an http server framework where you register a handler and the framework hands event data to your handler functions.

Requires Algorand Python sdk:

pip install py-algorand-sdk

Basic template:

import algobot
def block_handler(bot, block):
    pass
def txn_handler(bot, block, txn):
    pass
algobot.main(block_handlers=[block_handler], txn_handlers=[txn_handler])

Customized flow:

def main():
    ap = algobot.make_arg_parser()
    # ap.add_argument(...)
    args = ap.parse_args()
    # maybe do stuff with args you added or override defaults
    bot = algobot.setup(
        args,
        block_handlers=[block_handler],
        txn_handlers=[txn_handler],
    )
    bot.loop()

About

Python framework for handling the stream of Algorand transactions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages