update for beem: first release for HF 21

in #beem5 years ago (edited)

Repository

https://github.com/holgern/beem


beem-logo

beem is a python library for steem. The current version is 0.21.1.

There is also a discord channel for beem: https://discord.gg/4HM592V

The newest beem version can be installed by:

pip install -U beem

Changelog

0.21.1
------
* Fix non ascii text handling on some nodes
* Add STEEM_REVERSE_AUCTION_WINDOW_SECONDS_HF21 constant
* Fix get_curation_rewards

0.21.0
------
* First release for HF21
* get_downvoting_power added to account
* get_downvote_manabar added to account
* add options use_tags_api to use database api to get comments
* fix get_similar_account_names
* add more try expect to fail back to condenser api
* operations for account_update2, create_proposal, update_proposal_votes and remove_proposal were added
* update_proposal_votes was added to steem
* update_account_jsonmetadata was added to account
* new beempy delete were added

Get content without using the tags api

At the moment most nodes have disabled the tags api. I added a new parameter, so that it is still possible to receive comments.

from beem import Steem
from beem.comment import Comment
stm = Steem(node="https://api.steemit.com")
c = Comment("@holger80/bumpy-start-with-hf-21-scotbot-is-running", steem_instance=stm)
set_full = set(list((c.keys())))
c = Comment("@holger80/bumpy-start-with-hf-21-scotbot-is-running", use_tags_api=False, steem_instance=stm)
set_lite = set(list((c.keys())))
print(set_full - set_lite)
print(set_lite - set_full)

Which shows the missing fields, when not using the tags_api:

{'active_votes',
 'author_reputation',
 'body_length',
 'pending_payout_value',
 'post_id',
 'promoted',
 'replies',
 'root_title',
 'url'}

and the added fields:

{'abs_rshares',
 'active',
 'allow_curation_rewards',
 'allow_replies',
 'allow_votes',
 'author_rewards',
 'children_abs_rshares',
 'max_cashout_time',
 'net_votes',
 'reward_weight',
 'root_author',
 'root_permlink',
 'total_vote_weight',
 'vote_rshares'}

use_tags_api=False can be used when the active votes of the post are not needed.

json-parsing was fixed

from beem import Steem
stm  = Steem("https://anyx.io")
from beem.block import Block
b = Block(35097419, steem_instance=stm)
print(b.operations[-22]["value"]["title"])

returns now the correct utf-8 string:
<스파이더맨 : 파 프롬 홈> 블루엔젤 니어 프롬 (퓨처) 홈 💙

Downvote manabar

from beem.account import Account
acc = Account("holger80")
print(acc.get_downvote_manabar())

returns

{'last_mana': 30121812653872, 'last_update_time': 1567022076, 'current_mana': 30429666853775, 'max_mana': 32442250357182.0, 'current_mana_pct': 93.79641214388982}

New proposal operation

The new proposal operation were added as operation, so far only update_proposal_votes was added as function to steem:

from beem import Steem
stm = Steem()
stm.wallet.unlock("...")
stm.update_proposal_votes([0], True, account="holger80")

Outlook

The following things are on my todo list:

  • add the other proposal operations
  • fix get_replies
  • fix curation rewards calculations
  • add functions to show information about proposals
  • add proposal to beempy
Sort:  

Everything is okay! 👌


Dear @holger80,
you received an automatic upvote, because I believe in you and I love what you create! 😉

A huge hug from @amico! 🤗

!trdo & !giphy okay


If you dislike this automatic message, please let me know: thanks! 🙏



// You can support giphy by using one of your witness votes on untersatz! //

Congratulations @amico, you are successfuly trended the post that shared by @holger80!
@holger80 got 6 TRDO & @amico got 4 TRDO!

"Call TRDO, Your Comment Worth Something!"

To view or trade TRDO go to steem-engine.com
Join TRDO Discord Channel or Join TRDO Web Site

This post has been just added as new item to timeline of beem on Steem Projects.

If you want to be notified about new updates from this project, register on Steem Projects and add beem to your favorite projects.

Hi @holger80!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 7.611 which ranks you at #49 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 118 contributions, your post is ranked at #113.

Evaluation of your UA score:
  • Your follower network is great!
  • Try to show your post to more followers, for example via networking on our discord!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

Hi, @holger80!

You just got a 4.18% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Nice work, as always! Beem is so beneficial to a lot of projects out here. Great work.

Hi @holger80 , I am curious to know if you are planning to re-lauch beempy as well. Do you have any new about it?