Skip to main content

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.

Metadata

Release files for bhs-calendars 2.12.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bhs-calendars 2.12.1
File Size Uploaded Provenance Actions
bhs_calendars-2.12.1.tar.gz 12.4 kB With provenance Details for bhs_calendars-2.12.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bhs-calendars 2.12.1
File Interpreter ABI Platform Actions
bhs_calendars-2.12.1-py3-none-any.whl Python 3 none any Details for bhs_calendars-2.12.1-py3-none-any.whl

Total release size: 38.7 kB

Release files / bhs_calendars-2.12.1.tar.gz

Download URL bhs_calendars-2.12.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1b713f9f3bcfccaff8fcd5eb4326212e007a428aac020e64349f38f7a13a1fdd
BLAKE2b-256 checksum
How to use checksums
f3d9519bee4d2ba31dddcd9c1cc288c928bac6cf882b4c7b01d1cccc6cdab78d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Release files / bhs_calendars-2.12.1-py3-none-any.whl

Download URL bhs_calendars-2.12.1-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dfb16f00936d2301cd2b52bda122ae5cb8e2355e2e706da46b3c582f9cb4bdf
BLAKE2b-256 checksum
How to use checksums
4fecb458ccdd9ecff3741a4b346c4621f4c7d07569c455185be5a60bf4efff7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Security for bhs-calendars 2.12.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bhs_calendars-2.12.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page