Summarized news content for you to consume.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aashutosh c36d6168cb
Add test config, update unittest
2 months ago
api Add CORS to news route 2 months ago
tests Add test config, update unittest 2 months ago
.gitignore Initial commit 4 months ago
LICENSE Initial commit 4 months ago
README.md Update README.md 4 months ago
config.py Add test config, update unittest 2 months ago
minimalnews.py Add news spider 4 months ago
news_spider.py Update news summarizer 2 months ago
requirements.txt Update requirements.txt 2 months ago
summarizer.py Update news summarizer 2 months ago

README.md

MinimalNewsAPI

Summarized news content for you to consume.

Supported languages

  • Nepali
    Categories: politics, samaj, oped, artha-corporate, sports, entertainment
  • English
    Categories: nepal, world, opinion, business, sports

Installation

Dependencies

  • PostgreSQL
  • Python >= 3.6

Installing python dependencies: python3 -m pip install -r requirements.txt

Running

Set the FLASK_APP environment variable to specify how to load the application.

export FLASK_APP=minimalnews.py

Setting up the database

flask shell
>>> db.create_all()

Running unit tests: flask test
Running the news spider: flask scrape
Running the API: flask run

Querying

Provide the language and the requried categories as query string. Example:

http://127.0.0.1:5000/api/news?category=nepal+world+opinion+business+sports&lang=en
http://127.0.0.1:5000/api/news?category=politics+artha-corporate&lang=np