Skip to main content

Lunchbot-Python

A Python package for interracting with the @Nero2k Lunchbot API, an API that provides the weekly lunch menu of the Eatery Kista Nod restaurant.

The package fully parses menu attributes into Python objects and is very easy to use.

Installation

Installation is done via:

pip install lunchbot-python

Quickstart

For a more detailed guide with more code examples, please refer to the the official documentation.

There is also an image quickstart example and a compact example of the code below, but that is also available in the official documentation linked above.

"""Websocket/API example
This example shows you the "standard" way of getting the week
menu, which will return a parsed list of Day objects. The Day class is implemented with this API
NOTE: Want to do this with less code?
Check the compact example."""
from eatery_nod import EateryNod #Import the library
menu = EateryNod.Menu() #Create a menu object
menu.initialize() #Initialize (this is only required when using WebSockets)
print("Retrieving menu...") #Print out the status
week_menu = menu.get_menu() #Get the menu
for day in week_menu: #Loop through all the days in the menu
    menu_items_str = "\n".join(day.menu_items) #Format the menu items to a pretty string as they are returned as a list
    print(day.day_name_sv) #Print out the day name (in Swedish)
    print(menu_items_str) #Print out the menu items
    print("Day information:") #Print out a nice divider
    print("Date: " + str(day.day_date)) #Print out the day date
    print("Dessert served?: " + str(day.dessert_served)) #Print out if dessert is served (this will print either True or False)
    print("Pancakes served?: " + str(day.pancakes_served)) #Print out if pancakes are served (this will print either True or False)
    print("Hamburgers served?: " + str(day.burgers_served)) #Print out if hamburgers are served (this will print either True or False)
    print("---------------------------------------------------") #Print out a divider line
last_retrieved = menu.last_retrieved["json"] #Get when the menu was last retrieved
print("Menu retrieved: " + str(last_retrieved)) #Print out when the menu was last retrieved.

Changelog

See the "Releases" tab and the documentation.

More documentation

All functions, variables, and attributes of the code are documented. You can find it on the official library documentation, which is provided by GitBook and hosted on https://lunchbot-python.albins.website.

(no code has been uploaded yet, it's just the initial repository that has been created)

Release files for lunchbot-python 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lunchbot-python 0.1.1
File Size Uploaded
lunchbot-python-0.1.1.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lunchbot-python 0.1.1
File Interpreter ABI Platform
lunchbot_python-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / lunchbot-python-0.1.1.tar.gz

Download URL lunchbot-python-0.1.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ab9c6c6f5e4188b0ed6d455af494eaee357d97f589bf1f918242cb14ffca1f88
BLAKE2b-256 checksum
How to use checksums
f7b3aa17964fbd2607c435361cf25efbb4a64bced006c0859128b6d12d00e506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.2

Release files / lunchbot_python-0.1.1-py3-none-any.whl

Download URL lunchbot_python-0.1.1-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6b9381e5322d575dff4ab7fc12503e3f377b6d407b29e9df4855195a838d953
BLAKE2b-256 checksum
How to use checksums
4d46665fa2fa9059c1ef33bec534bd932e78011e87df256e2fd6702d7838ef3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page