Skip to main content

Python Toolkit for EOSIO

Project description

Python Toolkit for EOSIO

Quick Start Binder

Latest Release

uuoskit v1.0.2

Installation

pip install uuoskit

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
  1. Download and Install gcc compiler from tdm-gcc
  2. Install Go compiler from download
  3. Install cmake from download
  4. 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/uuosio/uuoskit
cd uuoskit
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 uuoskit -y;python -m pip install .\dist\uuoskit-[SUFFIX].whl

Example1

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'})

Async Example

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())

License

MIT

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

uuoskit-1.0.4.tar.gz (94.6 kB view hashes)

Uploaded Source

Built Distributions

uuoskit-1.0.4-cp310-cp310-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

uuoskit-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

uuoskit-1.0.4-cp310-cp310-macosx_10_15_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

uuoskit-1.0.4-cp39-cp39-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

uuoskit-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

uuoskit-1.0.4-cp39-cp39-macosx_10_15_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

uuoskit-1.0.4-cp38-cp38-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

uuoskit-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

uuoskit-1.0.4-cp38-cp38-macosx_10_15_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

uuoskit-1.0.4-cp37-cp37m-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

uuoskit-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

uuoskit-1.0.4-cp37-cp37m-macosx_10_15_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

Supported by

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