This is the fifth update for steemsnippets an open source collection of code snippets on steem-related libraries. You can find more info in it here.
Details
On this update I finally started to work on the second most popular library : steem-python. I've covered some basic functions here but I'll soon expand and add more and more functions. The steem-python benefits from a very great documentation but it's hidden in the source code, it's cool for people who dig into it but not for those that ignore it's existence, so I put it out here above the snippet for each snippet.
Components
Added snippets :
Post (steem-python)
https://github.com/drov0/steemsnippets/blob/master/steem-python/post/post.py
Function header :
post(username, wif, title, body, permlink=None, reply_identifier=None, json_metadata=None, comment_options=None, community=None, tags=None, beneficiaries=None, self_vote=False)
The function has a lot of arguments so I had to pack everything in this is why the header is so large, but in reality most of the options are not mandatory so it's fine.
Vote (steem-python)
https://github.com/drov0/steemsnippets/blob/master/steem-python/vote/vote.py
Function header :
def vote(username, wif, identifier, weight)
Note that it uses the identifier, which is, @username/permlink wheras the js libraries only use the permlink.
I've hesitated to try to normalize everything but in the end it would just confuse people so I let it like that.
Posted on Utopian.io - Rewarding Open Source Contributors