Skip to main content

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.2.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

telospy-0.1.2-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file telospy-0.1.2.tar.gz.

File metadata

  • Download URL: telospy-0.1.2.tar.gz
  • Upload date:
  • Size: 8.7 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

Hashes for telospy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 78e9e58c92002d0c366c26ebe1a50a5f6633fdf7034cc1bf315773df66801cfa
MD5 3c9d104b25e1723d385ad178ac8a5f4e
BLAKE2b-256 69c16a0bbabe072c00304ebb111b7ea4f0cad5b99cac595dfdbc4270fa99616a

See more details on using hashes here.

File details

Details for the file telospy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: telospy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 33.2 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

Hashes for telospy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6729ff73f69e07de3edf576741b4660010d4429260fa0a63f271f2e5f34cb0e
MD5 8f06716364b887bf38dfd087a7dd768d
BLAKE2b-256 521b32ab6277df31e1664924619f828f78f9fc730c3f5cc193b539358cb134cd

See more details on using hashes here.

Supported by

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