Skip to main content

Fetch food menu information from skolmaten.se

Project description

Skolmaten

The skolmaten python package provides a convenient way to fetch school food menu information for Swedish schools connected to skolmaten.se.

Installation

pip install skolmaten

View Skolmaten at pypi

Usage

If you want food menu information for https://skolmaten.se/atlas-skolan/, use SchoolFood like this.

>>> from Skolmaten import SchoolFood
>>> food = SchoolFood(school="atlas-skolan")

get_weeks(weeks)

get_weeks will output current week including number of weeks provided.

food.get_weeks(2)

get_days(limit, offset)

limit sets the number of total results offset can be adjusted to fetch days back in time

food.get_days(3) # today and 3 days ahead of time
food.get_days(3, 1) # yesterday, today and tomorrow

Example

>>> pip install skolmaten
>>> ...
>>> from Skolmaten import SchoolFood
>>> school_food = SchoolFood(school="vilbergsskolan")
>>> for food in school_food.get_weeks(2): food.verbose_week, food.food, food.datetime
...
('Måndag - Vecka 33', 'Sommarlov', datetime.datetime(2023, 8, 14, 0, 0))
('Tisdag - Vecka 33', 'Sommarlov', datetime.datetime(2023, 8, 15, 0, 0))
('Onsdag - Vecka 33', 'Panerad fisk serveras med kall sås och potatis', datetime.datetime(2023, 8, 16, 0, 0))
('Torsdag - Vecka 33', 'Korvstroganoff serveras med ris', datetime.datetime(2023, 8, 17, 0, 0))
('Fredag - Vecka 33', 'Köttbullar serveras med pasta', datetime.datetime(2023, 8, 18, 0, 0))
('Måndag - Vecka 34', 'Carbonara serveras med pasta', datetime.datetime(2023, 8, 21, 0, 0))
('Tisdag - Vecka 34', 'Fiskgratäng med tacosmak serveras med kokt potatis', datetime.datetime(2023, 8, 22, 0, 0))
('Onsdag - Vecka 34', 'Chili con carne serveras med bulgur', datetime.datetime(2023, 8, 23, 0, 0))
('Torsdag - Vecka 34', 'Broccolisoppa serveras med mjuk smörgås och pålägg', datetime.datetime(2023, 8, 24, 0, 0))
('Fredag - Vecka 34', 'Pastagratäng med mozzarella och spenat', datetime.datetime(2023, 8, 25, 0, 0))

License

This package is not in any way related to the makers of skolmaten.se and is licensed under the WTFPL license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Skolmaten-0.0.4.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Skolmaten-0.0.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file Skolmaten-0.0.4.tar.gz.

File metadata

  • Download URL: Skolmaten-0.0.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for Skolmaten-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b2dab9c9602580d13be4833986e19fb829733bcb0f80f5d3a247eac5be24126c
MD5 4e34e81125b9e7af58ccb2315e1cedd7
BLAKE2b-256 2d038cd911da93015883b4b169683cb92706998a51e6bf4d6560349615b423b3

See more details on using hashes here.

File details

Details for the file Skolmaten-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: Skolmaten-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for Skolmaten-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 adb65488fe411378dbdafc836cb4731ffe1a0936d062753b1fe51dfabe04ab56
MD5 d4e5d6a50a362973ac8b998749f4953c
BLAKE2b-256 6707440d56f2e318b21ae3105f737c151f9a06a2565b626f3e60567e1c43a39f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page