Update On My Experimental App - Hive Librarian

avatar

HIVE Librarian.png

Here is the new link to the App:

https://hivelibrarian.herokuapp.com

Here is the new Github link for the Code:

https://github.com/librarian-hive/librarian

Updates:

  • Removed the private credentials for HiveSQL from the code, so they are kept private and secure.
  • Cleaned up the code, so it is easy to read and reuse.
  • Created new repository for the project in Github.
  • Created the new App in Heroku using the new repository.
  • Renamed the App to Hive Librarian with the purpose of adding more features.

What happened?

When I first deployed the app, I made it so that users can enter their own HiveSQL credentials. Later, I realized with a suggestion by Arcange that it was not an ideal way and it was better for me to use my own credentials. I adjusted the code to that.

What I did was placed the credentials on a separate .py file and imported the variables from that file to the main file. After deploying it to Heroku using the Github repository, I deleted the file with the credentials in the Github. I thought I was being smart. lol.

A friend who tried the app and looked in the Github showed me the credentials very quick. I didn't know that even after the file is deleted Github repo still shows it in the history. That's why I had to changed the repository to private.

Thank you everybody who gave suggestions on how to fix it. It was a great learning experience. While I don't fully understand how to keep sensitive data secure in all situations, I think and hope I was able to do it here.

What's next?

I am planning to continue learning more python, sql, and continue experimenting with HiveSQL, Streamlit and other librarians. Streamlit really makes creating apps very easy. All in python. I hope to add more features to the app. If you have suggestions please let me know. I would like to be able to add getting full historic conversations, searching Hive posts, build statistics, and other fun stuff.

Another project I would like to work on using Streamlit has to do with Stocks, Crypto and Market news. I already run some python scripts to filter out stocks. It will be interesting to put them into an app and having the accessible from anywhere and anytime.

Streamlit

Streamlit is really good. They offer deploying apps on their platform too. It is on beta stage and they do it with a waiting list and invites which they send out in about a week. I received my invite today. I highly recommend it to anybody who is just learning and experimenting with python.

Posted Using LeoFinance Beta



0
0
0.000
6 comments
avatar

Ah age old problem of committing secrets to github :) Done it plenty myself. Gotta learn the hard way. At least you didn't lose any funds.

0
0
0.000
avatar

Yes, I wouldn’t want to lose funds. I am still learning.

0
0
0.000
avatar

How cool this App! I suppose I need to connect with you more. Apparently, I only send you a chat 13 times (not counting this one), and you send me a message 9 times. Though I've seen your votes on my posts (much) more often than that. Thanks btw :)

Not too long ago, I got myself a HIVESQL account as well. Not into Python and all, but trying to make some queries using Excel and its SQL feature. Last weeks I put all of this aside, but when I find the time again, I wonder if I can reach out to you to understand a bit better what parameters we have in SQL database. For one, I like to get stats on how many of my comments get a response. How many users write a response and more of these type of charts.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Yes, feel free to ask. You could do something like this:

SELECT COUNT(author), COUNT(DISTINCT author)
FROM Comments
WHERE parent_author = 'edje'
AND author != 'edje'

The result will be, you received 9739 of total responses from 2450 unique users. (if above query is correct).
However, this query gets responses to all of your posts and comments.

0
0
0.000
avatar

I immediately tried, but seem to have problems with connecting to the HIVESQL. Recently I upgrade my Excel to the latest version. Since then I seem to have problems. Though the result I get seems to be more on the HIVESQL side. Though your service works... Puzzled! Guess I need to reach out to the owner of HIVESQL.

Yeah, I'll like to get the these figures for a specific timeframe, between date x and date y. But, first I'll need to fix the HIVESQL connection so I can run queries again :)

Thanks for your help! Much appreciated!

0
0
0.000
avatar

Congratulations @geekgirl! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 18000 HP as payout for your posts and comments. Your next payout tagret is 19000 HP. The unit is Hive Power equivalent because your rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Feedback from the February 1st Hive Power Up Day
0
0
0.000