Python Toolkit for EOS
Project description
Python Toolkit for EOS
Installation
On Linux platform
python3 -m pip install -U pip
python3 -m pip install pyeoskit
On Windows platform:
python -m pip install -U pip
python -m pip install pyeoskit
On Apple M1 hardware
pyeoskit does not have pre-built versions available for ARM chips. in order to build it from source code, you need to install cmake
, go
, scikit-build
, cython
.
brew install go
brew install cython
xcode-select --install
python3 -m pip install -U pip
python3 -m pip install cmake
python3 -m pip install scikit-build
python3 -m pip install pyeoskit
Code Examples
Example1
import os
from pyeoskit import eosapi, wallet
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
eosapi.set_node('https://eos.greymass.com')
info = eosapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'})
Async Example
import os
import asyncio
from pyeoskit import wallet
from pyeoskit.chainapi import ChainApiAsync
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
async def test():
eosapi = ChainApiAsync('https://eos.greymass.com')
info = await eosapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
r = await eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'})
print(r)
asyncio.run(test())
Sign With Ledger Hardware Wallet Example
import os
from pyeoskit import eosapi
eosapi.set_node('https://eos.greymass.com')
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
#indices is an array of ledger signing key indices
eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}, indices=[0])
Docs
Building from Source Code
Installing Prerequisites
python3 -m pip install scikit-build
python3 -m pip install cython
For Windows platform
python -m pip install scikit-build
python -m pip install cython
- Download and Install gcc compiler from tdm-gcc
- Install Go compiler from download
- Install cmake from download
- Install python3 from downloads
Press Win+R to open Run Dialog, input the following command
cmd -k /path/to/gcc/mingwvars.bat
Downloading Source Code
git clone https://www.github.com/learnforpractice/pyeoskit
cd pyeoskit
git submodule update --init --recursive
Build
./build.sh
For Windows platform, in the cmd dialog, enter the following command:
python setup.py sdist bdist_wheel
Installation
./install.sh
For Windows platform
python -m pip uninstall pyeoskit -y;python -m pip install .\dist\pyeoskit-[SUFFIX].whl
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyeoskit-1.1.11.tar.gz
(3.8 MB
view hashes)
Built Distributions
Close
Hashes for pyeoskit-1.1.11-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44e0b9ff680bb5d97491510bda7221222b567389db88344fbc438ece5ebfc7a8 |
|
MD5 | 9739cb1b7d9f18011fa7bcbfa03e97c4 |
|
BLAKE2b-256 | 04bcbdeaa60baf0ee373e183fa718a19d9eb30ead1011555207eda8f14f6fbad |
Close
Hashes for pyeoskit-1.1.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af0486d004a553e6e3cfe73091006f3bf5b7068b679fd442b254e7de71227b17 |
|
MD5 | c81f58546bb720fdc9fcd7a0aac5b12c |
|
BLAKE2b-256 | 892469232400df83fc41edb36df905b1f7883d94df5a38aea95a50fd1c2da2ed |
Close
Hashes for pyeoskit-1.1.11-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 572e591b4936594b3b369294367259541bfc538532c87b6881b13bbfdae720f9 |
|
MD5 | 5a717765ac5bfd713c7bccdb3fb5d686 |
|
BLAKE2b-256 | 1916a6314587f5a681c4c56eeb085da1d2a1654b412cbe753f9ba2cb6802136d |
Close
Hashes for pyeoskit-1.1.11-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e6134df710f95e52fe5fcc68598a5c903c75bcb6fded6b3e2202dc31914bbd |
|
MD5 | e3b5f6228cac10e52445999559f66d7f |
|
BLAKE2b-256 | 7900dbf07539e9fb86719b8eb3c6571220c6053e98490e2e0c853aabd2d6b46e |
Close
Hashes for pyeoskit-1.1.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bbdb79b09fed9f2410e971cab775628ebbb5195a3f4eb9deb9c0959d6212dfa |
|
MD5 | a1a538a9f121aaa687c64ab1bc882686 |
|
BLAKE2b-256 | 6511f57a8b08bce342e24ebf83a9a7b8b2623dd9a2ccd5e2e44f81d1d7610831 |
Close
Hashes for pyeoskit-1.1.11-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecc6b50a869c1305a233d6d9267c23d1623376dea18bbbe07ea70ea446cdd4b3 |
|
MD5 | e91cd164a5429fec240fa73f2b086eb2 |
|
BLAKE2b-256 | 092d1eb7ad227e4b819a1a802bd9fd7259be633be4bfa5cda079ffa40f37380e |
Close
Hashes for pyeoskit-1.1.11-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ba6139ef3e28e074aa2110ee74f83d7106df6f99fbb9c4bd9e01e4f105d2537 |
|
MD5 | 1d5fbc791e32038bc32e76dd3d9b48f7 |
|
BLAKE2b-256 | c9bcfb3942e2b361da33b6559f2f37ca4f933fc9360c79894fecfc7a59d9395f |
Close
Hashes for pyeoskit-1.1.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 351cb34876852747788f9100c36be5c4e5e9f88b263f6ea423b8a957c85f3822 |
|
MD5 | c24263f5f144563d60af62359e5b4e3d |
|
BLAKE2b-256 | 6f6e82c6dc9d776dd53d83d25c680b9e89ef6e933534b9ea934a358f59d91e7d |
Close
Hashes for pyeoskit-1.1.11-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f891a456bbdce2cc1871c66e183c1258589b9a35c3a56f7079558fdb01c16e81 |
|
MD5 | 480b7405eab96468dfaed2b8c224ae3d |
|
BLAKE2b-256 | 6b3bd03e9f8bc59af8ebb3444559e3118860775dbf27e3aaac3ab6f0ab0df434 |
Close
Hashes for pyeoskit-1.1.11-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f48a838024559d73a2c4d41a1a8b02689160b7b31b36ba3830cd7e102166ee56 |
|
MD5 | 21378e7c8efb7adaea35798a30be60bb |
|
BLAKE2b-256 | f81242f8bd92adb9795518b293b85e1cdc3b1687822110574df779c8f5476b7e |
Close
Hashes for pyeoskit-1.1.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 762d3ee5f1e036543bbca4fb43d15cd02e736ca172f8f6b805e63bb2ecc4d607 |
|
MD5 | 2c139518b4d531d89de8ae458e49b1a7 |
|
BLAKE2b-256 | 5cf77e52f5470da78aa44defce00de2d2e5b3d30589c557850cfca52dc520440 |
Close
Hashes for pyeoskit-1.1.11-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e80fa8271e8d0a5ab3ac1765848b037a6b2359742e80ae41fad8d0ad8c12a547 |
|
MD5 | ad6fe2d8430f4b90aec5baea54835392 |
|
BLAKE2b-256 | 7a72242fabe22f42321a0a870492fa8bee070fb904f7c7ea157e188ceadbe080 |