Skip to content

Instantly share code, notes, and snippets.

@Sealjay
Created February 10, 2021 01:39
Show Gist options
  • Save Sealjay/a96bc2ddfd16fbbc3173f22f603c0e15 to your computer and use it in GitHub Desktop.
Save Sealjay/a96bc2ddfd16fbbc3173f22f603c0e15 to your computer and use it in GitHub Desktop.
bingnews-cli - click example
import click
@click.group()
def cli():
"""A CLI to search for news articles using Bing News, and return appropriate articles."""
@cli.command("phrase")
@click.option("-p", "--search_phrase", prompt="What phrase are you searching for?")
def search_bing_by_phrase(search_phrase):
"""Search Bing News by word or phrase."""
pass
if __name__ == "__main__":
cli()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment