Python Steem Libraries 0.1

in #undefined8 years ago (edited)

Python Steem Libraries Version 1.0 released!

This library allows you to interface with the wallet and/or a steem node
for polling data via RPC calls.

Download

You can download directly from github:

git clone https://github.com/xeroc/python-steem/
cd python-steem
python3 setup.py install --user

Or use pip

pip3 install steem --user

Setup

Even though you can connect to a remote full node, you can start a local
node via:

cd <path-to-steem>
./programs/steemd/steemd --rpc-endpoint="127.0.0.1:8090"

Then you can connect a cli_wallet to your full node and open a new
port at 8092:

./programs/cli_wallet/cli_wallet --server-rpc-endpoint=ws://localhost:8090 \
                                 --rpc-http-endpoint=127.0.0.1:8092 \
                                 --rpc-http-allowip=127.0.0.1

We will use both open ports in the example.

Usage Examples

from steemapi.steemclient import SteemClient
from pprint import pprint

class Config():
    # Port and host of the RPC-HTTP-Endpoint of the wallet
    wallet_host           = "localhost"
    wallet_port           = 8092
    # Websocket URL to the full node
    witness_url           = "ws://localhost:8090"

client = SteemClient(Config)

# Calls to the Wallet

pprint(client.wallet.vote("<your-account>", "hello", "world", 100, True))

# Calls to the Node
pprint(client.node.get_trending_categories("", 20))
pprint(client.node.get_content("hello", "world"))

More examples can be found in the examples/ directory.

Sort:  

Great work Xeroc. Your libraries make working with graphene chains truly a joy.

Thank you, I enjoy writing python a lot myself!

This is great work xeroc! Thanks for supporting steem!

Why is this showing up on my feed? I marked it as spam because it's on my blog that has nothing to do with this.

How did a reply ( that is two years old ) that has nothing to do with my article get posted under it ?

Sent me a little steem

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64777.26
ETH 3101.53
USDT 1.00
SBD 3.84