<center></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:  #### 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.
author | steempytutorials |
---|---|
permlink | part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database |
category | utopian-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"} |
created | 2018-07-05 02:14:57 |
last_update | 2018-07-05 17:48:12 |
depth | 0 |
children | 11 |
last_payout | 2018-07-12 02:14:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 60.224 HBD |
curator_payout_value | 19.197 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 12,332 |
author_reputation | 31,094,047,689,691 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,461,467 |
net_rshares | 37,537,351,223,963 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
remlaps1 | 0 | 9,231,326,725 | 17% | ||
yuxi | 0 | 2,955,738,109 | 10% | ||
seer | 0 | 787,282,446,476 | 100% | ||
achiron | 0 | 25,253,753,543 | 100% | ||
panql1979 | 0 | 4,932,665,565 | 100% | ||
themadgoat | 0 | 13,493,229,508 | 100% | ||
lisa.palmer | 0 | 1,093,107,657 | 17% | ||
assasin | 0 | 20,114,773,939 | 100% | ||
pcourtnier | 0 | 251,654,544 | 100% | ||
juliank | 0 | 86,631,706,563 | 30% | ||
muftykutink | 0 | 4,334,351,885 | 100% | ||
greeksteemjesus | 0 | 10,444,393,218 | 100% | ||
freetissues | 0 | 14,897,998,862 | 50% | ||
brothermic | 0 | 19,641,146,073 | 100% | ||
alphacore | 0 | 23,745,090,083 | 100% | ||
novale | 0 | 3,363,567,700 | 100% | ||
mohsan0073 | 0 | 7,788,501,845 | 100% | ||
kult300 | 0 | 12,556,617,900 | 100% | ||
smy | 0 | 509,730,837,451 | 63% | ||
sakhone | 0 | 43,068,641,164 | 100% | ||
alexzicky | 0 | 13,660,087,112 | 30% | ||
adoelesteem | 0 | 8,274,536,423 | 100% | ||
jahangirbalti | 0 | 12,211,681,331 | 100% | ||
andreistalker | 0 | 7,905,825,366 | 100% | ||
flodner | 0 | 4,991,777,810 | 100% | ||
davidconstantine | 0 | 57,256,445,876 | 100% | ||
infinitelearning | 0 | 4,031,962,929 | 100% | ||
saadmehmood | 0 | 10,558,446,393 | 100% | ||
davidstrohmer | 0 | 8,392,842,865 | 100% | ||
scorer | 0 | 40,755,001,838 | 100% | ||
espoem | 0 | 40,525,504,976 | 40% | ||
makerhacks | 0 | 36,204,915,824 | 20% | ||
pataty69 | 0 | 12,254,997,117 | 40% | ||
chasad75 | 0 | 8,368,585,280 | 100% | ||
utopian-io | 0 | 35,156,882,635,784 | 22.85% | ||
asihelp | 0 | 14,776,673,930 | 100% | ||
cryptovisitor | 0 | 8,081,015,511 | 100% | ||
gazbaz4000 | 0 | 8,779,109,750 | 100% | ||
fplacido | 0 | 6,058,996,847 | 40% | ||
shanishah | 0 | 12,000,026,440 | 100% | ||
steemnews-fr | 0 | 3,365,918,004 | 100% | ||
digi5952 | 0 | 10,268,974,233 | 100% | ||
artbyclark | 0 | 6,233,491,079 | 100% | ||
zipsardinia | 0 | 11,335,602,978 | 100% | ||
venalbe | 0 | 9,336,111,816 | 100% | ||
ademkrgl | 0 | 8,289,087,172 | 100% | ||
zharadum | 0 | 10,942,367,148 | 100% | ||
ellyn-suraya | 0 | 12,696,949,557 | 100% | ||
amosbastian | 0 | 51,983,566,652 | 100% | ||
r351574nc3 | 0 | 997,734,404 | 3% | ||
tdre | 0 | 3,321,776,926 | 100% | ||
fisherck | 0 | 5,065,884,660 | 100% | ||
moonrise | 0 | 25,531,902,645 | 100% | ||
e-babil | 0 | 12,978,066,583 | 100% | ||
rehanji50 | 0 | 11,699,558,939 | 100% | ||
steempytutorials | 0 | 5,042,192,141 | 100% | ||
rahulsingh25843 | 0 | 10,007,836,106 | 100% | ||
mdnazmulhasan | 0 | 25,586,855,262 | 100% | ||
joaorafael | 0 | 1,131,083,117 | 40% | ||
xerox-bru | 0 | 14,470,663,184 | 100% | ||
micaelacf | 0 | 214,329,206 | 40% | ||
knackart | 0 | 22,975,339,260 | 100% | ||
hevictor | 0 | 4,183,368,531 | 100% | ||
properfraction | 0 | 556,809,712 | 100% | ||
fidget09 | 0 | 305,235,826 | 50% | ||
aqib-ashiq | 0 | 11,234,505,306 | 100% | ||
inespereira | 0 | 232,188,470 | 40% | ||
zekesito | 0 | 11,644,892,490 | 100% | ||
team1 | 0 | 306,057,347 | 50% | ||
pg-live-pt | 0 | 1,330,550,204 | 40% | ||
megalithic | 0 | 3,157,438,852 | 100% | ||
lizette | 0 | 15,061,093,691 | 100% | ||
sheikhsayem | 0 | 596,723,107 | 100% | ||
amrishraj | 0 | 13,118,982,461 | 100% | ||
bigbot | 0 | 12,427,043,370 | 100% | ||
nashvegas | 0 | 10,570,163,466 | 100% | ||
luegenbaron | 0 | 21,140,656,158 | 100% | ||
empress-katy | 0 | 4,664,107,251 | 100% | ||
ingapete | 0 | 17,673,007,881 | 100% | ||
electronicsworld | 0 | 5,689,619,157 | 100% | ||
jameswu | 0 | 9,938,503,789 | 100% | ||
duarte9sousa | 0 | 51,936,553,280 | 33% | ||
munhenhos | 0 | 2,492,268,171 | 40% | ||
avengersayem | 0 | 599,895,052 | 100% | ||
isabelpereira | 0 | 430,890,936 | 13.2% | ||
avengersayem2 | 0 | 597,089,155 | 100% | ||
onepice | 0 | 609,065,127 | 100% | ||
lucky20 | 0 | 596,605,889 | 100% |
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/)
author | portugalcoin |
---|---|
permlink | re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t133436280z |
category | utopian-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"} |
created | 2018-07-05 13:34:36 |
last_update | 2018-07-05 13:34:36 |
depth | 1 |
children | 1 |
last_payout | 2018-07-12 13:34:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.055 HBD |
curator_payout_value | 0.016 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 636 |
author_reputation | 599,441,732,281,848 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,526,408 |
net_rshares | 34,946,823,859 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
juliank | 0 | 29,904,631,718 | 11% | ||
steempytutorials | 0 | 5,042,192,141 | 100% |
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.
author | steempytutorials |
---|---|
permlink | re-portugalcoin-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t175153902z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-07-05 17:51:54 |
last_update | 2018-07-05 17:51:54 |
depth | 2 |
children | 0 |
last_payout | 2018-07-12 17:51:54 |
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 | 153 |
author_reputation | 31,094,047,689,691 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,556,034 |
net_rshares | 0 |
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>
author | utopian-io |
---|---|
permlink | re-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t083712z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.42"}" |
created | 2018-07-07 08:37:12 |
last_update | 2018-07-07 08:37:12 |
depth | 1 |
children | 0 |
last_payout | 2018-07-14 08:37:12 |
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 | 308 |
author_reputation | 152,955,367,999,756 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,755,220 |
net_rshares | 0 |
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
author | zipsardinia |
---|---|
permlink | re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t084438558z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://rpc.steemviz.com"],"app":"steemit/0.1"} |
created | 2018-07-07 08:44:39 |
last_update | 2018-07-07 08:47:09 |
depth | 1 |
children | 4 |
last_payout | 2018-07-14 08:44:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.334 HBD |
curator_payout_value | 0.099 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,018 |
author_reputation | 5,608,798,363,039 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 63,755,810 |
net_rshares | 217,218,127,523 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
loreennaa | 0 | 24,571,581,690 | 61% | ||
nolnocluap | 0 | 22,419,710,086 | 32% | ||
sanjeevm | 0 | 15,357,584,677 | 18% | ||
steembusiness | 0 | 19,058,297,042 | 35% | ||
raised2b | 0 | 29,241,891,516 | 14% | ||
raviraj | 0 | 20,808,623,790 | 99% | ||
annadoll | 0 | 7,573,438,540 | 65% | ||
kdee916 | 0 | 11,837,643,245 | 100% | ||
thenativeguy | 0 | 5,905,174,415 | 100% | ||
kennybll | 0 | 6,890,083,421 | 65% | ||
laraventure | 0 | 7,526,756,527 | 30% | ||
jigstrike | 0 | 7,573,785,007 | 38% | ||
berbo | 0 | 6,899,311,188 | 100% | ||
rampagejr | 0 | 9,400,174,857 | 95% | ||
bestboom | 0 | 8,180,960,505 | 39% | ||
futile | 0 | 13,973,111,017 | 15% |
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)
author | juliank |
---|---|
permlink | re-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t093549155z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://api.steemit.com","https://rpc.buildteam.io","https://rpc.steemviz.com"],"app":"steemit/0.1"} |
created | 2018-07-07 09:35:48 |
last_update | 2018-07-07 09:35:48 |
depth | 2 |
children | 2 |
last_payout | 2018-07-14 09:35:48 |
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 | 229 |
author_reputation | 117,823,071,447,502 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,760,036 |
net_rshares | 0 |
>>> 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
author | zipsardinia |
---|---|
permlink | re-juliank-re-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t100252431z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://api.steemit.com"],"app":"steemit/0.1"} |
created | 2018-07-07 10:02:54 |
last_update | 2018-07-07 10:02:54 |
depth | 3 |
children | 1 |
last_payout | 2018-07-14 10:02:54 |
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 | 218 |
author_reputation | 5,608,798,363,039 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 63,762,337 |
net_rshares | 0 |
not work too: > steempy set nodes ''
author | zipsardinia |
---|---|
permlink | re-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t090845936z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-07-07 09:08:45 |
last_update | 2018-07-07 09:08:45 |
depth | 2 |
children | 0 |
last_payout | 2018-07-14 09:08:45 |
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 | 37 |
author_reputation | 5,608,798,363,039 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 63,757,797 |
net_rshares | 0 |
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 !
author | zonguin |
---|---|
permlink | re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t122820282z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-07-05 14:28:21 |
last_update | 2018-07-05 14:28:21 |
depth | 1 |
children | 2 |
last_payout | 2018-07-12 14:28:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 2.891 HBD |
curator_payout_value | 0.458 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 630 |
author_reputation | 12,831,796,837,639 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,532,761 |
net_rshares | 1,630,211,906,270 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
juliank | 0 | 95,694,821,498 | 35% | ||
mcfarhat | 0 | 6,341,126,042 | 10% | ||
utopian-io | 0 | 1,528,175,958,730 | 1% |
Than you for your tips, I will work on implementing them.
author | juliank |
---|---|
permlink | re-zonguin-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180705t174645972z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-07-05 17:46:45 |
last_update | 2018-07-05 17:46:57 |
depth | 2 |
children | 0 |
last_payout | 2018-07-12 17:46:45 |
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 | 57 |
author_reputation | 117,823,071,447,502 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,555,524 |
net_rshares | 0 |
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>
author | utopian-io |
---|---|
permlink | 20180705t144427907z |
category | utopian-io |
json_metadata | {"tags":["utopian.tip"],"app":"utopian-io"} |
created | 2018-07-05 14:44:27 |
last_update | 2018-07-05 14:44:27 |
depth | 2 |
children | 0 |
last_payout | 2018-07-12 14:44:27 |
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 | 407 |
author_reputation | 152,955,367,999,756 |
root_title | "Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,534,660 |
net_rshares | 0 |