An open API service indexing awesome lists of open source software.

https://github.com/andrewindeche/news-app

The project in the repository (News APP) enables users to view breaking news headlines from various News sources conveniently. built using Python Flask,News API
https://github.com/andrewindeche/news-app

flask herokuapp python3

Last synced: 2 months ago
JSON representation

The project in the repository (News APP) enables users to view breaking news headlines from various News sources conveniently. built using Python Flask,News API

Awesome Lists containing this project

README

          


News-API


Project description



The project is a News-APP created using Python Flask and a News API that displays News and enables users to preview news form various sources





Languages and Platforms Used



  • 1.Python CLI/Flask to create structure of the News-APP

  • 2.Python/flask extensions such as-Python_script,NewsAPI

  • 3.Bookstrap 5 for styling the index page

  • HTML 5

  • Heroku for deployment



  • Authors


    Andrew Indeche


    Contact indecheandrew@gmail.com




    Project Set-up Instructions


    SetUp / Installation Requirements
    Prerequisites
  • python3.9.5

  • pip

  • virtual environment


  • See requirements.txt for all package installations required

    Cloning Into your terminal:

    $ git clone https://github.com/AndrewIndeche/News-App
    $ cd NewsPI
    Running the Application
    Creating the virtual environment

    $ python3 -m venv --without-pip virtual
    $ source virtual/bin/env
    $ curl https://bootstrap.pypa.io/get-pip.py | python
    Installing Flask and other Modules

    $ python3 -m pip install Flask
    $ python3 -m pip install Flask-Bootstrap
    $ python3 -m pip install Flask-Script
    Setting up the API Key

    To be able to gather article info from the News API you will need an API Key.

    * Visit https://newsapi.org/ and register for an API key.
    * In the root directory of the project folder create a file: start.sh
    * Insert the following info into it:

    export NEWS_API_KEY=''
    python3 manage.py server

    * Insert the API Key you received from News Api where is.
    To run the application, in your terminal:

    $ chmod +x start.sh
    $ ./start.sh
    Testing the Application
    To run the tests for the class files:

    $ python3.9 manage.py tests

    Bugs


  • Flask_script refusing to open error. solution:Activate the virtual environment of flask and install all necessary packages (see requirements.txt)

  • sources path in views.py and request.py ommited due to some conflicts.

  • Jinja has mixed up {{text}} reference templates




  • Copyright (c) 2021 Andrew Indeche
    By using and/or copying this project, or the license document from which this statement is linked, you (the licensee) agree that you have read, understood, and will comply with conditions of use.App is free to use.Enjoy...