A Flask powered news aggregation web app.
You can view and use the app here
-
Make sure you have
python3.6
installed. I suggest you use a virtual environment. -
Clone the repository.
$ git clone https://github.com/alchermd/headlines.git
$ cd headlines
-
Set the configuration file.
- Create an
instance
foldermkdir instance
- Create a config file
touch instance/appconfig.py
- You need to provide the
appconfig.py
file with the following variables:
# API key from https://newsapi.org NEWS_API_KEY = "yourapikey" # API key from https://openweathermap.org/api WEATHER_API_KEY = "yourapikey" # API key from https://openexchangerates.org/ RATES_API_KEY = "yourapikey" # Gmail address used to recieve emails from the /code endpoint. MY_EMAIL = "youremail@gmail.com" # Your Gmail password MY_EMAIL_PASSWORD = "hunter2" # Secret key used by the Flask app. SECRET_KEY = "really hard to guess string"
- Create an
-
Install the app as a package.
-
Install dependencies
pip install -r requirements.txt
-
Install the app
pip install -e .
-
Set the Flask environment variables.
$ export FLASK_APP=headlines $ export FLASK_DEBUG=1
-
Run the app with
flask run
. -
Visit
localhost:5000/
and enjoy!
-
I'm happy to hear your thoughts! I'd appreciate you openin an issue or a creating a pull request 😃
See LICENSE for more information.