An alternative steem-python with the bug fixes!

in #utopian-io8 years ago (edited)

The official steem-python package is excellent however they're not reviewing/accepting/rejecting pull requests at github.

I am building a new platform operating at steem blockchain - it's huge and mostly relies on steem-python. I hit that bottleneck where you can't set beneficiaries with the officicial package. (see the ongoing discussion started at July 1, 2017.)

Because of those issues, today I have created a new fork with the fixes of mine and @crokkon.

Bug Fixes


Change of default node

Default node is jussi (api.steemit.com) now instead of the deprecated steemd.steemit.com. You don't need to pass steemd_instance to everything now.

Propagation of custom steemd instance to internal constructors

Account, Post, Blockchain, Converter, Block classes now obeys the custom node selection. (credits to @crokkon)

Fix custom node selection on steempy CLI.

The steempy cli ignored the setting from the --node command line option and always used the default node due to a parameter name mismatch/typo on the Steem()
constructor parameters. (credits to @crokkon)

Fix the version of TOML in dependencies.

Package should be installed in any environment without hassle now. There was a bug which causes installation fail because of the toml has a missing version.

Fix reputation calculation

Reputation calculation is aligned with the condenser.

from steem.account import Account
print(Account('emrebeyler').rep)

New Features


Beneficiaries

Removed all beneficiary helpers and syntactic sugar around it. It wasn't working anyway. It still supports extensions. So you can set beneficiaries like this:

from steem import Steem
s = Steem(keys=["active_wif"])
comment_options = {
    "extensions": [[0, {
        'beneficiaries': [
            {'account': 'crokkon', 'weight': 1000},
            {'account': 'emrebeyler', 'weight': 5000},
        ]}]]
}
s.commit.post(
    title='my title',
    body="my body",
    author='post_author',
    tags=['test'],
    comment_options=comment_options,
)

Current voting Power

Account class has a new helper method to get current voting power. It also takes into account the regenerated
VP after the last vote cast.

from steem.account import Account
print(Account('emrebeyler').current_voting_power())

Implement DeleteComment operation.

delete_comment now has a high-level abstraction in operations.py.

from steem import Steem
s = Steem(keys=["posting_wif"])
s.delete_comment("@username/comment-identifier", account="comment_author")

Installation

$ pip install steem_dshot

All the internal api and imports same with the official package except the differences listed above.

Roadmap

There are still a couple of issues needs to be addressed. I will maintain this fork and sync with the upstream as long as possible.

How to contribute?

You can open pull requests/issues on the repository for the bug-fixes and feature requests. For any other stuff, contact me via Discord. (emre#9263)

Note: %20 of the liquid rewards of this post will be sent to @crokkon for his contribution to this fork.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Sounds great! Recently I wasted a lot of time because I haven't set steemd_instance in the Post constructor and I couldn't find where the problem is.

I can imagine your frustration :)

That's some very cool stuff !

I stumbled myself on that beneficiaries discussion several times.
Having a good default node would really help confused beginners. (FINALLY).
So yeah :

Hey @emrebeyler I am @utopian-io. I have just upvoted you!

Achievements

  • You are generating more rewards than average for this category. Super!;)
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Woo, this is great! I've been hacking around with set_shared_steemd_instance but always found it a pain. Definitely going to be using your package from now on!

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.081
BTC 60924.48
ETH 1580.88
USDT 1.00
SBD 0.47