Skip to main content

Play H5P content in Open edX using h5pxblock

H5P Xblock provides ability to host and play H5P content in open edX. It has few more features

  1. Ability to mark H5P content complete in open edX
  2. Ability to capture score of H5P content in open edX
  3. Save learner state which can be retrieved later
  4. Ability to host H5P content on cloud storage like AWS S3

Setup

Install Xblock

pip install h5p-xblock

or if you're using tutor to manage your organization:

tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=h5p-xblock
tutor images build openedx

Update Advanced Settings of course

Update course advanced settings by adding h5pxblock

Update course advanced settings

Upload H5P Content

Xblock should be available in Advanced component list of course unit now. Add xblock in unit and click "Edit" button to upload H5P content and configure it.

Upload and configure H5P content in Studio

Publish Content

Use "Preview" button to preview it or publish your content and use "View Live Version" button to see how it appears on LMS

Preview H5P content in LMS

Configuring storage backend (S3 example)

H5P relies on DEFAULT_FILE_STORAGE by default. If you want to use a different storage for H5P content (e.g., a dedicated S3 bucket, or when AWS_QUERYSTRING_AUTH = True and you need unsigned URLs), configure one of the following:

  1. Django ≥ 4.2/5.x (preferred): add a storage entry named h5pxblock_storage to STORAGES:
STORAGES = {
    "default": {
        "BACKEND": "django.core.files.storage.FileSystemStorage",
        "OPTIONS": {"location": "/var/media"},
    },
    "h5pxblock_storage": {
        "BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
        "OPTIONS": {
            "bucket_name": "my-s3-public-bucket",
            "querystring_auth": False,
        },
    },
}
  1. Legacy fallback (still supported):
H5PXBLOCK_STORAGE = {
    "storage_class": "storages.backends.s3boto3.S3Boto3Storage",  # or "STORAGE_CLASS"
    "settings": {  # or "STORAGE_KWARGS"
        "bucket_name": "my-s3-public-bucket",
        "querystring_auth": False,
    },
}

Please ensure that your bucket is publicly accessible (or otherwise correctly configured) to enable seamless content storage and retrieval via S3.

Working with translations

You can help by translating this project. Follow the steps below:

  1. You need i18n_tool to "collect" and "compile" translations. If you already have it, proceed to the next item; otherwise:
pip install git+https://github.com/openedx/i18n-tools
  1. Create a folder for the translations in locale/, eg: locale/es_419/LC_MESSAGES/, and create your text.po file with all the translations.
  2. Run make compile_translations, this will generate the text.mo file.
  3. Create a pull request with your changes.

Metadata

Release files for h5p-xblock 0.2.19

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

Source distribution (sdist)

Source distribution for h5p-xblock 0.2.19
File Size Uploaded Provenance Actions
h5p_xblock-0.2.19.tar.gz 27.1 kB With provenance Details for h5p_xblock-0.2.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for h5p-xblock 0.2.19
File Interpreter ABI Platform Actions
h5p_xblock-0.2.19-py3-none-any.whl Python 3 none any Details for h5p_xblock-0.2.19-py3-none-any.whl

Total release size: 70.6 kB

Release files / h5p_xblock-0.2.19.tar.gz

Download URL h5p_xblock-0.2.19.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ff0d86bc7a0ce2bb0fadbf6531087ad7ef3cb2f03c4da0751bb4057be760ea9d
BLAKE2b-256 checksum
How to use checksums
059832767bc3c509c55051fb9c52ea0d5594fb3a24e3ad68009022b3e46771a3
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 Oct 16, 2026.

Transparency log

Release files / h5p_xblock-0.2.19-py3-none-any.whl

Download URL h5p_xblock-0.2.19-py3-none-any.whl
Size 43.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5dcb583e93acd903833ad966f365b7a71eaab40a04b85caeae6fc8c2c1706b4
BLAKE2b-256 checksum
How to use checksums
5f7d591c316f0611af324679fa299298ceaa6cf4e7ac84a9bda5d90c81348dfc
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 Oct 16, 2026.

Transparency log

Security for h5p-xblock 0.2.19

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 h5p_xblock-0.2.19.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 Oct 16, 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