Update for beem: huge performance improvements and bridge API support
hive-139531·@holger80·
0.000 HBDUpdate for beem: huge performance improvements and bridge API support
## Repository
https://github.com/holgern/beem<center>

</center>
[beem](https://github.com/holgern/beem) is a python library for STEEM and HIVE. The current version is 0.22.13.
There is also a discord channel for beem: https://discord.gg/4HM592V
The newest beem version can be installed by:
```
pip install -U beem
```
Check that you are using hive nodes. The following command
```
beempy updatenodes --hive
```
updates the nodelist and uses only hive nodes. The list of nodes can be checked with
```
beempy config
```
and
```
beempy currentnode
```
shows the currently connected node.
## Changelog for versions 0.22.13
* HiveSigner support added
* api link to steemconnect has been fixed
* change recovery account added to beempy
* hive node has been added
* add account get_notifications and mark_notifications_as_read
* beempy notifications has been added
* bridge api support added
* config storage improved and add get_default_config_storage, get_default_key_storage and get_default_token_storage
* list_all_subscriptions and get_account_posts added
* reduce number of performed api calls on Steem object creation
## Performance boost for beem
All integration tests are finishing now in
```
========== 469 passed, 27 skipped, 11 warnings in 1040.19s (0:17:20) ===========
```
which is an improvement of 49% (version 0.22.12 needed 1551 seconds).
This huge boost could be accomplished by reducing the number of API calls when creating the Steem object. When importing objects from beem, a `configStorage` object is no longer created during import. The config storage is now read during object creation with `get_default_config_storage`. This speeds up importing beem modules and read stored parameter only when needed.
These changes improves also the speed of all beempy commands.
## Bridge API
beem supports now parts of the bridge API. More functions to support the missing API calls will follow.
### notifications
```
beempy notifications holger80
```
prints a table with unread notifications.
```
+---------------------+------+-------------------------------------------+
| Date | Type | Message |
+---------------------+------+-------------------------------------------+
| 2020-04-06 10:15:57 | vote | @uwelang voted on your post ($0.23) |
| 2020-04-06 12:52:00 | vote | @steemcleaners voted on your post ($2.45) |
+---------------------+------+-------------------------------------------+
```
They can also marked as read with `-m`
```
beempy notifications -m holger80
```
which broadcasts notify custom_json.
### list all subscribtions
The account object has now a `list_all_subscriptions` functions which returns a list with all cummunities which the account has subscript.
### get_account_posts
The account object has now the `get_account_posts` function, which can be used to fetch all posts shown in the feed of the account.
### get_ranked_posts
A new class `RankedPosts` was added to `beem.comment` which can be used to receive ranked posts.
## Change recovery account with beempy
It is now possible to change the recovery account using beempy
```
beempy changerecovery -a holge80 recovery.account
```
## HiveSigner support was added
The following python example shows how to create a login link:
```
from beem.hivesigner import HiveSigner
hivesigner = HiveSigner(client_id="rewarding.app", scope="login", get_refresh_token=False)
hivesigner.get_login_url('https://rewarding.app/welcome')
```
returns
```
'https://hivesigner.com/oauth2/authorize?client_id=rewarding.app&redirect_uri=https%3A%2F%2Frewarding.app%2Fwelcome&scope=login'
```
The received token can then be used to check if a user was successfully entering its posting key in a python script:
```
try:
hivesigner.set_access_token(access_token)
name = hivesigner.me()["name"]
except:
print("Wrong token")
```
***
*If you like what I do, consider casting a vote for me as witness on [Hivesigner](https://hivesigner.com/sign/account-witness-vote?witness=holger80&approve=1) or on [PeakD](https://peakd.com/witnesses)*.👍 elleok, dfen, blockchainstudio, onetin84, techslut, imtase, baiboua, akioexzgamer, yuza, paopaoza, puza, crypto.story, univers.crypto, steementertainer, swedishdragon76, nalexadre, french-tech, ten-years-before, mintrawa, abh12345, mistia, shebe, gerber, cadawg, bestboom, dlike, bobby.madagascar, leo.syndication, steemcityrewards, daan, exyle, mys, accelerator, freddio, triptolemus, permaculturedude, steem.leo, leo.voter, freddio.sport, zaku-pal, one.life, maxuvd, dominuus, rycharde, investprosper, julian2013, fsm-liquid, triplea.bot, zaku-leo, blockbrothers, g10a, bengy, julialee66, steemindian, airforce, roknavy, rokairforce, navyactifit, gruntprime, nerdtopiade, pagliozzo, gadrian, nokodemion, carlpei, imbartley, redouanemez, daath, moneytron, cpt-sparrow, karja, doldrums, tarazkp, sudefteri, grunt, kahvesizlik, stubborn-soul, gruntalpha, maxer27, abitcoinskeptic, ilovecanada, kibela, sharker, itchyfeetdonica, kimzwarch, revisesociology, chrismadcboy2016, akifane, swisswitness, huaren.news, bubke, besheda, realgoodcontent, gruntbeta, markkujantunen, jacekw, alitavirgen, amico, broxi, borran, crokkon, isnochys, coinmarketcal, thrasher666, gruntomega, newhope, mapxv, maxuve, maxuvv, tipu, dachcolony, eikejanssen, mytechtrail, matschi, dreimaldad, taldor, richie.rich, sparschwein, jean-luc.picard, helpyou, monster.oo7, arcange, a-bot, superlao, votum, raspibot, flemingfarm, skepticology, anli, andrepol, jpphotography, candyboy, oliverschmid, maxpatternman, backinblackdevil, satren, eunsik, szf, likwid, re2pair, dollarbills, lelon, drorion, fourfourfun, dera123, saboin, promobot, ticketyboo, ticketywoof, borbina, ctl001, likeup, hitmeasap, freebornsociety, dyrt88, fulcrumleader, wildarms65, steembasicincome, anikys3reasure, qwertm, sbi2, sbi3, smon-joa, raphaelle, sbi4, sbi5, nextcolony, lauchmelder, sbi6, sbi7, bluewall, nobyeni, sbi8, fengchao, djennyfloro, sbi9, bluerobo, alinalazareva, sbi10, favcau, theadmiral, gringo211985, oaldamster, oflyhigh, holger.random, beggars, slobberchops, brujas, naltedtirt, sashas, funnyman, holycow2019, vaansteam, linnyplant, tonalddrump, anthonyadavisii, kissi, captain.kirk, codingdefined, dalz, shmoogleosukami, vidafitnessfeliz, nikv, patrickulrich, krbecrypto, allinoncrypto, twoshyguys, aggroed, bewithbreath, immanuel94, skyroad, steem.craft, abwasserrohr, noloafing, jeffmackinnon, steempty, fminerten, raise-me-up, michealb, netaterra, therealyme, idiosyncratic1, yuriy4, borislavzlatanov, agathusia, oxoskva, afsar3501, nonsowrites, torrey.blog, twinner, therealwolf, smartsteem, tombstone, sepracore, simply-happy, tinyhousecryptos, lordjames, epicdice, mattclarke, cervisia, fooblic, achim86, asgarth, andreasgrubhofer, teenagecrypto, vallesleoruther, moyse, flugschwein, sportsbuddy, timcliff, siniceku, chiren, sardal, martie7, greenman, powerguy, cnfund, btshuang, mygod, windtalker, jphamer1, canercanbolat, e-r-k-a-n, denizcakmak, iktisat, yehey, filipino, broadcast, shares, branding, automation, pesos, petscorner, mendoza, circa, informationlog, pinoy, angel33, dylanhobalart, steemshiro, marki99, fw206, jocieprosza, maczak6603, urdreamscometrue, jim888, zakia, gulf41, wackou, my451r, periods, davidlionfish, elizibar, dotwin1981, kaldewei, gamer0815, steemik, aclcrypto2, bji1203, elbrava, stickstore, quekery, steemillu, redaktion, newsticker, steemcartel, steemillu.random, unicron, smooms, hiq, amryksr, mahera, maxsieg, cst90, krevasilis, condeas, gerdtrudroepke, linuxbot, condeas.pal, ibc, stuntman.mike, lenmar, bobinson, runridefly, mes, netuoso, abrockman, lamorada, evildeathcore, drakos, yoogyart, ozelot47, jeffrey24864, pivi, ssjsasha, distantsignal, fraenk, lefty619, uwelang, travoved, dimarss, enthef, firayumni, detlev, danielsaori, theskmeister, bala41288, jeanpi1908, j-p-bs, deasofkos, allyouneedtoknow, tomhall, cryptoinvestsvk, vcdragon, arenatoken, espoem, gtg, sidekickmatt, goumao, wf9877, superhardness, uncommonriad, iriegiftshop, bue, holger80, fullnodeupdate, pvinny69, eonwarped, agr8buzz, actnearn, opanyin, hoist, rishi556, giftgiver, treble, blocktrades, tomatom, reghunter, kgakakillerg, celinavisaez, futurecurrency, mgzayyar, arabisouri, penguinpablo, bluemist, jesusjacr, binkyprod, roger5120, leesujin, afiqsejuk, scorer, diamond-head, karenmckersie, jaki01, davidorcamuriel, ahmedsy, tyzzzz, orkin420, jamesbattler, grindle, engrave, nicniezgrublem, santarius, glodniwiedzy, imperfect-one, aditor, spacesheep, bgornicki, d-zero, grichano, ejemai, kaeserotor, leonardodaslade, erickpinos, heimindanger, nathen007.tribes, solips, narr8r, cloris, jexus77, dustsweeper, drag33, steemcleaners, spaminator, sampraise, zapplwoman, theplunge, mstafford, paragism, xeroc, sarakey, fingolfin, donchate, pqlenator, bewarecenterbase, sulailearning, tigerdaduk, leoplaw, fantasticvisions, mysteemit96, gandalfthewhite, jasonshick, diazrock, alabasterdigital, cryptonewz, guiltyparties, abachon, chitty, inertia, minloulou,