/eosapi

eosapi is a simple, high-level and lightweight eosio sdk write by python

Primary LanguagePythonMIT LicenseMIT

eosapi

version license python_version coverage

A simple, high-level and lightweight eosio sdk write by python.

What is it?

eosapi is a python library to interact with EOSIO blockchains.

its main focus are bot applications on the blockchain.

Install

$ pip install eosapi

Using

from eosapi import EosApi

api = EosApi(rpc_host="https://jungle3.greymass.com")
api.import_key("consumer1111", "5KWxgG4rPEXzHnRBaiVRCCE6WAfnqkRpTu1uHzJoQRzixqBB1k3")

trx = {
    "actions": [{
        "account": "eosio.token",
        "name": "transfer",
        "authorization": [
            {
                "actor": "consumer1111",
                "permission": "active",
            },
        ],
        "data": {
            "from": "consumer1111",
            "to": "consumer2222",
            "quantity": "0.0001 EOS",
            "memo": "by eosapi",
        },
    }]
}

resp = api.push_transaction(trx)