A newsapi.org command line program in Python.
Project description
A command line application for displaying news headlines, written in Python.
Getting Started
Prerequisites
Installing
Newsapi-cli is on PyPI so it can be installed with pip.
$ pip install newsapi-cli
To upgrade use the -U flag.
$ pip install -U newsapi-cli
Alternatively get the source and install locally.
$ pip install -e ./newsapi-cli/
Adding your API key
To begin you will need to add your API key. If you do not have an API key you can get one free from News API.
$ news api YOUR00API00KEY00GOES00HERE
Using newsapi-cli
Usage:
news sources
news <source>
news search <keyword>
news -h | --help
news --version
Display a list of all news sources
$ news sources
Get headlines from a specific source
$ news <source>
Get headlines related to a keyword
$ news search <keyword>
Example
Get news headlines from the bbc-news source.
$ news bbc-news
Get top news headlines for Great Britain.
$ news gb
Get top business news headlines for Great Britain.
$ news gb/business
Get top headlines about apple.
$ news search apple
Built With
License
This project is licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for newsapi_cli-1.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05b2a50360728cf819dd8a24701e44418d627b9896fc7847b54c3436e9c77d87 |
|
MD5 | 3c3eedb47e07098465a2452b98c4d5a1 |
|
BLAKE2b-256 | b172f87982223df44ed9563e5fbe4e8634c2a684bd4ce6683b448728efe0c1c4 |