Skip to main content

Internal pylunch cli tool to get lunch info

Project description


PyLunch was designed to scrape restaurants for it's daily menus and show them in multiple ways and formats.

Getting stated

PyLunch is a scraper, to use it, you have to install it. It is available at PyLunch

Install the released version

You can install ktdk using the pip:

$ pip install pylunch

Install the development version from github

  • Python 3.6 or later
  • (Optional) pipenv

Or you can add it as a development dependency using the pipenv

$ git clone
$ cd pylunch
$ pipenv install # install the dependencies

First Run

In order to run the tool correctly you need to configure it.

At first run the tool will create config folder in the home directory with restaurants database, by default it will be empty.

To use the zomato resolver you need to add the zomato_key to your configuration. In order to get the zomato key you need to go to the Zomato Api documentation

$ pylunch cfg-set zomato_key "<YOUR_KEY>"

To use the telegram integration, you need to set the telegram bot token property telegram_token. To get the telegram bot token please take a look here.

$ pylunch cfg-set telegram_token "<YOUR_KEY>"

Also if you have already created or exported database of the restaurants, you an import it using the command import: Example file is located in: resources/restaurants.yml available here.

$ pylunch import restaurants.yml

In order to export the restaurants database file, you can use the export command.

$ pylunch export -f exported.yml

Run the cli tool

Ktdk also provides a simple cli tool, to run your tests

# Show the help
$ pylunch --help

Usage: pylunch [OPTIONS] COMMAND [ARGS]...

  PyLunch CLI tool

  --version              Show the version and exit.
  -L, --log-level TEXT   Set log level (d|i|w|e) - default=w
  -C, --no-cache         Disable cache
  -c, --config-dir TEXT  Location to the configuration directory
  -F, --format TEXT      Set output format
  --help                 Show this message and exit.

  add            Adds a new restaurant
  cache-clear    Clear a current cache for a day
  cache-content  Show the current cache for a day
  cfg-edit       Edit a configuration using the editor (Ex: VIM)
  cfg-set        Set a config value in the user configuration
  config         Shows the current configuration
  console        Start the interactive console (IPython)
  disable        Disables the restaurants
  edit           Edits restaurants DB file
  enable         Enables the restaurants
  export         Export restaurants
  import         Import restaurants
  info           Get info for the restaurant
  ls             List all available restaurants
  menu           Get menu for a restaurant
  rm             Removes the restaurant
  telegram-bot   Start the telegram bot

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

pylunch-0.1.0.tar.gz (16.6 kB view hashes)

Uploaded source

Built Distribution

pylunch-0.1.0-py3-none-any.whl (18.2 kB view hashes)

Uploaded py3

Supported by

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