Skip to main content

Python library for the REST API

Project description

eospy library

This library is still a work in progress but currently has the ability to perform all cleos get functions without compiling the code.

The library now supports signing transactions/key creation for both python 2.7 and 3.x. This is the first iteration and is very rough. The key creation has not been tested fully and should be used at your own risk.

The cleos commands currently implemented.

Usage: /usr/local/bin/cleos get SUBCOMMAND

    info                        Get current blockchain information
    block                       Retrieve a full block from the blockchain
    account                     Retrieve an account from the blockchain
    code                        Retrieve the code and ABI for an account
    abi                         Retrieve the ABI for an account
    table                       Retrieve the contents of a database table
    currency                    Retrieve information related to standard currencies
    accounts                    Retrieve accounts associated with a public key
    servants                    Retrieve accounts which are servants of a given account
    transaction                 Retrieve a transaction from the blockchain
    actions                     Retrieve all actions with specific account name referenced in authorization or receiver
    newaccount                  Create an account, buy ram, stake for bandwidth for the account

This library is very much a work in progress.



# create virtual environment
mkdir -p ~/envs/eospy
virtualenv ~/envs/eospy
# activate the environment
source ~/envs/eospy/bin/activate
# install the library
pip install git+


  1. Install python You can use either Python 2.7 or 3.7 however we suggest python 3.7 as we have tested that version more thoroughly. Python 2.7 Python 3.7

  2. Install git

  3. Install eospy

pip install git+

API Endpoints

For a more complete list of API endpoints check out:

Command line Tool Examples

# Get chain information
pycleos --url get info

# get information about a block
pycleos --url get block 447

# Retrieve an account from the blockchain
pycleos --url get account --account eosio

# Retrieve the code and ABI for an account
pycleos --url get code --account eosio

# Retrieve the ABI for an account
pycleos --url get abi --account eosio

# Retrieve the contents of a database table
pycleos --url get table --code eosio --scope eosio --table producers

# Retrive currency information
pycleos --url get currency balance --code eosio.token --symbol EOS --account aaaaaaaaaaaa
pycleos --url get currency stats --code eosio.token --symbol EOS

# get accounts associated with public key
pycleos --url get accounts --key EOS52gpRqAPfggYHLXbMuC4TSQd8WWWo94KrMq4umgUcjM62Y2dWF

# get transaction information
pycleos --url get transaction --transaction 42dacd5722001b734be46a2140917e06cd21d42425f927f506c07b4388b07f62

# get account actions
pycleos --url get actions --account aaaaaaaaaaaa


Check out the examples directory for some examples of how to use the library

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libeospy-1.1.8rc2.tar.gz (14.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page