My first program for getting data from the hive blockchain

avatar

Hello everyone!

I started doing some research on how to code for the hive blockchain. So far I really wanted to get started in javascript but with having close to know knowledge of node.js I opted to stay with python for my first couple of programs.

Here is the code that I used

python

from beem import Hive
from beem.discussions import Query, Discussions
h = Hive()
from beem.account import Account
acc = Account("trostparadox")

print("The first history of @trostparadox account")
for h in acc.get_account_history(1,0):
    print("------------------------------------------------------")
    print(h)
    print("------------------------------------------------------\n")

count = 0
for f in acc.get_followers():
    count+=1

print("Follower count:", count)

print("\n\n\n")

print("The different blog entries on @trostparadox blog\n\n")
for b in acc.get_blog_entries():
    print(b)



Here is the output that I received:

python output
The first history of @trostparadox account
------------------------------------------------------
{'from': 'hiveonboard', 'to': 'trostparadox', 'amount': {'amount': '1', 'precision': 3, 'nai': '@@000000021'}, 'memo': 'Welcome to HIVE! You were referred by @theycallmedan. Unless you increase the HIVE POWER (HP) in your wallet from zero you only will be able to do limited transactions. You can earn HP with posts, comments, purchase it with crypto or hope for delegated HP. This is a good reason to follow and interact with your referrer @theycallmedan as they are the most likely to delegate you HP which enables you to do more transactions like posts, comments and votes.', 'trx_id': '86a2464ae8928212c149a2bbe24bbcc873672077', 'block': 50185460, 'trx_in_block': 23, 'op_in_trx': 0, 'virtual_op': 0, 'timestamp': '2021-01-05T22:17:39', 'operation_id': 0, 'account': 'trostparadox', 'type': 'transfer', '_id': '9635633065bba95adff672da000f6758c8c5afd4', 'index': 1}
------------------------------------------------------

Error: Assert Exception:api_itr != data._registered_apis.end(): Could not find API follow_api
Lost connection or internal error on node: https://api.hive.blog (1/100) 

Follower count: 638




The different blog entries on @trostparadox blog


{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 122, 'permlink': 'vyb-announcements-rewards-pool-governance-project-fund', 'reblogged_on': '2022-01-11T20:29:24'}
{'author': 'onealfa', 'blog': 'trostparadox', 'entry_id': 121, 'permlink': 'which-of-these-two-you-prefer', 'reblogged_on': '2022-01-03T04:37:30'}
{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 120, 'permlink': 'announcing-vyb-delegations-have-been-enabled', 'reblogged_on': '2021-12-29T17:47:39'}
{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 119, 'permlink': 'we-are-investigating-the-glitch-that-seems-to-have-zeroed-out-2-days-worth-of-vyb-rewards', 'reblogged_on': '2021-12-27T05:50:21'}
{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 118, 'permlink': 'announcing-double-trouble-on-vyb', 'reblogged_on': '2021-12-23T09:02:21'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 117, 'permlink': '0024-proofofblind-oror-secret-dawg-santa-writes-it-up-large-for-crypto-this-xmas', 'reblogged_on': '2021-12-19T05:00:39'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 116, 'permlink': '0023-proofofblind-oror-fifth-glyph-is-missing-luv', 'reblogged_on': '2021-12-18T07:44:15'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 115, 'permlink': '0022-proofofblind-oror-youve-got-mail-secret-santa-card-to-a-little-birdy', 'reblogged_on': '2021-12-18T07:44:03'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 114, 'permlink': '0021-proofofblind-oror-the-best-approach-is-to-stand-up-for-the-truth', 'reblogged_on': '2021-12-18T07:43:54'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 113, 'permlink': '0020-proofofblind-oror-secret-santa-game', 'reblogged_on': '2021-12-18T07:43:33'}
{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 112, 'permlink': 'vyb-airdrop-info-final-tabulation-for-eligible-accountholders', 'reblogged_on': '2021-12-17T19:36:42'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 111, 'permlink': '0019-proofofblind-oror-o-for-a-sighting-of-that-damn-mystic-glyph', 'reblogged_on': '2021-12-14T21:58:06'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 110, 'permlink': '0018-proofofblind-oror-finding-out-im-a-fraud', 'reblogged_on': '2021-12-14T21:57:54'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 109, 'permlink': '0017-proofofblind-oror-my-trip-to-find-out-what-ditching-that-fifth-glyph-was-all-about', 'reblogged_on': '2021-12-11T03:40:42'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 108, 'permlink': '0016-proofofblind-oror-vby-richlist-and-x-1pob-1vyb', 'reblogged_on': '2021-12-11T03:40:30'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 107, 'permlink': '0015-proofofblind-oror-dig-that-vyb-dawg', 'reblogged_on': '2021-12-11T03:40:15'}
{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 106, 'permlink': 'vyb-airdrop-info-preliminary-tabulation-and-calc-s-part-1-of-4-summary-for-1-336', 'reblogged_on': '2021-12-11T03:39:18'}
{'author': 'dbruce', 'blog': 'trostparadox', 'entry_id': 105, 'permlink': 'semester-in-review-thoughts-on', 'reblogged_on': '2021-12-06T08:42:21'}
{'author': 'scholaris', 'blog': 'trostparadox', 'entry_id': 104, 'permlink': 'vybrainium-moderation-a-proposal', 'reblogged_on': '2021-12-06T08:40:30'}
{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 103, 'permlink': 'announcing-vyb-earn-41342-vyb-to-win--verify-your-brain', 'reblogged_on': '2021-12-06T08:36:09'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 102, 'permlink': 'the-proof-of-blind-referral-contest-winners-are-', 'reblogged_on': '2021-12-02T19:34:33'}
{'author': 'vikbuddy', 'blog': 'trostparadox', 'entry_id': 101, 'permlink': 'pob-kryptonium-vybrainium-verify-your-brain-vyb-new-tribe-and-token', 'reblogged_on': '2021-11-25T05:27:03'}
{'author': 'vyb.vyb', 'blog': 'trostparadox', 'entry_id': 100, 'permlink': 'new-tribe-and-token-verify-your-brain-oror-vybrainium-vyb', 'reblogged_on': '2021-11-23T15:27:21'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 99, 'permlink': 'new-university-course-oror-hive-and-hive-engine-dev-assistance-requested', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 98, 'permlink': 'extended-oror-proof-of-blind-referral-contest', 'reblogged_on': '2021-11-09T03:25:00'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 97, 'permlink': 'the-many-benefits-of-the-proof-of-blind-project-', 'reblogged_on': '2021-10-29T00:09:42'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 96, 'permlink': 'proof-of-blind-referral-contest-oror-win-350-pob-andor-75-hive', 'reblogged_on': '2021-10-28T23:57:09'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 95, 'permlink': 'although-subjectively-downvoting-posts-to-zero-is-anathema-to-me-the-layer-1-ability-to-do-so-must-remain-for-now-at-least', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'blind.submit', 'blog': 'trostparadox', 'entry_id': 94, 'permlink': 'request-for-submissions-10-17-21', 'reblogged_on': '2021-10-19T04:29:09'}
{'author': 'blind.submit', 'blog': 'trostparadox', 'entry_id': 93, 'permlink': 'request-for-submissions-10-08', 'reblogged_on': '2021-10-08T14:02:24'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 92, 'permlink': 'f1trjs76zjzkpxfwhs72ta', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 91, 'permlink': 'how-are-cannabis-and-federalism-related-livestreamed-lecture-tonight-monday-104-by-josh-hammer', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'proofofblind', 'blog': 'trostparadox', 'entry_id': 90, 'permlink': 'flawed-and-revolved-doors-submission-0001-to-proof-of-blind', 'reblogged_on': '2021-09-18T02:25:57'}
{'author': 'blind.submit', 'blog': 'trostparadox', 'entry_id': 89, 'permlink': 'instructions-faqs-and-the-very-first-request-for-submissions-for-original-content-via-the-proof-of-blind-project', 'reblogged_on': '2021-09-17T03:40:54'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 88, 'permlink': 'announcing-the-first-student-project-of-my-class-proof-of-blind-a-way-for-unknown-authors-to-get-recognized-and-rewarded-quickl', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 87, 'permlink': 'some-of-my-students-could-use-your-help-ideas-for-how-to-add-value-to-the-hive-community', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 86, 'permlink': 'sx0fl40akxodpibeg5iyog', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 85, 'permlink': 'memories-of-my-grandfather-the-one-who-first-taught-me-entrepreneurship-and-how-to-play-pac-man', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 84, 'permlink': 'changes-this-semester-to-my-university-class-entrepreneurial-value-creation-in-society', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 83, 'permlink': 'as-we-continue-this-experiment-known-as-the-proof-of-brain-tribe-it-is-now-abundantly-clear-that-proof-of-stake-governance-is', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 82, 'permlink': 'new-formal-proposal-for-rules-governing-downvoting-within-the-proof-of-brain-tribe-with-no-de-minimus-downvote-option', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 81, 'permlink': 'formal-proposal-for-rules-governing-downvoting-within-the-proof-of-brain-tribe', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'heretickitten', 'blog': 'trostparadox', 'entry_id': 80, 'permlink': 'circle-of-swords', 'reblogged_on': '2021-06-23T07:36:33'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 79, 'permlink': 'announcement-of-my-intent-to-file-a-future-proposal-regarding-rules-for-downvoting-in-the-proof-of-brain-tribe', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 78, 'permlink': 'the-power-of-fatherhood-pob-word-of-the-week-power-005', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 77, 'permlink': 'to-burn-or-not-to-burn-i-say-don-t-burn-crypto-or-bridges-or-witches-maybe-ducks-are-okay', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 76, 'permlink': 'why-can-i-not-deposit-cub-into-the-cub-den', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 75, 'permlink': 'algorithm-vs-community-i-choose-community', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 74, 'permlink': 'teach-baby-ander-to-sleep-eat-wake-sleep-rather-than-sleep-wake-eat-sleep', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 73, 'permlink': 'zbewydzy', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 72, 'permlink': 'dr-antony-davies-talking-about-cooperation-and-coercion-on-monday-april-12-2021-at-7-30p-cdt-will-be-livestreamed', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'johntamny', 'blog': 'trostparadox', 'entry_id': 71, 'permlink': 'economics-the-art-of-complicating-what-is-incredibly-simple', 'reblogged_on': '2021-04-12T04:33:57'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 70, 'permlink': 'what-is-the-best-route-to-get-fiat-usd-into-the-leo-hive-ecosystem', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 69, 'permlink': 'why-not-simply-divide-the-dhf-payouts-by-the-external-market-price-for-hbd-whenever-it-rises-above-1-usd', 'reblogged_on': '1970-01-01T00:00:00'} 
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 68, 'permlink': 'request-help-finalizing-a-hive-elevator-pitch', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'johntamny', 'blog': 'trostparadox', 'entry_id': 67, 'permlink': 'i-m-john-tamny-and-writing-is-my-passion', 'reblogged_on': '2021-04-01T18:57:30'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 66, 'permlink': 'ten-years-of-president-trump-it-s-actually-plausible', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 65, 'permlink': 'brainstorming-how-to-calm-the-proof-of-brain-storm-part-2-complex-version', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 64, 'permlink': 'should-a-small-percentage-immediate-power-down-option-be-added-to-hive-to-increase-baseline-liquidity-to-resist-against-pump-and', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 63, 'permlink': 'john-tamny-talking-about-politicians-responses-to-the-pandemic-on-monday-march-29-2021-at-7-30p-cdt-will-be-livestreamed-hive-151771', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 62, 'permlink': 'john-tamny-talking-about-politicians-responses-to-the-pandemic-on-monday-march-29-2021-at-7-30p-cdt-will-be-livestreamed', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 61, 'permlink': 'kfifezks', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 60, 'permlink': 'the-bitcoin-flaw-part-2', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 59, 'permlink': 'guidance-needed-toward-development-of-a-good-bot-to-aid-account-holders-who-want-to-prioritize-ecosystem-growth-over-indi', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 58, 'permlink': 'should-government-break-up-the-big-tech-social-media-giants-livestream-coming-up-31521-730p-cdt-hive-101093', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'osu-bd', 'blog': 'trostparadox', 'entry_id': 57, 'permlink': 'puppy-love', 'reblogged_on': '2021-03-16T14:14:54'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 56, 'permlink': 'michael-moore-s-eco-expose-film-planet-of-the-humans-gets-the-details-right-while-getting-the-big-picture-wrong', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 55, 'permlink': 'betonmainstreet-what-its-all-about--hive-122574', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 54, 'permlink': 'betonmainstreet-what-its-all-about--hive-151771', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 53, 'permlink': 'betonmainstreet-what-its-all-about-', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 52, 'permlink': 'should-government-break-up-the-big-tech-social-media-giants-livestream-coming-up-31521-730p-cdt-hive-151771', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 51, 'permlink': 'should-government-break-up-the-big-tech-social-media-giants-livestream-coming-up-31521-730p-cdt', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 50, 'permlink': 'introduction-get-to-know-this-college-student-hive-196708', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'osu-cd', 'blog': 'trostparadox', 'entry_id': 49, 'permlink': 'introduction-get-to-know-this-college-student', 'reblogged_on': '2021-03-11T21:58:12'}
{'author': 'osu-bd', 'blog': 'trostparadox', 'entry_id': 48, 'permlink': 'introduction--this-is-me', 'reblogged_on': '2021-03-11T07:44:21'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 47, 'permlink': 'brainstorming-how-to-calm-the-proof-of-brain-storm-part-1-simple-version', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 46, 'permlink': 'haybtchs', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 45, 'permlink': 'has-anybody-tracked-the-median-authorshipcuration-rewards-on-leo-and-hive', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 44, 'permlink': 'dilbert-creator-teaches-spot-on-lesson-on-entrepreneurship-without-ever-mentioning-the-e-word', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 43, 'permlink': 'proofofbrain-io-brings-to-light-the-potential-need-for-classification-curators', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 42, 'permlink': 'the-bitcoin-flaw-part-1', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 41, 'permlink': 'week-08-addressing-extreme-poverty', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 40, 'permlink': 'expand-the-hive-by-tapping-into-parents-enthusiasm-for-their-kids-hive-122574', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 39, 'permlink': 'expand-the-hive-by-tapping-into-parents-enthusiasm-for-their-kids', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 38, 'permlink': 'week-07-the-societal-impacts-of-entrepreneurship-market-processes-and-individual-differences-in-income-wealth-and-well-being', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 37, 'permlink': 'will-proofofbrain-io-become-the-premiere-landing-page-for-future-content-developers', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 36, 'permlink': 'investing-in-leo-hive-bitcoin-or-other-crypto-using-checkbook-control-self-directed-roth-ira-llc', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 35, 'permlink': 'tribes-2-0-the-next-vision-hive-122574', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 34, 'permlink': 'tribes-2-0-the-next-vision-hive-151771', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'aggroed', 'blog': 'trostparadox', 'entry_id': 33, 'permlink': 'tribes-2-0-the-next-vision', 'reblogged_on': '2021-02-27T03:58:36'}
{'author': 'acidyo', 'blog': 'trostparadox', 'entry_id': 32, 'permlink': 'feedback-to-our-community-incubation-welcomed', 'reblogged_on': '2021-02-24T15:59:03'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 31, 'permlink': 'improving-the-curation-rewards-process-via-a-significant-though-subtle-change-to-auto-voting-hive-167922', 'reblogged_on': '1970-01-01T00:00:00'} 
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 30, 'permlink': 'improving-the-curation-rewards-process-via-a-significant-though-subtle-change-to-auto-voting-hive-139531', 'reblogged_on': '1970-01-01T00:00:00'} 
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 29, 'permlink': 'improving-the-curation-rewards-process-via-a-significant-though-subtle-change-to-auto-voting', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 28, 'permlink': 'just-created-a-tribe-on-hive-blockchain-so-my-students-can-be-rewarded-in-crypto-for-interesting-discussion-content', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'aggroed', 'blog': 'trostparadox', 'entry_id': 27, 'permlink': 'how-to-create-a-tribe-and-what-goes-into-it-a-guide-for-the-curious', 'reblogged_on': '2021-02-23T02:55:57'}
{'author': 'aggroed', 'blog': 'trostparadox', 'entry_id': 26, 'permlink': 'please-welcome-the-gradnium-tribe-from-oklahoma-state-university', 'reblogged_on': '2021-02-19T17:22:06'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 25, 'permlink': 'week-06-central-planning-and-totalitarianism-hive-112987', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 24, 'permlink': 'week-06-central-planning-and-totalitarianism', 'reblogged_on': '1970-01-01T00:00:00'}
{'author': 'trostparadox', 'blog': 'trostparadox', 'entry_id': 23, 'permlink': 'white-papers-or-other-documentation-of-existing-curation-rewards-schema-for-hive-and-leo-hive-133987', 'reblogged_on': '1970-01-01T00:00:00'} 

Observations

As seen here I am able to get all kinds of data from any account as long as I know their username, and I can do this in less than 50 lines of code. If I can do it other people can do it as well. I find this fascinating.

Explanation of Code

In the above code I used a library called beem for python Link to beem

In there I looked through the api provided and tested out the different commands they have which finally led me to this program I wrote.

In the first for loop I am printing out the first history of @trostparadox
The number 1 is describing which post to start from and the number 0 is how many of the posts to print out (the default amount at 0 is 1) So for ex.: if I want to print out the first 100 posts then I would input (100, 100)

When getting the followers, if I use print(f) as shown below

python

for f in acc.get_followers():
    print(f)
    count+=1

The for loop will print out every single person @trostparadox follows.

Finally I print out the different blog entries on @trostparadox

Conclusion

When searching through the API these commands looked very interesting to me. Further I want to develop a short python script that will take user input to know which user to get information from. Of course we have really nice interfaces like PEAKD, but I think this small python script will be beneficial in my learning of how to make programs on the blockchain.

Thanks everyone for reading and please leave any comments you wish!



0
0
0.000
1 comments
avatar

Congratulations @armoredbanana! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 10 upvotes.
Your next target is to reach 50 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Hive Power Up Month - Feedback from day 22
Support the HiveBuzz project. Vote for our proposal!
0
0
0.000