This is a flask application that will help people list and preview news articles from various sources. Using the News Api
- Your project should contain two models, one for the news source and one for the news article.
- Your project must use views and routes.
- Your project should consume the News API.
- Your project must contain request(s) to the News API.
- Your project should follow the proper folder structure.
- Your application should be deployed to Heroku.
- The project should have a specs markdown file that displays the project's specifications. ✔️
- The model classes should have unittests to check for behaviour. The tests should pass. ✔️
- The project needs to be deployed to Heroku. ✔️
- The project should have clear commit messages. ✔️
- The project should be polished in a portfolio-quality state. ✔️
This app utilizes the News API to retrieve news sources and articles. Inorder to properly run this app:
- Go to News API and create an account or login.
- Get your Api key
- Python and pip (I am currently using 3.9.6) Any version above 3.5 should work.
- News Api key
- Git installed on your machine
- Code editor/ IDE
-
Clone GitHub repository
git clone https://github.com/KenMwaura1/Python_News_Updates
-
Change into the folder
cd Python_News_Updates
-
Create a virtual environment
python3 -m venv venv
-
Activate the virtual environment
source ./bin/activate
-
If you are using pyenv
3a. Create a virtualenv
pyenv virtualenv python_news_updates
3b. Activate the virtualenv
pyenv activate python_news_updates
-
-
Create a
.env
file and add your credentialstouch .env
OR Copy the included example
cp .env-example .env
-
Add your credentials to the
.env
file -
Install the required dependencies
pip install -r requirements.txt
-
Make the shell script executable
chmod a+x ./start.sh
-
Run the app
./start.sh
OR run with the flask-cli
flask run
- To run the tests:
flask tests
- Python-3.9.6
- Flask web framework
- Bootstrap(Material Bootstrap 4)
- HTML5
- CSS3
MIT License
Copyright (c) 2021 Kennedy Ngugi Mwaura
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.