Dev Update - Nozzle v0.1.2

nozzle200.png

Yesterday, blockbrother dev @bennierex updated Nozzle, our RPC-client for the Steem blockchain.

Nozzle was born out of requirements for other projects of @blockbrothers (Steemify, SteemTurbine, and VoteBot), to have a more stable and low-level RPC-client for the steemd nodes of the Steem network.

Nozzle is open-source, so feel free to use it for your own projects.
Get it from our Github repo: https://github.com/blockbrothers/nozzle

Bug Fixes


A total of three issues were fixed, two of them were still open until today;

  • Issue #1 - Getting nodes property from RPCClient causes infinite loop.
  • Issue #2 - Unable to stream blocks.
  • Issue #3 - Possible infinite loop in call-method of RPCClient.

Issue #1 was fixed by creating a copy of the nodes list by iterating the itertools.cycle.

Issue #2 was fixed by changing the constant STEEMIT_BLOCK_INTERVAL to STEEM_BLOCK_INTERVAL, as it seems to have changed on the RPC-nodes.

Issue #3 was fixed by refactoring the while-loop in SteemdClient.stream_blocks() method.

New Features


I've added a few high-level methods to nozzle.client.SteemdClient to get accounts, get account reputation, get witness accounts by id, and get witness accounts by accountname:

from nozzle import Steem
s = Steem(nodes=['https://api.steemit.com'])
s.get_accounts(['blockbrothers', 'bennierex', 'eqko', 'exyle', 's3rg3'])
s.get_account_reputation('blockbrothers')
s.get_witnesses_by_account(['blockbrothers', 'aggroed'])
s.get_witnesses_by_id([14639, 14503])

Enhancement


SteemdClient.get_blocks() and SteemdClient.stream_blocks() now always yield a block, even if it is None. It's up to the consumer to decide what to do when that happens.

Installation / upgrade


The new version, v0.1.2, is available on pypi.

To install, simply run pip install steem-nozzle.

To upgrade, run pip install --upgrade steem-nozzle.

Planned future enhancements


  • Add more high-level functions.
  • Make nozzle compatible with Appbase.
  • Performance improvements.
  • Communities/Hivemind/SMT compatibility (when available)



If you support us please vote here for @blockbrothers
witness_vote.gif
you can also choose to set blockbrothers as your proxy at the bottom of the page (fill in blockbrothers in the field)
or use either of the below links to do so automatically using steemconnect.


Vote for @blockbrothers via SteemConnect
Set blockbrothers as your proxy via SteemConnect


Makers of Steemify. The dedicated notification app for anything happening on the Steem blockchain.


Android coming soon.



Votebot

Get in touch:

https://blockbrothers.io
steemify@blockbrothers.io | witness@blockbrothers.io
Telegram: https://t.me/blockbrothers

H2
H3
H4
3 columns
2 columns
1 column
7 Comments
Ecency