Skip to main content

Bundled BHS-area school bell-schedule calendar data for the bells library

Project description

bhs-calendars (Python)

Bundled bell-schedule calendar data for Berkeley High School and nearby middle schools, as a Python distribution. This is the Python counterpart of the npm @peterseibel/bhs-calendars package and ships the same per-year JSON.

It is data, not logic — pair it with the bells library to build schedules without supplying your own {year}.json files.

pip install bhs-calendars

Usage

from bhs_calendars import by_id, load_all
from bells import BellSchedule

# Grouped by school, each school's years sorted chronologically:
years = by_id()["bhs"]
schedule = BellSchedule(years, {})

# Or the flat list of every bundled school-year:
all_years = load_all()   # list[dict]

load_all() mirrors the npm package's default export (a flat list of yearly calendar objects). by_id() groups those by their id field — "bhs", "king-6", "king-7", "king-8", "longfellow-6", "longfellow-78", "willard-6", "willard-78" — with each group's years sorted by firstDay.

Unlike the library's Calendars loader (which reads {year}.json from a directory or URL), this data is bundled on disk with the package: no filesystem layout or network access required. The trade-off is that it only covers the BHS-area schools.

Data source

The single source of truth is the canonical bhs-calendars/ directory at the repository root (also the npm package source). The JSON under bhs_calendars/data/ is a verbatim, build-time copy of it and is gitignored, not committed — the build, test, and release flows (and CI) regenerate it so it can never drift from the source.

When working in this repo, run make sync-py-calendars (or make sync-calendars for both ports) from the repo root once after checkout, and again after the source data changes, before building or testing this package.

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

bhs_calendars-2.11.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

bhs_calendars-2.11.1-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file bhs_calendars-2.11.1.tar.gz.

File metadata

  • Download URL: bhs_calendars-2.11.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bhs_calendars-2.11.1.tar.gz
Algorithm Hash digest
SHA256 e4a7c457e06d15afa047732cbdd63f7b1eeb84dbc6a9c4255c536097e06bfdbe
MD5 cc50ce149795c5bdea1c16b2c5981b0e
BLAKE2b-256 52c7171c4fe97fc6a8377f94ad35d6278506b143c1ebc3689b529c09d88854cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for bhs_calendars-2.11.1.tar.gz:

Publisher: publish-calendars.yml on gigamonkey/bells

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

File details

Details for the file bhs_calendars-2.11.1-py3-none-any.whl.

File metadata

  • Download URL: bhs_calendars-2.11.1-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bhs_calendars-2.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db61bc1a0358443d065104563a04f6d7f0e7343de575c6baee6e67fa5e976932
MD5 948d59f63d449f8b18ba69566f14f64c
BLAKE2b-256 1a7231236e5842b0aa987e62887b3faf3dfb0ace34751526be71cfd4e7b52434

See more details on using hashes here.

Provenance

The following attestation bundles were made for bhs_calendars-2.11.1-py3-none-any.whl:

Publisher: publish-calendars.yml on gigamonkey/bells

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