create account

SteemPY Tutorials #2 - Basic Functions by lonelywolf

View this thread on: hive.blogpeakd.comecency.com
· @lonelywolf ·
$0.31
SteemPY Tutorials #2 - Basic Functions
![](https://cdn.steemitimages.com/DQmcFSUorz8NrkquLgKD98jbYD2p2nMaPeKQPNscN5dM7gJ/image.png)

---

Hello, steemians.
This is a new tutorial series on accessing Steem blockchain using python programming language.


### Repository

- https://github.com/steemit/steem-python


### Requirements
- Python

### Difficulty
- Basic

### Tutorial Contents
- You will learn how to install the official steem-py to your windows and use it via CMD(command line)

### Curriculum
- [SteemPY Tutorials #1](https://steempeak.com/utopian-io/@lonelywolf/steempy-tutorials-1-installation-and-basics)

#### The Tutorial
Import the Steem function from steem library. After importing, we can use the function to access further commands (variables) inside that function.
```
>>> from steem import Steem
>>> s = Steem()
```
### All keys

Using all keys, we can query.
```
>>> s.get_account('lonelywolf').keys()
```

![image.png](https://files.steempeak.com/file/steempeak/lonelywolf/CGcIPuma-image.png)
### 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'

```
>>> s.get_account('lonelywolf')['id']
231859
```

### Name

```
>>> s.get_account('lonelywolf')['name']
'lonelywolf'
```

### Owner, Active, Posting, Memo Keys

Here, all the keys required to access account's different features.

- Owner
```
>>> s.get_account('lonelywolf')['owner']
{'weight_threshold': 1, 'account_auths': [], 'key_auths': [['**************************************************', 1]]}
```
- Active
```
>>> s.get_account('lonelywolf')['active']
{'weight_threshold': 1, 'account_auths': [], 'key_auths': [['**************************************************', 1]]}
```
- Posting
```
>>> s.get_account('lonelywolf')['posting']
{'weight_threshold': 1, 'account_auths': [], 'key_auths': [['**************************************************', 1]]}
```
- Memo
```
>>> s.get_account('lonelywolf')['memo_key']
'**************************************************'
```

### Proxy

It is null in this case as no proxy server used.
```
>>> s.get_account('lonelywolf')['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('lonelywolf')['last_owner_update']
'1970-01-01T00:00:00'
```
### Last account update

It mainly is when the account settings (public profile) was last updated.
```
>>> s.get_account('lonelywolf')['last_account_update']
'2018-11-13T17:57:18'
```
### Account creation time

The date, time when the account was created.
```
>>> s.get_account('lonelywolf')['created']
'2017-10-09T08:00:57'
```
### Recovery account

If your account gets hacked, it can be recovered before any data is manipulated.
```
>>> s.get_account('lonelywolf')['recovery_account']
'steem'
>>> s.get_account('lonelywolf')['last_account_recovery']
'1970-01-01T00:00:00'
```
Click here for details.
### Post counts

The no. of posts posted by the user.
```
>>> s.get_account('lonelywolf')['post_count']
142
```
### Can vote

Whether a person can vote or not.
```
>>> s.get_account('lonelywolf')['can_vote']
True
```
### Voting Power

This depends upon the 'steem power' a user holds. Here, it calculates out of 10,000.
```
>>> s.get_account('lonelywolf')['voting_power']
9715
```
So, I hold 97.15 % voting power currently.
### Last vote time

Last time, I voted.
```
>>> s.get_account('lonelywolf')['last_vote_time']
'2018-11-23T11:50:27'
```
### Balance

All balances in steem, SBD.
The user account looks like this...
wallet.png
```
>>> s.get_account('lonelywolf')['balance']
'0.000 STEEM'

>>> s.get_account('lonelywolf')['sbd_balance']
'0.000 SBD'

>>> s.get_account('lonelywolf')['savings_sbd_balance']
'0.000 SBD'
```
### Witness votes

The witnesses I have voted for.
```
>>> s.get_account('lonelywolf')['witness_votes']
['steemed', 'utopian-io', `imacryptorick`]
```
That's all for this tutorial, stay tuned for the next tutorials.

### Proof of Work Done

GitHub: https://github.com/lonelywolf1
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 27 others
properties (23)
authorlonelywolf
permlinksteempy-tutorials-2-basic-functions
categoryutopian-io
json_metadata{"community":"steempeak","app":"steempeak","format":"markdown","tags":["utopian-io","tutorials","python","steem-py","python-coding"],"users":["lonelywolf"],"links":["https://github.com/steemit/steem-python","https://steempeak.com/utopian-io/@lonelywolf/steempy-tutorials-1-installation-and-basics","https://github.com/lonelywolf1"],"image":["https://cdn.steemitimages.com/DQmcFSUorz8NrkquLgKD98jbYD2p2nMaPeKQPNscN5dM7gJ/image.png","https://files.steempeak.com/file/steempeak/lonelywolf/CGcIPuma-image.png"]}
created2018-11-23 11:00:15
last_update2018-11-23 11:00:15
depth0
children6
last_payout2018-11-30 11:00:15
cashout_time1969-12-31 23:59:59
total_payout_value0.257 HBD
curator_payout_value0.049 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,079
author_reputation25,295,791,457,391
root_title"SteemPY Tutorials #2 - Basic Functions"
beneficiaries
0.
accountutopian.pay
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,779,327
net_rshares577,736,875,468
author_curate_reward""
vote details (91)
@followus ·
very good postπŸ‘πŸ˜
properties (22)
authorfollowus
permlinkre-lonelywolf-steempy-tutorials-2-basic-functions-20181123t110051433z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-11-23 11:01:42
last_update2018-11-23 11:01:42
depth1
children1
last_payout2018-11-30 11:01:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length16
author_reputation9,738,737,936
root_title"SteemPY Tutorials #2 - Basic Functions"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,779,379
net_rshares0
@lonelywolf ·
thanks!
properties (22)
authorlonelywolf
permlinkre-followus-re-lonelywolf-steempy-tutorials-2-basic-functions-20181123t115125793z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-11-23 11:51:27
last_update2018-11-23 11:51:27
depth2
children0
last_payout2018-11-30 11:51:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7
author_reputation25,295,791,457,391
root_title"SteemPY Tutorials #2 - Basic Functions"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,781,059
net_rshares0
@portugalcoin · (edited)
$7.77
Your contribution has been found to be plagiarized from the following source <a href="https://steemit.com/utopian-io/@abhi3700/learn-steem-python-2-basic-commands">here</a>. 
Plagiarism is a serious offense. Your account has been accordingly banned from receiving utopian reviews.

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , ,
properties (23)
authorportugalcoin
permlinkre-lonelywolf-steempy-tutorials-2-basic-functions-20181124t005216360z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://steemit.com/utopian-io/@abhi3700/learn-steem-python-2-basic-commands","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-11-24 00:52:15
last_update2018-11-24 00:57:36
depth1
children1
last_payout2018-12-01 00:52:15
cashout_time1969-12-31 23:59:59
total_payout_value5.834 HBD
curator_payout_value1.940 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length450
author_reputation599,460,335,323,040
root_title"SteemPY Tutorials #2 - Basic Functions"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,810,787
net_rshares12,509,946,008,214
author_curate_reward""
vote details (7)
@utopian-io ·
Thank you for your review, @portugalcoin! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-lonelywolf-steempy-tutorials-2-basic-functions-20181124t005216360z-20181126t045640z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-11-26 04:56:42
last_update2018-11-26 04:56:42
depth2
children0
last_payout2018-12-03 04:56:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length64
author_reputation152,955,367,999,756
root_title"SteemPY Tutorials #2 - Basic Functions"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,915,925
net_rshares0
@steem-plus ·
SteemPlus upvote
Hi, @lonelywolf!

You just got a **0.53%** 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](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
properties (22)
authorsteem-plus
permlinksteempy-tutorials-2-basic-functions---vote-steemplus
categoryutopian-io
json_metadata{}
created2018-11-24 02:10:36
last_update2018-11-24 02:10:36
depth1
children0
last_payout2018-12-01 02:10:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length437
author_reputation247,952,188,232,400
root_title"SteemPY Tutorials #2 - Basic Functions"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,813,592
net_rshares0
@steemitboard ·
Congratulations @lonelywolf! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@lonelywolf/birthday1.png</td><td>1 Year on Steemit</td></tr></table>

<sub>_[Click here to view your Board of Honor](https://steemitboard.com/@lonelywolf)_</sub>


> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-lonelywolf-20181214t155114000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2018-12-14 15:51:15
last_update2018-12-14 15:51:15
depth1
children0
last_payout2018-12-21 15:51:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length508
author_reputation38,975,615,169,260
root_title"SteemPY Tutorials #2 - Basic Functions"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,837,128
net_rshares0