Skip to main content

A library to fetch the MVHS Schedule.

Project description

MVHS Schedule

A Python library for fetching the MVHS Schedule from the Firebase REST API used by mvhs.io, ported from this NPM package. It provides the same simple functions from that package, and uses asyncio for asynchronous execution.

Installation

pip install mvhs-schedule

Usage

This module is async, so all of the functions need to be awaited. All arguments that need a day require a datetime.date, and the times require datetime.datetime.

[!NOTE]
The module relies on the Firebase app that is maintained by Mr. Nguyen, so if that is ever out-of-date, then this library will likely by inaccurate on special schedule days.

Functions

There are a few functions that you can use:

  • get_schedule_from_day returns the name of the schedule (e.g. "Schedule A") given a specific date.
  • get_periods_from_schedule returns a list of Period from a specific schedule
  • get_periods_from_day will get simply get the list of periods on a specific date
  • get_periods_from_day_count takes in a date and a day_count, which will return a list of lists of Period starting from the specified date and spanning day_count days. For example, calling get_periods_from_day_count(date.today(), 7) will return 7 lists of periods for the next week (including today).
  • time_of_period will return the start and end time of a period given the day and period

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

mvhs_schedule-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

mvhs_schedule-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file mvhs_schedule-0.1.0.tar.gz.

File metadata

  • Download URL: mvhs_schedule-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mvhs_schedule-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77696fe75cc98807860e652a72ce6b35ca90dc5551ab61729c7cea910f1906dc
MD5 04f8708f96a2eae32688c73406f604c3
BLAKE2b-256 45c9125102a278d815f1b505e89c02cac509104373d00d19e055ba09aa4b65ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvhs_schedule-0.1.0.tar.gz:

Publisher: python-package.yml on jt31415/mvhs-schedule

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mvhs_schedule-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mvhs_schedule-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mvhs_schedule-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 828bf8b628d1869654d824f3001fc6c5b7210f8506af1f6bf63429080e372907
MD5 4a49b08897975b419aaadc7c430e9cb6
BLAKE2b-256 ab2671e867030e1ce644310635acc30b825f951e50accdc547309a26db1d62f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvhs_schedule-0.1.0-py3-none-any.whl:

Publisher: python-package.yml on jt31415/mvhs-schedule

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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