Configuration

The pybitshares library comes with its own local configuration database that stores information like

  • API node URL
  • default account name
  • the encrypted master password

and potentially more.

You can access those variables like a regular dictionary by using

from bitshares import BitShares
bitshares = BitShares()
print(bitshares.config.items())

Keys can be added and changed like they are for regular dictionaries.

If you don’t want to load the bitshares.BitShares class, you can load the configuration directly by using:

from bitshares.storage import configStorage as config

API

class bitshares.storage.Configuration

This is the configuration storage that stores key/value pairs in the config table of the SQLite3 database.

checkBackup()

Backup the SQL database every 7 days

config_defaults = {'node': 'wss://node.bitshares.eu', 'rpcpassword': '', 'order-expiration': 604800, 'rpcuser': ''}

Default configuration

create_table()

Create the new table in the SQLite database

delete(key)

Delete a key from the configuration store

exists_table()

Check if the database table exists

get(key, default=None)

Return the key if exists or a default value