Asynchronous Steem Client


This is a low level class. Do not use this class unless you know what you are doing!


class pistonapi.steemasyncclient.Config(**kwargs)

The Config class is used to contain all the parameters needed by SteemAsyncClient in a neat and simple object. The main parameters needed are the witness connection parameters and the mapping of aliases used in code to Steem APIs that are requested to be initialized by SteemAsyncClient on behalf of the code.

The simplest way to create a valid Config object is to pass the keyword arguments to the constructor to initialize the relevant parameters, as the following example demonstrates:

config = Config(witness_url      = "ws://localhost:8090/",
                witness_user     = "",
                witness_password = "",
                witness_apis     = {"db": "database",
                                    "broadcast": "network_broadcast"},
                wallet_url       = "ws://localhost:8091/",
                wallet_user      = "",
                wallet_password  = "")

But the better way to create the Config object is to put the parameters in YAML configuration file and load it as in the following example:

config = Config(config_file = "/path/to/config.yml")

Note that you can combine both methods by specifying a config_file but then selectively overriding any of the paramaters from the configuration file by specifying them directly as keyword arguments to the Config constructor.


class pistonapi.steemasyncclient.SteemAsyncClient(config)

Steem Asynchronous Client

The SteemAsyncClient class is an abstraction layer that makes asynchronous use of the RPC API of either steemd (witness) or cli_wallet (wallet) easy to use.

Parameters:config (class) – the configuration class

Example usage of this class:

from pistonasyncclient import SteemAsyncClient, Config

def print_block_number(steem):
   res = yield from piston.database.get_dynamic_global_properties()

steem = SteemAsyncClient(Config(witness_url="ws://localhost:8090",

See more examples of how to use this class in the examples folder.