Skip to main content

A newsapi.org command line program in Python.

Project description

PyPI version

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

Authors

License

This project is licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

newsapi-cli-1.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

newsapi_cli-1.2.0-py2.py3-none-any.whl (8.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file newsapi-cli-1.2.0.tar.gz.

File metadata

  • Download URL: newsapi-cli-1.2.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/33.1.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.3

File hashes

Hashes for newsapi-cli-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2e1a871878c528f02c5bcc99ee15cd4c9e378f57ee27a279827229fec0b365de
MD5 0f26f62d4f20329737dbc9375ef295cc
BLAKE2b-256 b69b9305258dd25df48dc3d00c59da0fd9d1eb5d9c54d8d98eac170356ebee3b

See more details on using hashes here.

File details

Details for the file newsapi_cli-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: newsapi_cli-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/33.1.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.3

File hashes

Hashes for newsapi_cli-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2e01b755550ea297182311032cf3a10f03c48a496c4b142f436be283ff5b411
MD5 1e252f3a4cca9d9fe979acd926d50006
BLAKE2b-256 41a3872ef2a79c6ba352d7fd66be4fe1a871ed68fe5dc445ce8b85ba3568fb46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page