This Web-app provides an interface for users to subscribe for notifications via Mail about stock price changes. Specifically, they can subscribe for notifications when the stock prices go above or below the specified price.
This App is developed using Python and Flask. The UI is purposefuly made simple and the focus is more on the python processing at backend code and not on the front end HTML/CSS pages.
This App is currently running on https://stock-notify-app.herokuapp.com/
Flask, HTML/CSS.
Files are used instead of SQL DBs for simplicity
Download all files to local directory.
Get the App-key from Alpha Vantage website (Key is provided for FREE. Need to register in website and get the key).
Replace the key in https://github.com/aravindprasad90/Stock-app-flask-sql/blob/master/stock_library.py file, line number - 90.
Also Replace the Email-id and Passwords in https://github.com/aravindprasad90/Stock-app-flask-sql/blob/master/stock_library.py, line numbers - 144 and 153. This is used for sending mail notifications to the Mail-ID provided by user.
Start the project - "python stock.py".
Since pythonanywhere website doesnot allow threading, separate files are developed for front-end UI manipulation(stock_pythonanywhere.py) and background NSE stock value checks(mail_script_pythonanywhere.py).
I) Always use virtualenv/virtualenv wrapper packages for the Flask projects. This is basically to create an isolated environment for the project and the packages downloaded will not affect rest of the libraries in system.
pip install virtualenv.
pip install virtualenvwrapper.
In Bash file ==> "export WORKON_HOME=~/.virtualenvs; source /usr/local/bin/virtualenvwrapper.sh".
Create a directory for project and goto directory.
Create the virtual env ==> "mkvirtualenv -a $(pwd) name-of-env" (This will help to map the virtual enviromnment to the path location).
To start wroking on virtual env ==> workon name-of-env.
For deleting the virtualenv, "rmvirtualenv name-of-env".
For viewing the list of packages in virtual env, "pip list".