XBlock
XBlock Core Library
What it is and what it does
XBlock is the core component architecture used by Open edX to build courseware. It provides a Python-level API and framework for creating educational content blocks—such as video players, problem sets, and learning sequences—that can be combined hierarchically to form complete courses. Unlike standards like LTI or SCORM, XBlock is designed for direct deployment: you provide the Python code, and it can be embedded directly into edX courseware without requiring external virtual machines or complex integration layers.
The package includes both the XBlock interface layer (which third-party developers use to write custom blocks) and runtime code (the behind-the-scenes infrastructure that edX uses to execute blocks). It depends on 10 runtime libraries including lxml for XML handling, mako for templating, webob for HTTP utilities, and others for data serialization and timezone support. The framework is production-stable, actively maintained, and designed to work within the Open edX ecosystem.
Use it for:
- Building custom educational content blocks (video players, quizzes, simulations) for Open edX courses.
- Creating reusable problem components that can be embedded across multiple courses in an edX instance.
- Developing interactive learning experiences that integrate with edX's data storage and runtime.
- Extending Open edX with domain-specific educational tools (labs, simulations, assessments).
- Packaging educational content as deployable Python components rather than external LTI tools.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
XBlock is a Python component architecture for building and embedding courseware in Open edX, providing a framework for creating reusable educational content blocks that can be hierarchically combined.
Yes, if you are developing for Open edX or a compatible platform. XBlock is the standard component architecture for edX courseware and is actively maintained with no known vulnerabilities. Install friction is low and dependencies are well-established. Not recommended for standalone use outside an Open edX environment—it is a framework component, not a general-purpose library.
Install
xblock on PyPI
pip
pip install xblockuv
uv add xblockpoetry
poetry add xblockInstalling XBlock
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release (37 days old) and ongoing repository activity. Requires Python 3.12 or later.
License in practice
Licensed under Apache 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install xblock
from xblock.core import XBlock
class MyXBlock(XBlock):
pass
Requires Python 3.12 or later; intended for use within Open edX or compatible runtime environments.
Verify before relying
- Whether this package is usable standalone or requires a full Open edX deployment to function.
- Specific runtime environment requirements beyond Python 3.12 (e.g., database, web server setup).
- How the 10 runtime dependencies (lxml, mako, webob, etc.) interact and whether they impose additional constraints.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — edx-opaque-keys, fs, lxml, mako, markupsafe, python-dateutil, pytz, pyyaml, simplejson, webob |
| Maintenance | actively maintained — 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,142/month — #14,466 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: xblock-6.3.1-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
openedx-eventsProvides event definitions and tooling for the…
permissive · top 15,000 on PyPI
edx-enterpriseA Django application that provides enterprise…
agpl · top 15,000 on PyPI
edx-ccx-keysProvides opaque key implementations for Custom…
agpl · top 15,000 on PyPI
edx-django-utilsProvides a collection of shared utilities for…
permissive · top 15,000 on PyPI
xformersXFormers provides reusable, composable building…
permissive · top 5,000 on PyPI
pyblock-builderPyBlock Builder provides Python classes and…
permissive · top 15,000 on PyPI
edx-rest-api-clientProvides OAuth2 and JWT utilities for…
permissive · top 15,000 on PyPI
edx-togglesProvides Django-integrated feature toggle…
agpl · top 15,000 on PyPI
sphinxcontrib-videoA Sphinx extension that embeds HTML5 videos…
permissive · top 15,000 on PyPI