Uni Ulm Mensa Parser
This project contains a parser for the canteen / Mensa plans at Ulm University that are provided on the Studierendenwerk Ulm website. You can see the data in action on the UUlm Mensaplan website.
For an example of parsed data, see the following REST API endpoint: https://uulm.anter.dev/api/v1/canteens/all
Getting Started
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
This project is tested and deployed with Python 3.9+. The dependencies require Python 3.8+.
Integration into your own project
You can install the module from PyPI:
pip install uniulm-mensaparser
After installing, you can use the parser like this:
from uniulm_mensaparser import get_plan, Canteen, SimpleAdapter2
# use get_plan() to get plans of all supported canteens
plan = get_plan()
print(plan)
# specify which canteen plans you want to be parsed in a set
my_canteens = {Canteen.UL_UNI_Sued}
# pass an adapter class for a different output format
plan = get_plan(my_canteens, adapter_class=SimpleAdapter2)
print(plan)
Development
Installation
If you want to extend the functionality of this library (e.g. implementing a new Adapter or PDF parser), you can clone this repository and install the required Python modules:
git clone https://github.com/Tanikai/uniulm_mensaparser.git
cd uniulm_mensaparser
uv sync
Tooling
This project uses uv for dependency management, ruff for linting and formatting, and ty for type checking.
To format and lint the code, run:
uvx ruff format .
uvx ruff check . --fix
To run the type checks:
uv run ty check
To run the tests:
uv run pytest
MaxManager API endpoint
The following curl command sends a request to the new endpoint. Remember to replace the date with the current date.
curl -X POST 'https://sw-ulm-spl51.maxmanager.xyz/inc/ajax-php_konnektor.inc.php?func=make_spl&locId=1&date=2023-07-20&lang=de&startThisWeek=2023-07-17&startNextWeek=2023-07-24'
Built With
- BeautifulSoup to parse the canteen plan from the Studierendenwerk Ulm website
- aiohttp for asynchronous HTTP requests
Authors
License
This project is licensed under the GNU General Public License Version 3 - see the LICENSE file for details
Metadata
Release files for uniulm-mensaparser 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uniulm_mensaparser-1.0.2.tar.gz | 157.0 kB | Without provenance | Details for uniulm_mensaparser-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uniulm_mensaparser-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for uniulm_mensaparser-1.0.2-py3-none-any.whl |
Total release size: 181.0 kB
Release files / uniulm_mensaparser-1.0.2.tar.gz
| Download URL | uniulm_mensaparser-1.0.2.tar.gz |
|---|---|
| Size | 157.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce3982076ada9f45223ded09418fc423286f3b6e8e7b9e9a5bfa47bee50ce467
|
|
BLAKE2b-256 checksum How to use checksums |
9373eddf5ce4982e96b16472f4abb16908414d12ce576a64975431436e7ffce4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / uniulm_mensaparser-1.0.2-py3-none-any.whl
| Download URL | uniulm_mensaparser-1.0.2-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a885177025e0c719e50cf8e2a38b6ff90b4f54750a0b0b723bade9c097a2fed0
|
|
BLAKE2b-256 checksum How to use checksums |
ce806f807a6d3da606817c6104f9b2db933afbce6729727dac9441938bce37b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for uniulm-mensaparser 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.