create account

Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database by steempytutorials

View this thread on: hive.blogpeakd.comecency.com
· @steempytutorials · (edited)
$79.42
Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database
<center>![steem-python.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1515886103/kmzfcpvtzuwhvqhgpyjp.png)</center>

This tutorial is part of a series where different aspects of programming with `steem-python` are explained. Links to the other tutorials can be found in the curriculum section below. This part will explain how to set up a `MySQL database` interface with the `STEEM Blockchain`. And in addition adding the `PHPMyAdmin` user interface.


---

#### What will I learn

- Install Apache
- Install MySQL
- Install PHPMyAdmin
- Install MySQL for Python
- Configure the database
- Adding transfers to the database

#### Requirements

- Python3.6
- `steem-python`
- Linux/bash

#### Difficulty

- basic

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

### Tutorial

#### Preface
[Tutorial 23](https://steemit.com/utopian-io/@steempytutorials/part-23-retrieve-and-process-full-blocks-from-the-steem-blockchain) discussed how to retrieve `blocks` from the `STEEM Blockchain` and interact with the `transactions` in these blocks. In certain cases its preferable to store data locally for faster accessibility. This tutorial will explain how to set up `Apache`, `MySQL` and `PHPMyAdmin` to store and access this data easily. The code in this tutorial will scan the `blockchain` for `transfers` in the specified `block range` and store these in a local `MySQL database`. 

#### Setup
Download the files from [Github](https://github.com/amosbastian/steempy-tutorials/tree/master/part_26). There 2 are files `get_blocks.py` which contains the interaction with the `STEEM Blockchain` and `db.py` which contains interactions with the `MySQL database`. This tutorial was tested on a clean `ubuntu 16.04` installation with `Anaconda` and `Steem-Python` already installed. Refer to this [Tutorial](https://steemit.com/utopian-io/@amosbastian/how-to-install-steem-python-the-official-steem-library-for-python) for more information on how to do that. It is also assumed the code is running on a remote server. `get_blocks.py` takes two arguments, the `starting_block` from which to start from and `block_count` to set the amount of `blocks` to retrieve.

Run scripts as following:
`> python bidbot.py 23822234 100`

#### Install Apache
Install apache as follows:
```
sudo apt-get update
sudo apt-get install apache2
```

Set the global ServerName by adding `ServerName <server_ip_adress>` to the end of the file.:
```
sudo nano /etc/apache2/apache2.conf
```

Check if done correct with:

```
sudo apache2ctl configtest

```
Output should be:
```
Output
Syntax OK
```

Restart the server for changes to take affect:
```
sudo systemctl restart apache2
```

In case of using a firewall add an exception for apache:
```
sudo ufw allow in "Apache Full"
```

#### Install MySQL
Install MySQL as follows. Go through the installation, you will be asked to set a root user password. The default settings are oke.:

```
sudo apt update
sudo apt install mysql-server
```

Optional but good practice. Go through the each option and select your preference:
```
sudo mysql_secure_installation
```


#### Install PHPMyAdmin

Install as follows, be sure to select apache2 by pressing space:
```
sudo apt-get update
sudo apt-get install phpmyadmin php-mbstring php-gettext
```

Enable the mcrypt and mbstring extensions:

```
sudo phpenmod mcrypt
sudo phpenmod mbstring
```

Restart apache:
```
sudo systemctl restart apache2
```

You can check if its working by go to the following url:
```
http://<server_ip_adress>/phpmyadmin
```

#### Install mysql for python
Install the Python and MySQL development headers and libraries:

```
sudo apt-get install python-dev libmysqlclient-dev

```

For python3:
```
sudo apt-get install python3-dev
```

Install mysql for python:
```
pip install mysqlclient
```

#### Configure the database
With everything installed the database can be set up. A new user `test` will be made and a database called `steem` will be created in which a table `transfer` will be made. This table will have columns for `block`, `index`, `timestamp`, `to`, `from`, `amount` and `memo`. The settings below are compatible with the provide code, however tweaking and adjusting for your own preferences is advised. 

Login as the root user:
```
mysql -u root -p
```

Create a test account, this account is used in the code:
```
GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY 'Test!234#';
```
Create a new database called `steem`:
```
CREATE DATABASE steem;
```
Create a table `tranfers` which will be used to store the transfers:
```
CREATE TABLE `steem`.`transfers` ( `id` INT NOT NULL AUTO_INCREMENT , `block` INT NOT NULL , `index` INT NOT NULL , `timestamp` TIMESTAMP NOT NULL , `to` TEXT NOT NULL , `from` TEXT NOT NULL , `amount` TEXT NOT NULL , `memo` TEXT NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
```
Set the character set of this table to work together with emojis:
```
ALTER TABLE transfers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
```
Exit mysql:
```
\q
```

#### Adding transfers to the database

All transactions in each block are checked to be of the type `transfer`, if so they are processed to be stored into the database.
```
for transaction in block['transactions']:
    if transaction['operations'][0][0] == self.tag:
        self.process_transaction(index,
                                 block,
                                 transaction['operations']
                                 [0][1])
```

All the data wanted for storage is retrieved from the block and transaction and inserted into the database.
```
def process_transaction(self, index, block, operation):
    date = block['timestamp']
    to = operation['to']
    user = operation['from']
    amount = operation['amount']
    memo = operation['memo']

    db.insert_selection(self.block, index, date, to, user, amount, memo)
```

The query specifies the `table` to use and which `variables` will be stored.
```
def insert_selection(block, index, timestamp, to, user, amount, memo):

    query = "INSERT INTO `transfers` (`block`, `index`, `timestamp`,`to`, `from`, `amount`, `memo`)" \
            " VALUES ('{}', '{}', '{}', '{}', '{}', '{}', '{}');".format(block, index, timestamp, to, user, amount, memo)
```

This part is where user credentials are set and the database itself. `localhost` refers to storing the data locally.

```
    try:
        db = MySQLdb.connect(host="localhost",
                             user="test",
                             passwd="Test!234#",
                             db="steem")
```
Since `STEEM` allows for emojis to be used it is important to set everything to `utf8mb4`. 
```
        db.set_character_set('utf8mb4')

        cur = db.cursor()
        cur.execute('SET NAMES utf8mb4;')
        cur.execute('SET CHARACTER SET utf8mb4;')
        cur.execute('SET character_set_connection=utf8mb4;')
        cur.execute(query)

        db.commit()

    except Exception as e:
        print('Error:', e)

    finally:
        cur.close()
        db.close()

```

#### Running the script
In case LC_ALL is not set:
```
export LC_ALL="en_US.UTF-8"
```

With everything set up all is left is running the code. Doing so will start retrieving the `blocks` and look for `transfers` in each `block`. Each `transfer` is then stored in the local `database`. 

```
python get_blocks.py 23892389 100
Booted
Connected to: https://api.steemit.com

Block:  23892389

Block:  23892390

Block:  23892391

Block:  23892392

.
.
.
.
Block:  23892488

```

Now head to `http://<server_ip_adress>/phpmyadmin` and it should look something like this:

![Screenshot 2018-07-05 02.21.30.png](https://cdn.steemitimages.com/DQmX46eaUjaz4L7JRuWaHQq6gRGbnaBNSnzdUKrJcJT1j7P/Screenshot%202018-07-05%2002.21.30.png)

#### Curriculum
##### Set up:
- [Part 0: How To Install Steem-python, The Official Steem Library For Python](https://steemit.com/utopian-io/@amosbastian/how-to-install-steem-python-the-official-steem-library-for-python)
- [Part 1: How To Configure The Steempy CLI Wallet And Upvote An Article With Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-1-how-to-configure-the-steempy-cli-wallet-and-upvote-an-article-with-steem-python)
##### Filtering
- [Part 2: How To Stream And Filter The Blockchain Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-2-how-to-stream-and-filter-the-blockchain-using-steem-python)
- [Part 6: How To Automatically Reply To Mentions Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-6-how-to-automatically-reply-to-mentions-using-steem-python)
- [Part 23: Part 23: Retrieve And Process Full Blocks From The Steem Blockchain](https://steemit.com/utopian-io/@steempytutorials/part-23-retrieve-and-process-full-blocks-from-the-steem-blockchain)
- [Part 24: An In Dept Look At Steem Operation Types Part I](https://steemit.com/utopian-io/@steempytutorials/part-24-an-in-dept-look-at-steem-operation-types-part-i)
##### Voting
- [Part 3: Creating A Dynamic Autovoter That Runs 24/7](https://steemit.com/utopian-io/@steempytutorials/part-3-creating-a-dynamic-upvote-bot-that-runs-24-7-first-weekly-challenge-3-steem-prize-pool)
- [Part 4: How To Follow A Voting Trail Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-4-how-to-follow-a-voting-trail-using-steem-python)
- [Part 8: How To Create Your Own Upvote Bot Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-8-how-to-create-your-own-upvote-bot-using-steem-python)
- [Part 25: Create A Bidbot With Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-25-create-a-bidbot-with-steem-python)
##### Posting
- [Part 5: Post An Article Directly To The Steem Blockchain And Automatically Buy Upvotes From Upvote Bots](https://steemit.com/utopian-io/@steempytutorials/part-5-post-an-article-directly-to-the-steem-blockchain-and-automatically-buy-upvotes-from-upvote-bots)
- [Part 7: How To Schedule Posts And Manually Upvote Posts For A Variable Voting Weight With Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-7-how-to-schedule-posts-and-manually-upvote-posts-for-a-variable-voting-weight-with-steem-python)
###### Constructing
- [Part 10: Use Urls To Retrieve Post Data And Construct A Dynamic Post With Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-10-use-urls-to-retrieve-post-data-and-construct-a-dynamic-post-with-steem-python)
##### Rewards
- [Part 9: How To Calculate A Post's Total Rewards Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/how-to-calculate-a-post-s-total-rewards-using-steem-python)
- [Part 12: How To Estimate Curation Rewards Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-12-how-to-estimate-curation-rewards)
- [Part 14: How To Estimate All Rewards In Last N Days Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/how-to-estimate-all-rewards-in-last-n-days-using-steem-python)
##### Transfers
- [Part 11: How To Build A List Of Transfers And Broadcast These In One Transaction With Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-11-how-to-build-a-list-of-transfers-and-broadcast-these-in-one-transaction-with-steem-python)
- [Part 13: Upvote Posts In Batches Based On Current Voting Power With Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-13-upvote-posts-in-batches-based-on-current-voting-power-with-steem-python)
##### Account Analysis
- [Part 15: How To Check If An Account Is Following Back And Retrieve Mutual Followers/Following Between Two Accounts](https://steemit.com/utopian-io/@steempytutorials/part-15-how-to-check-if-an-account-is-following-back-and-retrieve-mutual-followers-following-between-two-accounts)
- [Part 16: How To Analyse A User's Vote History In A Specific Time Period Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-16-how-to-analyse-a-user-s-vote-history-in-a-specific-time-period-using-steem-python)
- [Part 18: How To Analyse An Account's Resteemers Using Steem-Python](https://steemit.com/utopian-io/@steempytutorials/part-18-how-to-analyse-an-account-s-resteemers)
---

The code for this tutorial can be found on [GitHub](https://github.com/amosbastian/steempy-tutorials/tree/master/part_26)!

This tutorial was written by @juliank.
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 24 others
properties (23)
authorsteempytutorials
permlinkpart-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database
categoryutopian-io
json_metadata{"tags":["utopian-io","tutorials","steem-python","programming","python"],"users":["juliank"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1515886103/kmzfcpvtzuwhvqhgpyjp.png","https://cdn.steemitimages.com/DQmX46eaUjaz4L7JRuWaHQq6gRGbnaBNSnzdUKrJcJT1j7P/Screenshot%202018-07-05%2002.21.30.png"],"links":["https://github.com/steemit/steem-python","https://steemit.com/utopian-io/@steempytutorials/part-23-retrieve-and-process-full-blocks-from-the-steem-blockchain","https://github.com/amosbastian/steempy-tutorials/tree/master/part_26","https://steemit.com/utopian-io/@amosbastian/how-to-install-steem-python-the-official-steem-library-for-python","https://steemit.com/utopian-io/@steempytutorials/part-1-how-to-configure-the-steempy-cli-wallet-and-upvote-an-article-with-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-2-how-to-stream-and-filter-the-blockchain-using-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-6-how-to-automatically-reply-to-mentions-using-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-24-an-in-dept-look-at-steem-operation-types-part-i","https://steemit.com/utopian-io/@steempytutorials/part-3-creating-a-dynamic-upvote-bot-that-runs-24-7-first-weekly-challenge-3-steem-prize-pool","https://steemit.com/utopian-io/@steempytutorials/part-4-how-to-follow-a-voting-trail-using-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-8-how-to-create-your-own-upvote-bot-using-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-25-create-a-bidbot-with-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-5-post-an-article-directly-to-the-steem-blockchain-and-automatically-buy-upvotes-from-upvote-bots","https://steemit.com/utopian-io/@steempytutorials/part-7-how-to-schedule-posts-and-manually-upvote-posts-for-a-variable-voting-weight-with-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-10-use-urls-to-retrieve-post-data-and-construct-a-dynamic-post-with-steem-python","https://steemit.com/utopian-io/@steempytutorials/how-to-calculate-a-post-s-total-rewards-using-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-12-how-to-estimate-curation-rewards","https://steemit.com/utopian-io/@steempytutorials/how-to-estimate-all-rewards-in-last-n-days-using-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-11-how-to-build-a-list-of-transfers-and-broadcast-these-in-one-transaction-with-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-13-upvote-posts-in-batches-based-on-current-voting-power-with-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-15-how-to-check-if-an-account-is-following-back-and-retrieve-mutual-followers-following-between-two-accounts","https://steemit.com/utopian-io/@steempytutorials/part-16-how-to-analyse-a-user-s-vote-history-in-a-specific-time-period-using-steem-python","https://steemit.com/utopian-io/@steempytutorials/part-18-how-to-analyse-an-account-s-resteemers"],"app":"steemit/0.1","format":"markdown"}
created2018-07-05 02:14:57
last_update2018-07-05 17:48:12
depth0
children11
last_payout2018-07-12 02:14:57
cashout_time1969-12-31 23:59:59
total_payout_value60.224 HBD
curator_payout_value19.197 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12,332
author_reputation31,094,047,689,691
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,461,467
net_rshares37,537,351,223,963
author_curate_reward""
vote details (88)
@portugalcoin ·
$0.07
Thank you for your contribution.

It is very interesting to keep all transfers in a database. Then you can do a lot of analysis of the bot data.

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/8/11211313).

---- 
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-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t133436280z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/8/11211313","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-07-05 13:34:36
last_update2018-07-05 13:34:36
depth1
children1
last_payout2018-07-12 13:34:36
cashout_time1969-12-31 23:59:59
total_payout_value0.055 HBD
curator_payout_value0.016 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length636
author_reputation599,441,732,281,848
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,526,408
net_rshares34,946,823,859
author_curate_reward""
vote details (2)
@steempytutorials ·
Oh you understand what is coming next ;p

>It is very interesting to keep all transfers in a database. Then you can do a lot of analysis of the bot data.
properties (22)
authorsteempytutorials
permlinkre-portugalcoin-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t175153902z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-07-05 17:51:54
last_update2018-07-05 17:51:54
depth2
children0
last_payout2018-07-12 17:51: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_length153
author_reputation31,094,047,689,691
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,556,034
net_rshares0
@utopian-io ·
Hey @steempytutorials
**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t083712z
categoryutopian-io
json_metadata"{"app": "beem/0.19.42"}"
created2018-07-07 08:37:12
last_update2018-07-07 08:37:12
depth1
children0
last_payout2018-07-14 08:37: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_length308
author_reputation152,955,367,999,756
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,755,220
net_rshares0
@zipsardinia · (edited)
$0.43
Hello Friend. I started the tutorial. I also imported my account, everything worked. Since I have steempy set nodes https://rpc.steemviz.com
How can I set the default node again? Thanks!
WARNING:root:Retry in 1s -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
WARNING:root:Retry in 2s -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
WARNING:root:Retry in 3s -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
.....
ERROR:root:Failed after 10 attempts -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
Traceback (most recent call last):
  File "/home/mfrau/anaconda3/bin/steempy", line 11, in "<"module">"
    sys.exit(legacyentry())
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/cli.py", line 776, in legacyentry
    steem = stm.Steem(no_broadcast=args.no_broadcast, **options)
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/steem.py", line 59, in __init__
    steemd_instance=self.steemd, no_broadcast=no_broadcast, **kwargs)
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/commit.py", line 96, in __init__
    self.wallet = Wallet(self.steemd, **kwargs)
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/wallet.py", line 61, in __init__
    self.prefix = self.steemd.chain_params["prefix"]
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/steemd.py", line 65, in chain_params
    props = self.get_dynamic_global_properties()
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/steemd.py", line 419, in get_dynamic_global_properties
    return self.call('get_dynamic_global_properties', api='database_api')
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steembase/http_client.py", line 288, in call
    raise e
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steembase/http_client.py", line 246, in call
    % (response.status, self.hostname))
steembase.exceptions.RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
πŸ‘  , , , , , , , , , , , , , , ,
properties (23)
authorzipsardinia
permlinkre-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t084438558z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://rpc.steemviz.com"],"app":"steemit/0.1"}
created2018-07-07 08:44:39
last_update2018-07-07 08:47:09
depth1
children4
last_payout2018-07-14 08:44:39
cashout_time1969-12-31 23:59:59
total_payout_value0.334 HBD
curator_payout_value0.099 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,018
author_reputation5,608,798,363,039
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id63,755,810
net_rshares217,218,127,523
author_curate_reward""
vote details (16)
@juliank ·
You can manually set the nodes in the code as following:

>nodes = ['https://api.steemit.com',
                      'https://rpc.buildteam.io',
                      'https://rpc.steemviz.com']
   steem = Steem(nodes=self.nodes)
properties (22)
authorjuliank
permlinkre-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t093549155z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://api.steemit.com","https://rpc.buildteam.io","https://rpc.steemviz.com"],"app":"steemit/0.1"}
created2018-07-07 09:35:48
last_update2018-07-07 09:35:48
depth2
children2
last_payout2018-07-14 09:35: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_length229
author_reputation117,823,071,447,502
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,760,036
net_rshares0
@zipsardinia ·
>>> nodes=['https://api.steemit.com']
>>> from steem import Steem
>>> steem = Steem(nodes=self.nodes)
Traceback (most recent call last):
  File "<"stdin">", line 1, in "<"module">"
NameError: name 'self' is not defined
properties (22)
authorzipsardinia
permlinkre-juliank-re-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t100252431z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://api.steemit.com"],"app":"steemit/0.1"}
created2018-07-07 10:02:54
last_update2018-07-07 10:02:54
depth3
children1
last_payout2018-07-14 10:02: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_length218
author_reputation5,608,798,363,039
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id63,762,337
net_rshares0
@zipsardinia ·
not work too: 
> steempy set nodes ''
properties (22)
authorzipsardinia
permlinkre-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t090845936z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-07-07 09:08:45
last_update2018-07-07 09:08:45
depth2
children0
last_payout2018-07-14 09:08:45
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_length37
author_reputation5,608,798,363,039
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id63,757,797
net_rshares0
@zonguin ·
$3.35
This is a very good tutorial.I'm not lost and it's very well explained.Every command has explanation which is a good point.
My Suggestions :
- Maybe you can add your tutorial is made for linux/bash ? (apt-get)
- Maybe add a command to find server IP ?
- Maybe you can make the curriculum shorter (I don't know how, but it's very long ^^)

I saw you're a regular utopian author. It's very good and i want to see the next part !
Your tutorials are originals, and usefuls. This give more details than another tutorials.
You give somme screenshot and I think images are evry important in a post. So if you can add more images, do it !
πŸ‘  , ,
properties (23)
authorzonguin
permlinkre-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t122820282z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-07-05 14:28:21
last_update2018-07-05 14:28:21
depth1
children2
last_payout2018-07-12 14:28:21
cashout_time1969-12-31 23:59:59
total_payout_value2.891 HBD
curator_payout_value0.458 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length630
author_reputation12,831,796,837,639
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,532,761
net_rshares1,630,211,906,270
author_curate_reward""
vote details (3)
@juliank · (edited)
Than you for your tips, I will work on implementing them.
properties (22)
authorjuliank
permlinkre-zonguin-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t174645972z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-07-05 17:46:45
last_update2018-07-05 17:46:57
depth2
children0
last_payout2018-07-12 17:46:45
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_length57
author_reputation117,823,071,447,502
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,555,524
net_rshares0
@utopian-io ·
Hey @zonguin
Here's a tip for your valuable feedback! @Utopian-io loves and incentivises informative comments.

**Contributing on Utopian**
Learn how to contribute on <a href="https://join.utopian.io">our website</a>.

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlink20180705t144427907z
categoryutopian-io
json_metadata{"tags":["utopian.tip"],"app":"utopian-io"}
created2018-07-05 14:44:27
last_update2018-07-05 14:44:27
depth2
children0
last_payout2018-07-12 14:44: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_length407
author_reputation152,955,367,999,756
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,534,660
net_rshares0