Registry / web-framework / lti-consumer-xblock

lti-consumer-xblock

JSON →
library11.3.1pypypi✓ verified 84d ago

An XBlock for Open edX that implements the consumer side of the LTI 1.1 and LTI 1.3 Advantage specifications, enabling embedding of external tools (e.g., lab platforms, publishers) into courseware. Current version 11.2.0, released June 2025. Active development under the Open edX project with regular releases.

pip install lti-consumer-xblock
INSTALL
IMPORT
SIG · LTI-CONSUMER-XBLOC
L
lti-consumer-xblock
web-frameworkpythonv11.3.1
Install
10.3s avg
Import
1412ms
Disk
149MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v11.3.1 · 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.103.95 runs
installs and imports cleanly · install 0.0s · import 0.864s · 138.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 10.3s · import 0.830s · 145MB
149MB installed
● package 149MB
Code
Verified usage

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

LtiConsumerXBlock
from lti_consumer import LtiConsumerXBlock
from lti_consumer_xblock import LtiConsumerXBlock
The package is lti-consumer-xblock but the import module is lti_consumer.
LtiConfiguration
from lti_consumer.models import LtiConfiguration
from lti_consumer.models import LtiConsumerConfiguration
The model is named LtiConfiguration, not LtiConsumerConfiguration.

Basic instantiation of the LTI Consumer XBlock.

from lti_consumer import LtiConsumerXBlock # The XBlock is typically used within Open edX courseware. # Minimal standalone usage example: block = LtiConsumerXBlock() block.location = 'block-v1:org+course+run+type@lti_consumer+block@lti1' block.display_name = 'My LTI Tool' block.lti_id = 'tool_id' block.lti_version = 'lti_1p3' block.lti_1p3_launch_url = 'https://example.com/lti/launch' print('LTI Consumer XBlock instantiated successfully.')
Debug
Known issues
breakingFrom v11.0.0, Python 3.11 support was dropped. Only Python 3.8-3.10 are supported.
fix
Use Python 3.8, 3.9, or 3.10.
affects: >=11.0.0
breakingFrom v10.0.0, Python 3.11 support was dropped, and the library now requires Django >= 3.2.
fix
Ensure Django version >= 3.2 is installed.
affects: >=10.0.0
deprecatedLTI 1.1 (lti_version='lti_1p1') is considered deprecated; LTI 1.3 is recommended.
fix
Migrate to LTI 1.3 configuration using lti_1p3_* fields.
affects: all
gotchaThe xblock import module is `lti_consumer`, not `lti_consumer_xblock`. Mistaking the import path leads to ModuleNotFoundError.
fix
Use 'from lti_consumer import LtiConsumerXBlock'.
affects: all
gotchaThe LtiConfiguration model is in `lti_consumer.models`, but there is no 'LtiConsumerConfiguration' model.
fix
Use 'from lti_consumer.models import LtiConfiguration'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lti_consumer_xblock'
Incorrect import path; the package name differs from the module name.
fix
Use 'from lti_consumer import LtiConsumerXBlock' instead.
ImportError: cannot import name 'LtiConsumerConfiguration' from 'lti_consumer.models'
Attempting to import a non-existent model; the correct model is LtiConfiguration.
fix
Use 'from lti_consumer.models import LtiConfiguration'.
TypeError: __init__() missing 1 required positional argument: 'location'
LtiConsumerXBlock requires a 'location' field when instantiated outside of Open edX runtime.
fix
Provide a location string (e.g., 'block-v1:...') when constructing the XBlock.
Upgrade
Version history
11.3.1latest on PyPI · released Jun 1, 2026
Audit
Dependencies
XBlockrequiredRuntime dependency; requires xblock package for XBlock base classes.
DjangorequiredUsed for web framework integration; required for Open edX installations.
pyjwkestrequiredUsed for LTI 1.3 key handling (JWKS).
oauthlibrequiredUsed for LTI 1.1 OAuth signing.
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
lti-consumer-xblock — pip install lti-consumer-xblock · libregistry