create account

Teaching myself Python Day 6 by mytechtrail

View this thread on: hive.blogpeakd.comecency.com
· @mytechtrail ·
$0.26
Teaching myself Python Day 6
Today I was experimenting with some code from @felixxx latest beem tutorial post https://steempeak.com/busy/@felixxx/python-for-steem-3-modules.

Here is the output of the beemaccount.py that I was testing out various beem modules. The Python code is listed below the image.

![pylearnday6.png](https://files.steempeak.com/file/steempeak/mytechtrail/qAIsxfFx-pylearn-day6.png)

```python
from beem.account import Account
from beem.blockchain import Blockchain
from beem import Steem
from beem.instance import set_shared_steem_instance

#steemit_api = Steem(node=["https://testnet.steemitdev.com"])
steemit_api = Steem(node=["https://api.steemit.com"])
set_shared_steem_instance(steemit_api)

blockchain = Blockchain()
head_block = blockchain.get_current_block_num()
test_account = Account(account = "mytechtrail")

print(head_block)
print("\n")
print(test_account.balances)
print("\n")
print(test_account.get_balance("available", "VESTS"))
print("\n")
print(test_account.get_voting_power())
print("\n")

for operation in test_account.history_reverse(start = head_block, stop = head_block - 10000, use_block_num = True):
    print(operation)
    print("\n")
```

This was fun, but shows me how much I need to learn how to work with Python data structures like the dictionary.
👍  , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authormytechtrail
permlinkteaching-myself-python-day-6
categoryulog
json_metadata{"app":"steempeak/1.19.0","format":"markdown","tags":["ulog","marlians","palnet","python","stem","ctp"],"users":["felixxx"],"links":["/@felixxx","/busy/@felixxx/python-for-steem-3-modules"],"image":["https://files.steempeak.com/file/steempeak/mytechtrail/qAIsxfFx-pylearn-day6.png"]}
created2019-11-04 20:07:45
last_update2019-11-04 20:07:45
depth0
children2
last_payout2019-11-11 20:07:45
cashout_time1969-12-31 23:59:59
total_payout_value0.131 HBD
curator_payout_value0.129 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,274
author_reputation19,007,675,085,002
root_title"Teaching myself Python Day 6"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,201,204
net_rshares1,364,715,896,334
author_curate_reward""
vote details (24)
@ds-tech ·
Learning to code can be fun and excruciating at the same time!
Most of my coding has been around web development so HTML5, CSS3, SASS/LESS, PHP, and Javascript.
Honestly CSS is a hard language to master despite not even being a logical programming language. 
I've thought about learning Python, but I haven't had the need for it yet.
properties (22)
authords-tech
permlinkq0htx6
categoryulog
json_metadata{"app":"steemit/0.1"}
created2019-11-05 11:15:06
last_update2019-11-05 11:15:06
depth1
children1
last_payout2019-11-12 11:15:06
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_length333
author_reputation9,748,583,551,565
root_title"Teaching myself Python Day 6"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,218,436
net_rshares0
@mytechtrail ·
I am learning Python mostly for fun and to keep learning something. Although as someone on Steem it is interesting to learn something that I can use to query the blockchain and learn more.
properties (22)
authormytechtrail
permlinkre-ds-tech-q0i5rp
categoryulog
json_metadata{"tags":["ulog"],"app":"steempeak/1.19.0"}
created2019-11-05 15:31:03
last_update2019-11-05 15:31:03
depth2
children0
last_payout2019-11-12 15:31:03
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_length188
author_reputation19,007,675,085,002
root_title"Teaching myself Python Day 6"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,225,282
net_rshares0