Registry / web-framework / edx-when

edx-when

JSON →
library4.0.0pypypiunverified

A Django app for managing content scheduling and due dates in Open edX courses. It provides models and APIs for content dates, user-specific overrides, and schedule computation. Current version 4.0.0 (released 2025-05-07). Release cadence: irregular, with major version bumps when dropping Python/Django support.

pip install edx-when
INSTALL
IMPORT
SIG · EDX-WHEN
E
edx-when
web-frameworkpythonv4.0.0
Install
10.1s avg
Import
—
Disk
140MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v4.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 132.3MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 10.1s · import 0.000s · 135MB
140MB installed
● package 140MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ContentDate
✓ from edx_when.models import ContentDate
✗ from edx_when.models import ContentDate

Fetches the first 3 schedule entries for a given user and course. Requires Django settings configured.

import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'yourproject.settings') import django django.setup() from django.contrib.auth import get_user_model from opaque_keys.edx.keys import CourseKey from edx_when.api import get_schedule_for_user def demo(): user = get_user_model().objects.first() course_key = CourseKey.from_string('course-v1:DemoX+Demo_2024') schedule = get_schedule_for_user(user.id, course_key) print(schedule[:3] if schedule else 'No schedule found') demo()
Debug
Known issues
breakingVersion 4.0.0 drops support for Python 3.11. You must use Python 3.12+. Check your deployment.
fix
Upgrade to Python 3.12+ or pin to edx-when<4.0.0.
affects: >=4.0.0
breakingVersion 3.0.0 drops support for Python 3.8 and adds Python 3.12 support. Existing Python 3.8 deployments will break.
fix
Upgrade to Python 3.9+ or use edx-when<3.0.0.
affects: >=3.0.0,<4.0.0
gotchaThe get_schedule_for_user function requires a User ID (integer) and CourseKey; passing a username or course string will raise an AttributeError.
fix
Use user.id and course_key. Convert course strings with CourseKey.from_string().
affects: all
Upgrade
Version history
4.0.0latest on PyPI · released Apr 7, 2026
Audit
Dependencies
DjangorequiredModels and migrations depend on Django ORM
edx-opaque-keysrequiredUsageKey types for block identifiers
Agent activity
10 hits · last 30 days
node
10
Resources
edx-when — pip install edx-when · libregistry