 Hi Guys!!... ### Today in this tutorial, we will learn about few basic commands for programming the **Steem blockchain** using *Python* language. Please, refer to [Part 1](https://utopian.io/utopian-io/@abhi3700/learn-steem-python-1-installation-guide) before going any further, if the required tools are not installed. ## Introduction This is all about practising the basic commands of **"Steem-Python"**. ## Basic commands Import the Steem function from steem library. After importing, we can use the function to access further commands (variables) inside that function. ```python >>> from steem import Steem >>> s = Steem() ``` #### All keys Using all keys, we can query. ```python >>> s.get_account('abhi3700').keys() ```  #### Id This represents the 'user id' of the steem account holder. This is assigned whenever the user joins for 1st time and it remains permanent for the 'username' ```python >>> s.get_account('abhi3700')['id'] 143518 ``` #### Name ```python >>> s.get_account('abhi3700')['name'] 'abhi3700' ``` #### Owner, Active, Posting, Memo Keys Here, all the keys required to access account's different features.  ##### Owner ```python >>> s.get_account('abhi3700')['owner'] {'weight_threshold': 1, 'account_auths': [], 'key_auths': [['**************************************************', 1]]} ``` ##### Active ```python >>> s.get_account('abhi3700')['active'] {'weight_threshold': 1, 'account_auths': [], 'key_auths': [['**************************************************', 1]]} ``` ##### Posting ```python >>> s.get_account('abhi3700')['posting'] {'weight_threshold': 1, 'account_auths': [['utopian.app', 1]], 'key_auths': [['**************************************************', 1]]} ``` ##### Memo ```python >>> s.get_account('abhi3700')['memo_key'] '**************************************************' ``` #### Public Profile Settings This shows the meta-data about the user.  ```python >>> s.get_account('abhi3700')['json_metadata'] '{"profile":{"name":"Abhijit Roy","about":"A Software Developer, Traveller, Crypto Trader, Blockchain enthusiast","location":"Chandigarh, India","profile_image":"https://firebasestorage.googleapis.com/v0/b/bitinfocoinfree.appspot.com/o/14068548_1125160424216001_2627046384272844500_o.jpg?alt=media&token=8bb1b1f9-36f5-4b9a-8220-4134f01f8542","website":"https://play.google.com/store/apps/details?id=in.topux.bitinfocoin","cover_image":"https://www.ethereum.org/images/assets/1900/Ethereum-homestead-background-4.jpg"}}' ``` #### Proxy It is null in this case as no proxy server used. ``` >>> s.get_account('abhi3700')['proxy'] '' ``` #### Last owner update It comes from the UNIX command i.e. January 1st 1970. Also birthdays are written in timestamps (time from this date till date). ``` >>> s.get_account('abhi3700')['last_owner_update'] '1970-01-01T00:00:00' ``` #### Last account update It mainly is when the account settings (public profile) was last updated. ```python >>> s.get_account('abhi3700')['last_account_update'] '2017-11-26T17:57:18' ``` #### Account creation time The date, time when the account was created. ```python >>> s.get_account('abhi3700')['created'] '2017-04-02T08:00:57' ``` #### Recovery account If your account gets hacked, it can be recovered before any data is manipulated. ```python >>> s.get_account('abhi3700')['recovery_account'] 'steem' >>> s.get_account('abhi3700')['last_account_recovery'] '1970-01-01T00:00:00' ``` Click [here](https://steemit.com/steem/@someguy123/how-the-steem-account-recovery-works-and-why-your-trustee-can-t-steal-your-account) for details. #### Post counts The no. of posts posted by the user. ```python >>> s.get_account('abhi3700')['post_count'] 198 ``` #### Can vote Whether a person can vote or not. ```python >>> s.get_account('abhi3700')['can_vote'] True ``` #### Voting Power This depends upon the 'steem power' a user holds. Here, it calculates out of 10,000. ```python >>> s.get_account('abhi3700')['voting_power'] 9800 ``` So, I hold 98 % voting power currently. #### Last vote time Last time, I voted. ```python >>> s.get_account('abhi3700')['last_vote_time'] '2017-12-01T18:30:27' ``` #### Balance All balances in steem, SBD. The user account looks like this...  ```python >>> s.get_account('abhi3700')['balance'] '0.000 STEEM' >>> s.get_account('abhi3700')['sbd_balance'] '0.603 SBD' >>> s.get_account('abhi3700')['savings_sbd_balance'] '0.000 SBD' ``` #### Vesting Basically, it defines the steem power. Click [here](https://steemit.com/steemitguide/@steemitguide/steemitguide-what-exactly-is-vested-steem-why-is-it-important-for-you-know-how-smart-contracts-allocates-power-within-the) for details. ```python >>> s.get_account('abhi3700')['vesting_shares'] '1038936.179712 VESTS' >>> s.get_account('abhi3700')['delegated_vesting_shares'] '0.000000 VESTS' >>> s.get_account('abhi3700')['received_vesting_shares'] '12358.959056 VESTS' >>> s.get_account('abhi3700')['vesting_withdraw_rate'] '0.000000 VESTS' >>> s.get_account('abhi3700')['next_vesting_withdrawal'] '1969-12-31T23:59:59' ``` Basically, I have never withdrawn my *steem-power*. The time itself indicates i.e. before Jan 1, 1970 ()) #### Bandwidth It is the power to post, upvote, comment. The more Steem-power one has, the more steem-blockchain's bandwidth is owned by the user. It is like holding a percent of the network. ```python # Content post bandwidth >>> s.get_account('abhi3700')['average_bandwidth'] '46792401000' >>> s.get_account('abhi3700')['lifetime_bandwidth'] '677875000000' >>> s.get_account('abhi3700')['last_bandwidth_update'] '2017-12-06T20:42:42' ************************************************************************************************** # Market bandwidth >>> s.get_account('abhi3700')['average_market_bandwidth'] 1660341514 >>> s.get_account('abhi3700')['lifetime_market_bandwidth'] '24130000000' >>> s.get_account('abhi3700')['last_market_bandwidth_update'] '2017-12-06T20:42:42' ``` #### Last post date The date, time for last post. ```python >>> s.get_account('abhi3700')['last_post'] '2017-12-03T13:20:21' ``` #### Witness votes The witnesses I have voted for. ```python >>> s.get_account('abhi3700')['witness_votes'] ['steemed', 'utopian-io'] ``` Basically, all the above discussed user properties can be viewed here-(https://steemd.com/@username)  That's all. ### Stay tuned for more such tutorials...... ## View in [Github](https://github.com/abhi3700/My_Learning_Steem-Python/blob/master/Tutorials/2_Basic_commands.md) <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@abhi3700/learn-steem-python-2-basic-commands">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
author | abhi3700 | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
permlink | learn-steem-python-2-basic-commands | ||||||||||||||||||||||||||||||||||||||||||||||||
category | utopian-io | ||||||||||||||||||||||||||||||||||||||||||||||||
json_metadata | "{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":111191431,"name":"My_Learning-Steem","full_name":"abhi3700/My_Learning-Steem","owner":{"login":"abhi3700","id":16472948,"avatar_url":"https://avatars2.githubusercontent.com/u/16472948?v=4","gravatar_id":"","url":"https://api.github.com/users/abhi3700","html_url":"https://github.com/abhi3700","followers_url":"https://api.github.com/users/abhi3700/followers","following_url":"https://api.github.com/users/abhi3700/following{/other_user}","gists_url":"https://api.github.com/users/abhi3700/gists{/gist_id}","starred_url":"https://api.github.com/users/abhi3700/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhi3700/subscriptions","organizations_url":"https://api.github.com/users/abhi3700/orgs","repos_url":"https://api.github.com/users/abhi3700/repos","events_url":"https://api.github.com/users/abhi3700/events{/privacy}","received_events_url":"https://api.github.com/users/abhi3700/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abhi3700/My_Learning-Steem","description":"An incentivized content creation and curation based Blockchain","fork":false,"url":"https://api.github.com/repos/abhi3700/My_Learning-Steem","forks_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/forks","keys_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/teams","hooks_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/hooks","issue_events_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/issues/events{/number}","events_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/events","assignees_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/assignees{/user}","branches_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/branches{/branch}","tags_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/tags","blobs_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/git/refs{/sha}","trees_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/statuses/{sha}","languages_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/languages","stargazers_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/stargazers","contributors_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/contributors","subscribers_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/subscribers","subscription_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/subscription","commits_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/commits{/sha}","git_commits_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/git/commits{/sha}","comments_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/comments{/number}","issue_comment_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/issues/comments{/number}","contents_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/contents/{+path}","compare_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/merges","archive_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/downloads","issues_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/issues{/number}","pulls_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/pulls{/number}","milestones_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/milestones{/number}","notifications_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/labels{/name}","releases_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/releases{/id}","deployments_url":"https://api.github.com/repos/abhi3700/My_Learning-Steem/deployments","created_at":"2017-11-18T09:05:38Z","updated_at":"2017-11-26T17:28:21Z","pushed_at":"2017-12-06T23:14:03Z","git_url":"git://github.com/abhi3700/My_Learning-Steem.git","ssh_url":"git@github.com:abhi3700/My_Learning-Steem.git","clone_url":"https://github.com/abhi3700/My_Learning-Steem.git","svn_url":"https://github.com/abhi3700/My_Learning-Steem","homepage":"","size":794,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master","score":14.329059},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","steemit","steem","python","steem-python"],"users":["abhi3700","someguy123","steemitguide","username"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512731225/dqbbtwfoijy0avafgeb4.png","https://utopian.io/utopian-io/@abhi3700/learn-steem-python-1-installation-guide","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512602920/nwrzuxs3dadupw36eead.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512602979/ejppg7pr5ajiniitijsw.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512603030/jjpqzslh5z5qsd4cd734.png","https://steemit.com/steem/@someguy123/how-the-steem-account-recovery-works-and-why-your-trustee-can-t-steal-your-account","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512603104/gmdyplgadjatovjxodpg.png","https://steemit.com/steemitguide/@steemitguide/steemitguide-what-exactly-is-vested-steem-why-is-it-important-for-you-know-how-smart-contracts-allocates-power-within-the","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512664879/wx2a8i2bsws3ejziszen.png","https://github.com/abhi3700/My_Learning_Steem-Python/blob/master/Tutorials/2_Basic_commands.md"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512731225/dqbbtwfoijy0avafgeb4.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512602920/nwrzuxs3dadupw36eead.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512602979/ejppg7pr5ajiniitijsw.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512603030/jjpqzslh5z5qsd4cd734.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512603104/gmdyplgadjatovjxodpg.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1512664879/wx2a8i2bsws3ejziszen.png"]}" | ||||||||||||||||||||||||||||||||||||||||||||||||
created | 2017-12-06 23:25:18 | ||||||||||||||||||||||||||||||||||||||||||||||||
last_update | 2017-12-11 13:11:12 | ||||||||||||||||||||||||||||||||||||||||||||||||
depth | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
children | 4 | ||||||||||||||||||||||||||||||||||||||||||||||||
last_payout | 2017-12-13 23:25:18 | ||||||||||||||||||||||||||||||||||||||||||||||||
cashout_time | 1969-12-31 23:59:59 | ||||||||||||||||||||||||||||||||||||||||||||||||
total_payout_value | 27.021 HBD | ||||||||||||||||||||||||||||||||||||||||||||||||
curator_payout_value | 10.374 HBD | ||||||||||||||||||||||||||||||||||||||||||||||||
pending_payout_value | 0.000 HBD | ||||||||||||||||||||||||||||||||||||||||||||||||
promoted | 0.010 HBD | ||||||||||||||||||||||||||||||||||||||||||||||||
body_length | 7,336 | ||||||||||||||||||||||||||||||||||||||||||||||||
author_reputation | 1,411,436,389,304 | ||||||||||||||||||||||||||||||||||||||||||||||||
root_title | "Learn Steem-Python #2- Basic Commands" | ||||||||||||||||||||||||||||||||||||||||||||||||
beneficiaries |
| ||||||||||||||||||||||||||||||||||||||||||||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||||||||||||||||||||||||||||||||||||||||||||
percent_hbd | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
post_id | 22,610,167 | ||||||||||||||||||||||||||||||||||||||||||||||||
net_rshares | 11,501,131,465,524 | ||||||||||||||||||||||||||||||||||||||||||||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
drifter1 | 0 | 11,118,688,020 | 100% | ||
abh12345 | 0 | 31,181,155,725 | 5% | ||
z3r0d4yz | 0 | 9,553,016,285 | 100% | ||
unipsycho | 0 | 201,961,268 | 1% | ||
followbtcnews | 0 | 69,806,006,010 | 20% | ||
flauwy | 0 | 425,831,981,080 | 100% | ||
simnrodrguez | 0 | 64,037,315,800 | 100% | ||
coffeedrinker51 | 0 | 8,548,281,696 | 20% | ||
luigi-tecnologo | 0 | 742,452,757 | 4% | ||
qed | 0 | 3,530,536,149 | 100% | ||
cifer | 0 | 558,959,198 | 100% | ||
fivestargroup | 0 | 162,317,149 | 0.02% | ||
mooncryption | 0 | 40,684,479,770 | 100% | ||
piaristmonk | 0 | 17,625,554,648 | 100% | ||
jamesbarraclough | 0 | 32,764,889,370 | 100% | ||
primetimesports | 0 | 140,925,579 | 0.02% | ||
idlebright | 0 | 511,101,636 | 100% | ||
edward.maesen | 0 | 2,545,961,930 | 100% | ||
utopian-io | 0 | 10,741,914,114,302 | 8% | ||
toffer | 0 | 10,046,086,595 | 100% | ||
moorkedi | 0 | 9,377,073,496 | 100% | ||
ekushya | 0 | 1,547,140,637 | 100% | ||
iamafra | 0 | 1,578,667,283 | 10% | ||
imperialaussie | 0 | 618,599,813 | 100% | ||
adhew | 0 | 133,436,286 | 10% | ||
unknowncomic | 0 | 53,036,518 | 90% | ||
maphics | 0 | 1,186,851,579 | 100% | ||
utopian-1up | 0 | 13,327,144,385 | 100% | ||
votero | 0 | 638,289,856 | 100% | ||
arcjen02 | 0 | 953,675,777 | 100% | ||
cossjourney | 0 | 211,764,927 | 100% |
Great stuff and good detailled explanations with examples. Now I have to find how I can use all this.. thanks !
author | cossjourney |
---|---|
permlink | re-abhi3700-learn-steem-python-2-basic-commands-20171209t234651255z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2017-12-09 23:46:51 |
last_update | 2017-12-09 23:46:51 |
depth | 1 |
children | 0 |
last_payout | 2017-12-16 23:46:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 111 |
author_reputation | 21,865,275,894 |
root_title | "Learn Steem-Python #2- Basic Commands" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,937,829 |
net_rshares | 0 |
Thank you for the contribution. It has been approved. You can contact us on [Discord](https://discord.gg/UCvqCsx). **[[utopian-moderator]](https://utopian.io/moderators)**
author | flauwy |
---|---|
permlink | re-abhi3700-learn-steem-python-2-basic-commands-20171207t221914183z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"community":"busy","app":"busy/1.0.0"} |
created | 2017-12-07 22:19:36 |
last_update | 2017-12-07 22:19:36 |
depth | 1 |
children | 0 |
last_payout | 2017-12-14 22:19:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 172 |
author_reputation | 296,259,911,900,510 |
root_title | "Learn Steem-Python #2- Basic Commands" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,710,918 |
net_rshares | 0 |
<div class="pull-left">  </div> <div class="text-justify"> <br> You've got a <code>1UP</code> from the @utopian-1up curation trail. __22 Utopians__ have upvoted your quality contribution to the open source community. <code>[Join](https://steemit.com/utopian-io/@flauwy/steemy-ep-46-how-to-create-and-follow-a-curation-trail-with-steemauto) 1UP for better posts and high curation rewards.</code> _1UP is neither organized nor endorsed by Utopian.io!_ </div>
author | utopian-1up |
---|---|
permlink | re-abhi3700-learn-steem-python-2-basic-commands-20171207t092828428z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"community":"busy","app":"busy/2.1.0"} |
created | 2017-12-07 09:28:48 |
last_update | 2017-12-07 09:28:48 |
depth | 1 |
children | 0 |
last_payout | 2017-12-14 09:28:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.122 HBD |
curator_payout_value | 0.039 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 570 |
author_reputation | 2,324,758,056,093 |
root_title | "Learn Steem-Python #2- Basic Commands" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,648,863 |
net_rshares | 44,357,498,029 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
flauwy | 0 | 44,357,498,029 | 10% |
### Hey @abhi3700 I am @utopian-io. I have just upvoted you! #### Achievements - Seems like you contribute quite often. AMAZING! #### Community-Driven Witness! I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER! - <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a> - <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a> - Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a> [](https://steemit.com/~witnesses) **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**
author | utopian-io |
---|---|
permlink | re-abhi3700-learn-steem-python-2-basic-commands-20171208t102406227z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
created | 2017-12-08 10:24:06 |
last_update | 2017-12-08 10:24:06 |
depth | 1 |
children | 0 |
last_payout | 2017-12-15 10:24:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,006 |
author_reputation | 152,955,367,999,756 |
root_title | "Learn Steem-Python #2- Basic Commands" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,758,805 |
net_rshares | 0 |