Python Toolkit for EOSIO
pip install uuoskit
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
git clone https://www.github.com/uuosio/uuoskit
cd uuoskit
git submodule update --init --recursive
./build.sh
For Windows platform In the cmd dialog, enter the following command:
python setup.py sdist bdist_wheel
./install.sh
For Windows platform
python -m pip uninstall uuoskit -y;python -m pip install .\dist\uuoskit-[SUFFIX].whl
import os
from uuoskit import uuosapi, wallet
if os.path.exists('mywallet.wallet'):
os.remove('mywallet.wallet')
psw = wallet.create('mywallet')
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
uuosapi.set_node('https://eos.greymass.com')
info = uuosapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'})
import os
import asyncio
from uuoskit import wallet
from uuoskit.chainapi import ChainApiAsync
if os.path.exists('mywallet.wallet'):
os.remove('mywallet.wallet')
psw = wallet.create('mywallet')
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
async def test():
uuosapi = ChainApiAsync('https://eos.greymass.com')
info = await uuosapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
r = await uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'})
print(r)
asyncio.run(test())