Quickstart

Follow this guide to get up and running in no time.

This guide assumes that you already have Python 3 and pip3 installed. If not, you can download it from the Python website.

Installation

First, install the library by using

pip3 install lunchbot-api 

In case the above doesn't work, try using simply "pip", but make sure that pip will install the library to a Python 3 interpreter. Python 2 is not supported.

Right now, you also have to install the following things via pip (apart from the lunchbot-api package):

  • requests

  • websockets

  • pytz

Importing the library

Import the library like this:

from lunchbot_python import EateryNod

Using the library

The library has two important classes, which are "Menu" and "Day". The Menu class represents the full weekly menu, and it has a list of Day objects, that represents the menu for individual days.

Here is simple code to get and parse the menu:

Here is how you can treat the data (assumes that the rows above are present in your code):

The below code example is designed to be clear. You can write the same stuff with less/more compact code.

And now what...?

Learn more about the libary by reading the complete documentation. For more usage examples, click here. Also, make sure to check all available parameters to get from each Day object here. If you are planning to get images, you might want to read the About image caching page.

Last updated

Was this helpful?