Uni Ulm Mensa Plan REST API
This project contains a REST API that provides data from the Tanikai/uniulm_mensaparser module.
The parsed data can be accessed here: uulm.anter.dev/api/v1/canteens/ul_uni_sued
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on deploying the project on a live system.
This project is tested and deployed with Python 3.9+. It might work with lower versions, but without guarantee.
Firstly, clone this repository and install the required Python modules:
git clone https://github.com/Tanikai/uniulm_mensa_api.git cd uniulm_mensa_api pip install -r requirements.txt
After that, you can run the REST API with:
When you want to deploy the application, you will need a WSGI server. For example, you can use the waitress module:
python -m waitress --port 8080 run_api:application
The following canteens at Ulm University are currently supported:
- Mensa Süd (id: ul_uni_sued)
- Mensa West (id: ul_uni_west)
Support for Mensa Nord (Bistro) is planned.
||Get the next daily plan for the specified canteen (days where the canteen is closed are skipped)|
||Get the canteen plan for a specific day|
||Get all plans for the specified canteen|
||Data in FS-ET format (work in progess)|
To track the API usage in a GDPR-friendly way, a Python integration
for Matomo is integrated into the project. It is only
enabled when a
config.ini file is placed in the root directory (same directory
run_api.py). If you want to connect the API to your Matomo instance, set
the following properties:
[Matomo] enabled = True ; The URL to your Matomo instance url = YOUR_MATOMO_URL ; Your Matomo site_id for the API (e.g. 5) site_id = YOUR_MATOMO_SITE_ID ; Visitor might be behind a proxy. To change the IP address of the ; POST Request, an auth token is required. You can get it in Matomo ; under Settings > Personal > Security > Auth tokens. token_auth = YOUR_API_TOKEN
- flask for the REST API
- Fork of flask-matomo for tracking
- Fork repository: github.com/Tanikai/flask-matomo
This project is licensed under the GNU General Public License Version 3 - see the LICENSE.md file for details