Creating a Plone integration and server-side Python module


I'm quite new to H5P, and I'd like to create a Plone integration for H5P (viewing only would be sufficient, for the first shot).

In my current understanding, for integration of H5P it is needed to

  • create a .../h5p/... directory structure
    which contains .h5p files,
  • re-implement the server side code (for non-PHP-based servers),
  • generate the HTML integration code in pages wherever an H5P object is inserted.

Plone is based on Python, thus it could share a server-side Python library with Django, Turbogears, Flask etc.

Plone has a convention for resource directories which are prefixed by /++resource++, so e.g. the window.H5PIntegration.url could be /++resource++h5p, right? I could exclude this from Apache rewriting and let this path point to a physical directory on the server.

Any comments, hints, additions, corrections? Thanks!

tomaj's picture


I know there are some people looking into a Django integration. Maybe you should get in touch with them, to see if they have any code out to help you get started.

Start by commenting on this forum post.

Good luck!

- Tom

tomaj's picture

I guess you saw the documentation already?

- Tom

Zope/Plone runs an own server process; Apache rewrites the requests for the other port (and does some mangling for Zope's virtual hosting feature).As for Apache, it should be perfectly possible to exclude the path /h5p from this rewriting procedure and have a directory in which PHP code is executed. Would H5P join the game willingly?One idea would be to have a Moodle installation for H5P maintenance. Did anyone setup something like this for a non-PHP server?
tomaj's picture

Hi Tobias,

I don't know if anyone did some hybrid solution like you are describing.

If you create the .h5p-file with the editor in Moodle or Drupal, it shouldn't be too difficult for you to just display an H5P using only python for your backend, and JS for your frontend.

Just use unzip on the .h5p-file to get to the files inside. And you have to pipe some of the json configuration into the JavaScript parts, and set a few global variables, and that's pretty much it.

Then you can listen to xAPI-events being fired to track user progress.

- Tom


I am curious if there are any news on this project? I am thinking about building a Plone Integration, but I am new to Plone as well as H5P. Soo any progress that I can build on would be very helpful.

Thanks and Greetings


serettig's picture

From my experience on working on the the NodeJS re-implementation of H5P, I'd say that a proper Python version of the H5P server is a very big undertaking. I think the most realistic way of getting H5P working with various technologies, is to create a H5P microservice which can run independently and only communicates through standardized HTTP calls and thus abstracts the actual server technology.