
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
A python package for accessing mensa menus at ETH and UZH Zürich
pip3 install pyMensa
This package lets you access mensa menus at ETH and UZH Zürich. This package will only let you access menus at lunch time of the current day.
It is very simple to get meals for a mensa:
import pyMensa
meals = pyMensa.get_meals("Polymensa")
for meal in meals:
print(meal)
print()
Example Output:
LOCAL (STUD:10.50 STAFF:11.50 EXTERN:15.50)
Dieses Menu servieren wir Ihnen gerne bald wieder!
STREET (STUD:9.90 STAFF:11.90 EXTERN:15.90)
The New York Burger
Schweizer Rindfleisch
oder Vegi-Grillburger
Sesam Maxi-Bun, Cheddar,
Eisberg, Tomaten, Gurken,
BBQ Relish und Chips
GARDEN (STUD:6.20 STAFF:9.30 EXTERN:12.70)
Vegan Day
Seitan mit Blumenkohl,
Kichererbsen und Harissa-Sauce
etc ...
You can also just query for a Mensa Object:
import pyMensa
unimensa = pyMensa.get_mensa("uni")
print(unimensa.name)
print(unimensa.aliases)
meals = unimensa.get_meals()
for meal in meals:
print(meal)
print()
Example Output:
UZH Zentrum
['zentrum', 'uni', 'uzh zentrum', 'uzhzentrum']
einfach gut (STUD:5.40 STAFF:7.00 EXTERN:10.50)
Rindshackfleisch-Pilzragout
mit hausgemachten Spätzli und Weisskabis
Fleisch:Rind, CH
natürlich vegi (STUD:5.40 STAFF:7.00 EXTERN:10.50)
Gefüllte Aubergine mit Sojagehacktem Tomatensauce und Bratkartoffeln Menüsalat oder Apfelmus
This is a descripition of all objects used by this package.
This object describes a generic meal.
Name | Type | Description |
---|---|---|
label | str | The label/name of that meal |
price_student | str | The price for students |
price_staff | str | The price for staff |
price_extern | str | The price for other guests |
description | str array | A list of descriptions, usually ingredients. |
Name | Return Type | Description |
---|---|---|
str | str | Returns the string representation of the meal |
This object describes a generic mensa.
Name | Type | Description |
---|---|---|
name | str | The name of the mensa |
aliases | str array | A list of alternative names that can be entered when searching |
Name | Return Type | Description |
---|---|---|
get_meals | Meal array | Returns list of available Meals |
has_alias | bool | Checks if the given alias corresponds to that mensa |
This object inherits from the generic Mensa object and implements the get_meals
function for the ETH Gastro API
Name | Type | Description |
---|---|---|
api_name | str | The name of the mensa in the ETH Gastro API |
Name | Return Type | Description |
---|---|---|
get_meals | Meal array | Fetches meals using the ETH Gastro API |
This object inherits from the generic Mensa object and implements the get_meals
function for the UZH Mensa Website which is unfortunately much slower that working with the proper API ETH provides us with, but we have no choice.
Name | Type | Description |
---|---|---|
api_name | str | The name of the mensa on the UZH Mensa Website |
Name | Return Type | Description |
---|---|---|
get_meals | Meal array | Fetches meals from the UZH Mensa Website |
Here is a list of all available Mensas and their corresponding aliases:
Name | Aliases |
---|---|
Mensa Polyterrasse | poly, polymensa, polyterrasse, mensa polyterrasse |
Food&Lab | foodlab, food lab, food&lab |
Causiusbar | clausius, clausiusbar, lausiusbar, lausius |
Polysnack | polysnack, snack |
Trailerburger | foodtrailer, trailer, trailerburger |
Alumni quattro Lounge | alumni, alumnilounge, alumni lounge |
Bellavista | bellavista, bella vista |
Fusion Meal | fusion, fusionmeal, fusion meal |
G-ESSbar | gess, gessbar, g-essbar, essbar |
Tannenbar | tanne, tannenbar, tannen bar |
Dozentenfoyer | dozentenfoyer, dozenten, foyer, dozenten foyer |
Plattenstrasse | platte, plattestross, plattenstrasse, plattestrass |
Rämi 59 | rämi, raemi, rämi59, raemi59, rämi 59, raemi 59, raemistrasse, rämistrasse, rämistross |
UZH Mercato | mercato |
UZH Zentrum | zentrum, uni, uzh zentrum, uzhzentrum |
UZH Lichthof | lichthof, rondell |
UZH Irchel | irchel, irchel mensa, irchelmensa |
UZH Irchel Atrium | irchel atrium, atrium |
UZH Binzmühle | binzmühle, binzmuehle |
UZH Cityport | cityport |
UZH Zahnmedizin | zahnmedizin, zzm |
UZH Tierspital | tierspital |
UZH Botanischer Garten | botanischergarten, botanischer garten, garten, botgarten |
FAQs
A python package for fetching mensa menus at ETH and UNI Zürich
We found that pyMensa demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.