Light weight interface for using EOSIO based RPC APIs
Project description
telospy
Lightweight python package for working with EOSIO based RPC APIs.
Install
pip3 install telospy
Example
from telospy.api import API
from telospy.models import Action
from telospy.models import Permission
from telospy.exceptions import AccountAlreadyExistsException
# This example assumes that there is a node running locally on the machine
# It also assumes that the chain is a telos chain, but telospy works on either telos or eos
api = API('http://127.0.0.1:8888', 'http://127.0.0.1:8999', 'v1')
try:
api.create_account('eosio', 'goodblockio1', 'TLOS8BLqdVB2Lk4qppxrUkA3xGrgqbgbiBLM5iey7X5t1LbDYkG2yA')
except AccountAlreadyExistsException:
pass
args = {'from': 'eosio', 'to': 'goodblockio1', 'quantity': '1000.0000 TLOS', 'memo': 'Sent from telospy!'}
permission = Permission('eosio', 'active')
transfer_action = Action(account='eosio.token', action_name='transfer', args=args, authorizations=permission)
receipt = api.send_transaction(transfer_action)
print(receipt)
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
telospy-0.1.6.tar.gz
(13.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
telospy-0.1.6-py3-none-any.whl
(38.4 kB
view details)
File details
Details for the file telospy-0.1.6.tar.gz.
File metadata
- Download URL: telospy-0.1.6.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81e5d0f9cfcf2a2e93f35563cf17fec746555fd7275f248b2adbab2bcb93eac
|
|
| MD5 |
0078e30ddc14d6549df712483db423c1
|
|
| BLAKE2b-256 |
899408fda4a08addfbdbd9611a1fbefb481d9364d3f4cc013dbd06805223b355
|
File details
Details for the file telospy-0.1.6-py3-none-any.whl.
File metadata
- Download URL: telospy-0.1.6-py3-none-any.whl
- Upload date:
- Size: 38.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee4dc506bb410973b58bad881061d1359993fdda8dacd73696abac019279512
|
|
| MD5 |
3a4dba21ca89a48d18be06245a66d74a
|
|
| BLAKE2b-256 |
6b4d71e33192139c37491c2f343da57cecaf146dd90554854bbe25cfc3a53d14
|