Can we make Python kick JavaScript's bud for STEEM API usage? (Bounty inside)

in python •  6 years ago 

Being the author of the asyncsteem STEEM JSON-RPC Python library, people are sometimes surprised if I advise them to use the alternative Python library Beem or, more often actually, advise them to opt for JavaScript instead and use steem-js.

The point is, when it comes to Python and STEEM, there is currently no golden solution. The official Python library is a mess when it comes to error handling. Its closest alternative Beem is a whole lot better in that area but like the official library is build around blocking synchronous operations, meaning that if you want to do anything scalable with it, you will end up with legacy type architectures where you have hundreds of threads for non-CPU constrained operations.
My own pet project, asyncsteem comes with the problem that it hardly has a user base compared to the two alternatives and that it lacks support for signed operations.

Today if someone asks what Python library they should use, the flow goes something like this:

  • If all user interaction goes through steem, use Beem.
  • If you don't need signed operations, use asyncsteem
  • Otherwise, use JavaScript

I hate having to admit JavaScript might be the best option for many scenarios, but IMO it is a simple reality. I want to fix this, but I definitely do not want to reinvent the wheel. @holger80 did great work on his signed operation API, but the fact that signing in Beem relies on blocking RPC primitives makes it completely unsuitable for use within an asynchronous event handling scope.

If we could do signed operations in a fully nonblocking asynchronous way, I am sure Python would kick JavaScript's but in the asynchronous steem arena. At this moment though it seems that reinventing the wheel might be our only option here.

Bounty

If I do end up needing to reinvent the wheel in order to use signed operations from the context of asynchronous event processing, that will likely cost me quite some time that I would rather spend on something else. For this reason I would like to put a bounty of 10 STEEM plus whatever the STEEM part of the payout of both this post and my latest asyncsteem tutorial will be, on the first brilliant Python developer showing (yes, code, not fluffy theory) that would allow us to use the async part of asyncsteem together with the signed operation part of beem without resorting to blocking operations.

The solution should:

  • Work with asyncsteem, beem and Twisted (patches to asyncsteem or beem are OK)
  • Not use any operations that might block
  • Basically: show that Python kicks JavaScript's bud
  • Be linked to in a comment to this post before the 1st of October.

If it can't be done, it can't be done and I'll be working on reinventing the wheel as soon as I have some time, but I just had to try with this modest bounty.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

We absolutely need better Python support. I kind of think that we need someone that seriously knows their programming to create some kind of Python tool to do pretty much anything, so we'll get some major development to the Python tools.

Alternatively, we need an open source project on the Steem blockchain that gets people excited, so it brings in some seriously good Python developers.

Thanks for putting up this bounty. I don't know if it will solve this particular problem...but maybe someone will figure it out.

Hey, did you consider posting this as a task request via utopian? You might reach a more devs, but the post may need a few more details. Get in touch with us on Discord if you're interested!

Tnx, I gave it a try, hope it will help reach someone who can figure out how to make Asyncsteem and Beem play nice together. Would be a shame if I had to write the whole signed operation stuff from scratch just to fit in with asynchonous operations.

A little update on the bounty:

  • The bounty has gone up from 10 STEEM to 34 STEEM
  • The deadline has been extended by one week to 8 October 0:00 AOE
  • It is now also allowed to come up with a solution that instead of Beem uses Litesteem.