microraiden.examples package

Submodules

microraiden.examples.echo_client module

This is dummy code showing how the minimal app could look like.

microraiden.examples.echo_client.run(private_key, password_path, resource, channel_manager_address=None, web3=None, retry_interval=5, endpoint_url='http://localhost:5000')[source]

microraiden.examples.echo_server module

This is dummy code showing how the minimal app could look like. In his case we don’t use a proxy, but directly a server

class microraiden.examples.echo_server.DynamicPriceResource(channel_manager, light_client_proxy=None, paywall=None, price=None)[source]

Bases: microraiden.proxy.resources.expensive.Expensive

get(url, param)[source]
methods = {'GET'}
price()[source]

Implement this if you want to have price set dynamically.

Returns:
price of a resource. If the value returned is 0, no paywall checks are
done and the actual content will be sent to the user.
Return type:int
class microraiden.examples.echo_server.StaticPriceResource(channel_manager, light_client_proxy=None, paywall=None, price=None)[source]

Bases: microraiden.proxy.resources.expensive.Expensive

get(url, param)[source]
methods = {'GET'}
microraiden.examples.echo_server.run(private_key, state_file_path='/home/docs/.config/microraiden/echo_server.db', channel_manager=None, join_thread=True)[source]

microraiden.examples.stats_client module

A simple client that displays status of a local proxy

class microraiden.examples.stats_client.bcolors[source]

Bases: object

BLUE = '\x1b[94m'
BOLD = '\x1b[1m'
ENDC = '\x1b[0m'
GREEN = '\x1b[92m'
HEADER = '\x1b[95m'
RED = '\x1b[91m'
UNDERLINE = '\x1b[4m'
YELLOW = '\x1b[93m'
microraiden.examples.stats_client.do_request()[source]
microraiden.examples.stats_client.nice_print(key, val, val_prev)[source]
microraiden.examples.stats_client.run()[source]

microraiden.examples.ticker_client module

microraiden.examples.ticker_proxy module

class microraiden.examples.ticker_proxy.ETHTickerProxy(privkey=None, proxy=None)[source]

Bases: object

stop()[source]
microraiden.examples.ticker_proxy.start_proxy(receiver_privkey)[source]
Return type:PaywalledProxy

microraiden.examples.wikipaydia module

Paywalled wikipedia - example of the PaywalledProxyUrl class

Module contents