Skip to main content

stapel-calendar

CI coverage pypi downloads python license llms.txt

Calendar and scheduling: events with participants and RSVP, RFC 5545 recurring series (virtual expansion, on-demand materialization, per-instant cancellation and reschedule), availability windows with free/busy and bookable slot computation, ICS export, and event-driven reminders.

Part of the Stapel framework — composable Django apps that deploy as a monolith or as microservices without changing module code.

Install

pip install stapel-calendar

At a glance

Fact Value
Version 0.8.0
Python >=3.11 (3.11, 3.12, 3.13, 3.14)
HTTP operations 10
Config axes 1
Usage surface 31
Extension points 5
Error codes 49
Fleet dependencies stapel-auth (optional) · stapel-core · stapel-notifications (optional)

Documentation

OpenAPI · capabilities.json · llms.txt (for agents)

What this is

A generic calendar core — Event / Participant / RSVP, an RFC 5545 recurrence engine (RRULE via python-dateutil, virtual expansion + on-demand materialization), availability (working windows, free/busy, slots) and ICS export. Two flavors of one domain — meetings and bookings — share this core; everything app-specific lives behind seams.

Quick start

INSTALLED_APPS = [
    # ...
    "stapel_calendar",
]

# urls.py
path("calendar/", include("stapel_calendar.urls"))

Concepts

  • Event — a scheduled thing (meeting/booking/appointment) with tz-aware start/end, an owner and an opaque scope_key. No FK to any host concept (org, room) — scoping and resources are seams.
  • Recurrence — the series master stores a canonical RRULE. Occurrences are virtual until they gain their own state (an RSVP or a resource), at which point they are materialized (persisted) on demand.
  • Availability — recurring working windows minus busy events give open booking slots.
from stapel_calendar import services

series = services.create_event(
    owner=user, title="Standup",
    start=start, end=end,
    recurrence_type="weekdays",            # -> FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR
)
occurrences = services.expand_event(series, range_start, range_end)  # virtual
services.materialize(series, occurrence_start)  # persist one + emit hook
busy = services.free_busy(user, range_start, range_end)
slots = services.compute_slots(user, range_start, range_end, slot_minutes=30)

Settings

All configuration lives in the STAPEL_CALENDAR namespace (dict setting, flat setting, or env var — resolved lazily):

Key Default Meaning
SCOPE_PROVIDER …scope.DefaultScopeProvider Resolve/filter the opaque scope_key
REMINDER_POLICY …reminders.DefaultReminderPolicy When/what to remind
PRESETS {} Custom recurrence presets (merged over built-ins)
REMINDER_OFFSETS [10] Minutes before start to remind
REMINDER_SCAN_WINDOW_SECONDS 60 Reminder cron granularity
DEFAULT_EXPANSION_HORIZON_DAYS 90 Default range end
MAX_EXPANSION_OCCURRENCES 1000 Expansion safety cap
DEFAULT_SLOT_MINUTES 30 Default slot length

comm surface

Kind Name Contract
Emit calendar.occurrence.materialized An occurrence was persisted — subscribe to attach a resource
Emit calendar.event.reminder_due A reminder is due — deliver it
Function calendar.free_busy {user_id, start, end, scope_key?} -> {busy: [...]}

Extension points

See MODULE.md — the agent-facing map of every fork-free seam (the resource hook, reminder policy, scope provider, recurrence presets, serializer seams, settings).

Development

pip install -e . && pip install pytest pytest-django ruff
./setup-hooks.sh
pytest tests/

License

MIT — see LICENSE.


This page is assembled by stapel-readme from docs/readme.md plus the contract artifacts in docs/. Edit the prose in docs/readme.md; the badges, facts and links above and below it are generated — do not hand-edit README.md.

Metadata

Release files for stapel-calendar 0.8.0

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

Source distribution (sdist)

Source distribution for stapel-calendar 0.8.0
File Size Uploaded
stapel_calendar-0.8.0.tar.gz 110.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stapel-calendar 0.8.0
File Interpreter ABI Platform
stapel_calendar-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 195.7 kB

Release files / stapel_calendar-0.8.0.tar.gz

Download URL stapel_calendar-0.8.0.tar.gz
Size 110.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ed5784360792eb7061ea1087b0ec50e8d445e70fa072a6979ea5c4d2399d7fd3
BLAKE2b-256 checksum
How to use checksums
a81ccbfa9afb5904cd7554dd817d36efa945faa6193c436bc8111a6dbd8e15c7
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 Sep 18, 2026.

Transparency log

Release files / stapel_calendar-0.8.0-py3-none-any.whl

Download URL stapel_calendar-0.8.0-py3-none-any.whl
Size 85.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c2ed229b96377ba5b66df3eda36b51b9f18254cde9af8e73b9ae061c6e23899
BLAKE2b-256 checksum
How to use checksums
c4c77f5c64556f75ac7818e4395aeac1e528e37c4e4d7d2a5ce588acb63fecdc
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 Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.2

2 release files

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