Laundry Website Scraper

This documentation explains the methods of the Laundry object. This SDK module is implemented by scraping the laundry alert service.

class penn.laundry.Laundry[source]

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

Usage:

>>> from penn import Laundry
>>> l = Laundry()
all_status()[source]

Return names, hall numbers, and the washers/dryers available for all rooms in the system

>>> all_laundry = l.all_status()
Returns:Mapping from hall name to associated link in SUDS. Creates inverted index from id to hall.
hall_status(hall_id)[source]

Return the status of each specific washer/dryer in a particular laundry room.

Parameters:hall_id – Integer corresponding to the id of the hall. This id is returned as part of the all_status call.
>>> english_house = l.hall_status("English%20House")
machine_usage(hall_no)[source]

Returns the average usage of laundry machines every hour for a given hall.

The usages are returned in a dictionary, with the key being the day of the week, and the value being an array listing the usages per hour.

Parameters:hall_no – integer corresponding to the id number for the hall. Thus number is returned as part of the all_status call.
>>> english_house = l.machine_usage(2)
parse_a_hall(hall)[source]

Return names, hall numbers, and the washers/dryers available for a certain hall.

Parameters:hall (int) – The ID of the hall to retrieve data for.