create account

Part 3: Coding on Hive With Python - Writing Data to Hive by learncode

View this thread on: hive.blogpeakd.comecency.com
· @learncode ·
$6.11
Part 3: Coding on Hive With Python - Writing Data to Hive
In part 3 we will write some data to the Hive blockchain while learning how to run Python code from a file and how to prompt for text input. Let’s go!

Part 1 covered how to set up a Python development environment. Part 2 taught how to install the Beem module and request data from the Hive blockchain. Parts 1 and 2 are pre-requisites for Part 3.

Writing data to a blockchain is also called broadcasting a transaction. For a transaction to be verified and accepted by the network, it needs to be signed with the correct cryptographic key. In our simple example here, we will make a request to follow a Hive blog. The ‘follow’ transaction requires the account’s private posting key.

---
## Important: Aside on Secrets Management

We must briefly discuss *secrets management* because you don’t want to expose your private keys.

Hard-coding private keys into your scripts is convenient but dangerous. You might upload your script to GitHub or send it to a friend and leak the key. Anyone who finds your key can use it to control your account. If you ever find yourself in a key leak situation, change your keys immediately using PeakD or another trusted Hive wallet.

---
## Following a Hive Blog Programmatically, using Python

Thanks to @holger80 and Beem, only a few lines of code are needed to ‘follow’ a blog.

For the below example to work, the code needs to be saved to disk as a file. Fire up a text editor and type or copy-paste these few lines of code. Save the file as *follow.py* somewhere convenient like your Home directory.

```
import beem
import getpass

name = input('enter your account name: ')
posting_key = getpass.getpass(prompt='enter your private posting key: ')

hive = beem.Hive(keys=[posting_key])
account = beem.account.Account(name, blockchain_instance=hive)

account.follow('learncode') 
print('Done! Ive followed learncode')
```

### Explanation of Python input() function
Python’s *input()* function will, when the code is run, prompt the user and wait for keyboard input. This way, each time it’s run, it will ask for account information.  Alternatively, we could hard-code the inputs in the script, but that’s less than ideal for key management as explained above.

### Explanation of Python getpass() function
Python's *getpass* module and function is an extension of the *input()* function explained above. The main difference is it hides the input from the console as it's being typed. So by using *getpass()*, the private posting key won't be visible to shoulder surfers.

### Explanation of Beem Hive, Account Objects and follow() Function
After collecting inputs, Beem is asked to set up a Hive object and an Account object. This is a little convoluted. The Hive object is necessary to provide our posting key. The Hive object is also provided as an input parameter when instantiating the Account object. After the Account object is set up, the wallet name and key are in the right place to be used for broadcasting transactions to the network.

The Account object’s `follow()` function is called. This function triggers a network request to a Hive API node including the transaction details.

---

Once *follow.py* is saved to disk we can run the code. In your terminal or CMD, `cd` (change directory) to where you saved the *follow.py* file. Then tell the Python interpreter to run the code with command:  `python3 follow.py`. On Windows the command is slightly different: `python follow.py`. If the code is run successfully you should see the input prompts from the code like below:

```
$ python3 follow.py
enter your account name: learncode
enter your private posting key: 
Done! Ive followed learncode

```
---
## Confirming Transaction Details in Hive Block Explorer

After the script is done, if all goes well, the transaction is sent to the network. A Hive block explorer can be used to verify the transaction. It should show up in the account history after 1-2 minutes on [hiveblocks.com/@insert-your-account](hiveblocks.com/@learncode). The transaction preview will look like this:

![image.png](https://files.peakd.com/file/peakd-hive/learncode/23wCd1TDxzKPdaF8c5bW9v5BsZaFD1ssegpswdp688ZRLNeW4pbtD2Kkk1gAWiDcTqkas.png)

Clicking the link in the top right reveals transaction details like below. 

![image.png](https://files.peakd.com/file/peakd-hive/learncode/23t8CoYsD4gZzSGhzHC1KAmBSyarAmtfwW6dMAPhVb2hAu7eL24DmujJZ2crStXNRuBvC.png)

This view shows the Custom_JSON object that was created for us by beem under the hood. Beem sent a transaction with an operation of type 'custom_json'. The *custom_json* operation has an *id* of *follow* and a JSON object content for the details of the *follow* action. In the JSON object's *what* key, instead of *blog* the value could be *ignore* for mute, or empty (`"what":[]`) for unfollow/unmute.

```
custom_json operation ID -> 	id		follow
JSON-formatted data		 -> 	json	["follow",{"follower":"learncode","following":"learncode","what":["blog"]}]
```
---

### Aside on Hive Block Explorer Tool

Hive block explorer is a super useful tool for troubleshooting all kinds of Hive transactions. For example, using this tool you can inspect and reverse-engineer custom_JSON transactions from Hive dApps and games.

---

## Advanced: what happens if the wrong key or wrong account name is used?

If a non-existing account name is entered, beem will throw a `beem.exceptions.AccountDoesNotExistsException`. If an incorrect key is entered, beem will throw a `beem.exceptions.MissingKeyError`

Handling these exceptions improves the usability of the code. This can be done by wrapping the beem calls in *try/except* blocks like this.

```
import beem
import getpass
import sys

name = input('enter your account name: ')
posting_key = getpass.getpass(prompt='enter your private posting key: ')


hive = beem.Hive(keys=[posting_key])

try:
    account = beem.account.Account(name, blockchain_instance=hive)
except beem.exceptions.AccountDoesNotExistsException:
    print('Error! Invalid wallet name')
    sys.exit(1)

try:
    account.follow('learncode') 
except beem.exceptions.MissingKeyError:
    print('Error! Incorrect private posting key')
    sys.exit(1)


print('Done! Ive followed learncode')

```

Now, some friendly error messages will be shown instead of Python's verbose stack traces.

```
$ python3 follow.py
enter your account name: learncode
enter your private posting key: 
Error! Incorrect private posting key
```

```
$ python3 follow.py
enter your account name: learncode123123
enter your private posting key: 
Error! Invalid wallet name
```

--- 
## Wrapping up 

That's a wrap for today. In part 3 we learned how to run python code from a file, how to prompt the user for input, how to set up posting keys to use in Beem, how to use Beem to follow a Hive blog. And we saw how to use the Hive block explorer to verify transaction details. As bonus, we also discussed secrets management and how to handle beem exceptions for errors. 

---

p.s. Thanks for reading! Please let me know if anything is unclear or incorrect. This is intended to be a living document to be improved and maintained over time.

---
p.p.s. This blog is brought to you by the [Hive.Pizza](https:/hive.pizza) team.

---
p.p.p.s. A [channel for #learn-code](https://discord.gg/AucZk6h5Pf) is set up in the [Hive.pizza discord](https://discord.gg/AucZk6h5Pf) for discussing these lessons and enabling success for all code learners.



👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 16 others
properties (23)
authorlearncode
permlinkpart-3-coding-on-hive-with-python-writing-data-to-hive
categoryprogramming
json_metadata"{"app":"peakd/2021.05.5","format":"markdown","author":"hive.pizza","description":"Learn how to follow a Hive blog using Python, plus other odds and ends.","tags":["programming","coding","hive","python","beem","ctp","palnet","proofofbrain","stem","broadhive"],"users":["holger80","insert-your-acco","learncode"],"image":["https://files.peakd.com/file/peakd-hive/learncode/23t8CoYsD4gZzSGhzHC1KAmBSyarAmtfwW6dMAPhVb2hAu7eL24DmujJZ2crStXNRuBvC.png","https://files.peakd.com/file/peakd-hive/learncode/23wCd1TDxzKPdaF8c5bW9v5BsZaFD1ssegpswdp688ZRLNeW4pbtD2Kkk1gAWiDcTqkas.png"]}"
created2021-06-05 22:04:24
last_update2021-06-05 22:04:24
depth0
children20
last_payout2021-06-12 22:04:24
cashout_time1969-12-31 23:59:59
total_payout_value3.062 HBD
curator_payout_value3.049 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7,412
author_reputation682,726,195,093
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id104,154,003
net_rshares10,734,608,929,328
author_curate_reward""
vote details (80)
@charcoalbuffet ·
Thanks for doing this. I couldn't find much documentation on how to interact with the Hive blockchain or at least not many tutorials.

Hoping to learn and create some simple projects to get started.



---

<center><sub>Posted via [proofofbrain.io](https://www.proofofbrain.io/@charcoalbuffet/qu9fwt)</sub></center>
👍  , , , , ,
properties (23)
authorcharcoalbuffet
permlinkqu9fwt
categoryprogramming
json_metadata{"tags":["proofofbrain"],"app":"proofofbrain/0.1","canonical_url":"https://www.proofofbrain.io/@charcoalbuffet/qu9fwt"}
created2021-06-06 03:19:42
last_update2021-06-06 03:19:42
depth1
children3
last_payout2021-06-13 03:19: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_length315
author_reputation66,187,939,514,805
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,158,330
net_rshares24,396,016,618
author_curate_reward""
vote details (6)
@learncode · (edited)
Thanks for reading! https://developers.hive.io is decent documentation for Hived APIs. Beem's documentation is great: https://beem.readthedocs.io/en/latest/beem.account.html
👍  ,
properties (23)
authorlearncode
permlinkre-charcoalbuffet-qu9g3a
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.05.5"}
created2021-06-06 03:23:33
last_update2021-06-06 03:23:48
depth2
children2
last_payout2021-06-13 03:23:33
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_length173
author_reputation682,726,195,093
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,158,367
net_rshares4,038,779,685
author_curate_reward""
vote details (2)
@charcoalbuffet ·
Thank you for pointing me in the right direction. I will check them out and hopefully I can get it to work.



---

<center><sub>Posted via [proofofbrain.io](https://www.proofofbrain.io/@charcoalbuffet/qub1tp)</sub></center>
👍  
properties (23)
authorcharcoalbuffet
permlinkqub1tp
categoryprogramming
json_metadata{"tags":["proofofbrain"],"app":"proofofbrain/0.1","canonical_url":"https://www.proofofbrain.io/@charcoalbuffet/qub1tp"}
created2021-06-07 00:10:39
last_update2021-06-07 00:10:39
depth3
children1
last_payout2021-06-14 00:10:39
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_length224
author_reputation66,187,939,514,805
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,176,029
net_rshares1,226,296,067
author_curate_reward""
vote details (1)
@fireguardian ·
OK, got a couple of questions:

Should I run this from the cmd or from the python enviroment?

I tried from the cmd and it gave me a "traceback" from all the actions (I guess). And in the last line it gave me an error for not loading Base58 object

``` 
File "C:\Python39\lib\site-packages\beemgraphenebase\base58.py", line 49, in __init__
    raise ValueError("Error loading Base58 object")
ValueError: Error loading Base58 object 
```
What should I do from here?
properties (22)
authorfireguardian
permlinkre-learncode-qxjp6v
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.07.5"}
created2021-08-08 23:56:57
last_update2021-08-08 23:56:57
depth1
children1
last_payout2021-08-15 23:56:57
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_length464
author_reputation12,625,048,693,836
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,410,520
net_rshares0
@fireguardian ·
Ok, now we have it!


![image.png](https://files.peakd.com/file/peakd-hive/fireguardian/23viTJdudm8EQA7D6pWwHmwpuo32BfQaEeLVqJfTxDMLXvBD1E5T1umY77ifTz8Jz3eVS.png)

The error was in my private keys, for some reason the ctrl+c doesn't work in the CMD, had to click and paste!

Thanks for all the help!
!PIZZA
properties (22)
authorfireguardian
permlinkre-fireguardian-qxjqkn
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.07.5"}
created2021-08-09 00:26:48
last_update2021-08-09 00:26:48
depth2
children0
last_payout2021-08-16 00:26:48
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_length306
author_reputation12,625,048,693,836
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,410,846
net_rshares0
@hivebuzz ·
Congratulations @learncode! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://images.hive.blog/60x70/http://hivebuzz.me/@learncode/upvoted.png?202106060152"></td><td>You received more than 200 upvotes.<br>Your next target is to reach 300 upvotes.</td></tr>
</table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@learncode) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Check out the last post from @hivebuzz:**
<table><tr><td><a href="/hivebuzz/@hivebuzz/pud-202106-feedback"><img src="https://images.hive.blog/64x128/https://i.imgur.com/zHjYI1k.jpg"></a></td><td><a href="/hivebuzz/@hivebuzz/pud-202106-feedback">Feedback from the June 1st Hive Power Up Day</a></td></tr></table>

###### Support the HiveBuzz project. [Vote](https://hivesigner.com/sign/update_proposal_votes?proposal_ids=%5B%22109%22%5D&approve=true) for [our proposal](https://peakd.com/me/proposals/147)!
properties (22)
authorhivebuzz
permlinkhivebuzz-notify-learncode-20210606t020056000z
categoryprogramming
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2021-06-06 02:00:54
last_update2021-06-06 02:00:54
depth1
children3
last_payout2021-06-13 02:00:54
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_length1,139
author_reputation367,870,644,930,125
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,157,378
net_rshares0
@learncode ·
Woot! Awesome! Hi again @traciyork. Thanks for all of the HiveBuzz love.
properties (22)
authorlearncode
permlinkre-hivebuzz-202165t19242834z
categoryprogramming
json_metadata{"tags":["ecency"],"app":"ecency/3.0.18-mobile","format":"markdown+html"}
created2021-06-06 02:02:42
last_update2021-06-06 02:02:42
depth2
children2
last_payout2021-06-13 02:02: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_length72
author_reputation682,726,195,093
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,157,398
net_rshares0
@hivebuzz ·
Thank you @learncode ❤️❤️❤️

Support us back and [vote for our witness](https://hivesigner.com/sign/account-witness-vote?witness=steemitboard&approve=1). 
You will get one more badge and more powerful upvotes from us on your posts with your next notifications.<div class="pull-right"><a href="/@hive.engage">![](https://i.imgur.com/XsrNmcl.png)</a></div>
properties (22)
authorhivebuzz
permlinkre-re-hivebuzz-202165t19242834z
categoryprogramming
json_metadata{"app":"engage"}
created2021-06-07 05:35:57
last_update2021-06-07 05:35:57
depth3
children0
last_payout2021-06-14 05:35:57
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_length354
author_reputation367,870,644,930,125
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,180,630
net_rshares0
@traciyork ·
LOL! While I'd be happy to take credit for the awesome replies from @hivebuzz, I'm not the one leaving them. But thanks for the shout out, @learncode! 😊
properties (22)
authortraciyork
permlinkre-learncode-quatfw
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.05.5"}
created2021-06-06 21:09:57
last_update2021-06-06 21:09:57
depth3
children0
last_payout2021-06-13 21:09:57
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_length152
author_reputation423,067,590,762,015
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,173,697
net_rshares0
@phasewalker ·
Cool post!
Let's be friends :D
👎  
properties (23)
authorphasewalker
permlinkre-learncode-202166t0737518z
categoryprogramming
json_metadata{"tags":["programming","coding","hive","python","beem","ctp","palnet","proofofbrain","stem","broadhive"],"app":"ecency/3.0.17-vision","format":"markdown+html"}
created2021-06-05 22:07:39
last_update2021-06-05 22:07:39
depth1
children3
last_payout2021-06-12 22:07:39
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_length30
author_reputation-38,970,665,642,762
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,154,050
net_rshares-68,994,643,124
author_curate_reward""
vote details (1)
@learncode ·
Thanks for reading! I like friends.
👍  
properties (23)
authorlearncode
permlinkre-phasewalker-qu91k0
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.05.5"}
created2021-06-05 22:09:36
last_update2021-06-05 22:09:36
depth2
children1
last_payout2021-06-12 22:09: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_length35
author_reputation682,726,195,093
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,154,090
net_rshares27,723,712,613
author_curate_reward""
vote details (1)
@steevc ·
Note that user comments that all over the place. Makes you wonder if they really mean it ;)
properties (22)
authorsteevc
permlinkre-learncode-qua1l1
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.05.5"}
created2021-06-06 11:07:48
last_update2021-06-06 11:07:48
depth3
children0
last_payout2021-06-13 11:07:48
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_length91
author_reputation1,045,991,340,361,160
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,164,910
net_rshares0
@onealfa.pob ·
$0.02
This is a 100% spammer:
https://www.proofofbrain.io/@phasewalker/comments



---

<center><sub>Posted via [proofofbrain.io](https://www.proofofbrain.io/@onealfa.pob/qubsud)</sub></center>
👍  
properties (23)
authoronealfa.pob
permlinkqubsud
categoryprogramming
json_metadata{"tags":["proofofbrain"],"links":["https://www.proofofbrain.io/@phasewalker/comments"],"app":"proofofbrain/0.1","canonical_url":"https://www.proofofbrain.io/@onealfa.pob/qubsud"}
created2021-06-07 09:54:12
last_update2021-06-07 09:54:12
depth2
children0
last_payout2021-06-14 09:54:12
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.012 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length187
author_reputation2,310,476,671,678
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,184,469
net_rshares75,446,870,360
author_curate_reward""
vote details (1)
@steevc ·
I am tempted to set up a new account and automate its activities. So far I have only been reading from the blockchain with beem. There is so much possible with this. Have to think up some uses for it.

!PIZZA
👍  
properties (23)
authorsteevc
permlinkre-learncode-qua1np
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.05.5"}
created2021-06-06 11:09:27
last_update2021-06-06 11:09:27
depth1
children2
last_payout2021-06-13 11:09: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_length208
author_reputation1,045,991,340,361,160
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,164,928
net_rshares588,082,030
author_curate_reward""
vote details (1)
@learncode ·
$0.10
Thanks for reading!

These are building blocks. I’ll share more examples of how to apply these concepts in future blogs.
👍  
properties (23)
authorlearncode
permlinkre-steevc-202166t112124113z
categoryprogramming
json_metadata{"tags":["programming"],"app":"ecency/3.0.18-mobile","format":"markdown+html"}
created2021-06-06 18:21:24
last_update2021-06-06 18:21:24
depth2
children0
last_payout2021-06-13 18:21:24
cashout_time1969-12-31 23:59:59
total_payout_value0.048 HBD
curator_payout_value0.049 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length120
author_reputation682,726,195,093
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,171,395
net_rshares280,414,052,368
author_curate_reward""
vote details (1)
@pizzabot ·
<div class='pull-right'><center><sup>Connect</sup></center><p><a href="https://discord.gg/Q9bQAKpWGS"><img src="https://files.peakd.com/file/peakd-hive/pizzabot/AKF96fKjnX3wjXERHcKAFHaoHnfTVhXqPjXVz8E1Th9nPiJqmFtaycosVpPBZ7z.png"></a></p></div><div class='pull-right'><center><sup>Trade</sup></center><p><a href='https://hive-engine.com/?p=market&t=PIZZA'><img src="https://files.peakd.com/file/peakd-hive/pizzabot/23sxbi2M4UjELDzQjxPdzubdgfMjHTCtA1xueyxmnhJUrB8136VyK3pqynyWYiZYF9HrC.png"></a></p></div><center><br> <p>@learncode! I sent you a slice of <strong><em>$PIZZA</em></strong> on behalf of @steevc.</p> <p>Learn more about <strong><em>$PIZZA Token</em></strong> at <a href="https://hive.pizza">hive.pizza</a> <sub>(2/10)</sub></p> </center><div></div>
properties (22)
authorpizzabot
permlinkre-re-learncode-qua1np-20210606t111021z
categoryprogramming
json_metadata"{"app": "beem/0.24.19"}"
created2021-06-06 11:10:21
last_update2021-06-06 11:10:21
depth2
children0
last_payout2021-06-13 11:10:21
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_length761
author_reputation6,157,049,145,447
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,164,949
net_rshares0
@treidd ·
Hi!! How could I withdraw SWAP.HIVE from the market to my account? When its withdrawn, it's transformed to HIVE. How could I then withdraw that Hive into, let's say, binance?
properties (22)
authortreidd
permlinkr5mh5n
categoryprogramming
json_metadata{"app":"hiveblog/0.1"}
created2022-01-13 00:25:00
last_update2022-01-13 00:25:00
depth1
children0
last_payout2022-01-20 00:25:00
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_length174
author_reputation46,062,903,565
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id109,426,019
net_rshares0
@wwwiebe ·
Great tutorial and walk through. I've been using python for many years, now, and it's versatility never ceases to amaze me.

I **really** like how you've devoted a paragraph to remind users to be careful of their keys. The importance of keys and password management cannot be stressed enough. When I was new to coding I would put passwords right into the script because it was easy, and that's just The Wrong Thing To Do.

Very nice post.
👍  
properties (23)
authorwwwiebe
permlinkre-learncode-qua3i0
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2021.05.5"}
created2021-06-06 11:49:12
last_update2021-06-06 11:49:12
depth1
children1
last_payout2021-06-13 11:49:12
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_length438
author_reputation318,663,954,734,459
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,165,494
net_rshares600,845,473
author_curate_reward""
vote details (1)
@learncode ·
Thanks for reading! Sometimes I get lazy and put the keys in the code, but it’s strongly discouraged. At least use a separate account without much in the wallet if you want to do that.
properties (22)
authorlearncode
permlinkre-wwwiebe-202166t111913384z
categoryprogramming
json_metadata{"tags":["programming"],"app":"ecency/3.0.18-mobile","format":"markdown+html"}
created2021-06-06 18:19:12
last_update2021-06-06 18:19:12
depth2
children0
last_payout2021-06-13 18:19:12
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_length184
author_reputation682,726,195,093
root_title"Part 3: Coding on Hive With Python - Writing Data to Hive"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,171,342
net_rshares0