Dining API Wrapper

This documentation explains the methods of the Dining object. For the specific fields on the objects returned by these methods, see the official documentation.

class penn.dining.Dining(bearer, token)[source]

The client for the Registrar. Used to make requests to the API.

Parameters:
  • bearer – The user code for the API
  • token – The password code for the API

Usage:

>>> from penn import Dining
>>> din = Dining('MY_USERNAME_TOKEN', 'MY_PASSWORD_TOKEN')
menu_daily(building_id)[source]

Get a menu object corresponding to the daily menu for the venue with building_id.

Parameters:building_id – A string representing the id of a building, e.g. “abc”.
>>> commons_today = din.menu_daily("593")
menu_weekly(building_id)[source]

Get an array of menu objects corresponding to the weekly menu for the venue with building_id.

Parameters:building_id – A string representing the id of a building, e.g. “abc”.
>>> commons_week = din.menu_weekly("593")
venues()[source]

Get a list of all venue objects.

>>> venues = din.venues()