Welcome to this news application. Using the options provided one can access news from various sources or even search news using domain name or the source platform.This application uses New API to fetch and generate News for you from various news sources.
Email:kenthumi@gmail.com
Below are steps to follow:
-
Open cli, navigate to your project folder and clone the project:
git clone https://github.com/KenThumi/NewsAPI.git
-
Install python, preferably python3.
-
Create a virtual environment:
python3 -m venv virtual
-
To activate the virtual environment run:
source virtual/bin/activate
-
Now, in the virtual environment, install Flask to the project using the following command:
pip install flask
-
Install flak bootstrap and flask script respectively:
pip install flask-bootstrap
pip install flask_script
-
Head over to New API and generate API key. To generate SECRET KEY , open REPL by typing command
python3
. Enter these commands:
import secrets
secrets.token_hex(16)
Where 16 is key length. Copy the keys to somewhere. -
To register the API KEY and SECRET KEY to OS for use, enter these command. Enter the respective key where necessary
export MOVIE_API_KEY='api key generated'
export SECRET_KEY='secret key generated'
-
Inside the same folder, type following commands to start the application:
python3 manage.py server
-
Open browser and input
http://127.0.0.1:5000
-
To edit, use IDE of your choice to work with the project, e.g VsCode, Sublime text ,etc.
In this project, below is a list of technologies used:
Use command pip freeze
to check if all these dependecies are present.
- click==7.1.2
- dominate==2.6.0
- Flask==1.1.2
- Flask-Bootstrap==3.3.7.1
- Flask-Script==2.0.6
- itsdangerous==1.1.0
- Jinja2==2.11.3
- MarkupSafe==1.1.1
- visitor==0.1.3
- Werkzeug==1.0.1
- MIT license
- Copyright 2021 © News API Application