Monopane Python SDK
Python client for the Monopane API: courses, modules, lessons and activities; users, enrollments, progress and quizzes; webhooks.
API reference: https://api.monopane.io/docs
Install
pip install monopane
Requires Python 3.11 or newer.
Authentication
Create an API key in the Monopane console. Keys start with mpk_live_ for the production environment (or mpk_test_ for any other, such as staging) and belong to one project and one of its environments: a key reads and writes that environment only.
Usage
import os
import monopane
config = monopane.Configuration(
host="https://api.monopane.io",
access_token=os.environ["MONOPANE_API_KEY"],
)
project_id = "prj_..."
with monopane.ApiClient(config) as client:
courses = monopane.CoursesApi(client)
course = courses.create_course(
project_id,
monopane.CreateCourseRequest(title="Intro to SQL", slug="intro-to-sql"),
)
page = courses.list_courses(project_id)
print(len(page.data), page.next_cursor)
Errors raise monopane.ApiException, with .status and .body.
Quiz answers
Quiz answers are a union type. Build each one from its model and wrap it in SubmissionAnswer:
answer = monopane.SubmissionAnswer(
monopane.MultipleChoiceAnswer(question_id="q1", type="multiple_choice", answer="4")
)
monopane.SubmissionsApi(client).create_submission(
project_id,
enrollment_id,
monopane.CreateSubmissionRequest(activity_id=activity_id, answers=[answer]),
)
Do not pass a plain dict in answers: the SDK serializes it as null and the API rejects the request.
Upgrading from 0.3
0.4.0 renames two things everywhere: a tenant is a project and a learner is a user.
| 0.3 | 0.4 |
|---|---|
tenant_id |
project_id |
LearnersApi, create_learner, CreateLearnerRequest, ... |
UsersApi, create_user, CreateUserRequest, ... |
learner_id, tenant_id in requests and responses |
user_id, project_id |
scopes learners:read, learners:write |
users:read, users:write (keys holding the old names keep working) |
key role learner |
user |
TenantsApi, get_tenant |
ProjectsApi, get_project |
IDs are unchanged: existing tnt_ and lrn_ IDs stay valid, and new projects and users get prj_ and usr_. The API still answers 0.3 clients, so an application can upgrade when it suits it.
About this package
The client is generated from the Monopane OpenAPI document with OpenAPI Generator. In the source repository everything except this README and pyproject.toml is generated; regenerate with pnpm sdk:generate instead of editing it.
Metadata
Release files for monopane 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| monopane-0.4.0.tar.gz | 123.2 kB | With provenance | Details for monopane-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| monopane-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for monopane-0.4.0-py3-none-any.whl |
Total release size: 470.2 kB
Release files / monopane-0.4.0.tar.gz
| Download URL | monopane-0.4.0.tar.gz |
|---|---|
| Size | 123.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb935869238df7cbfe80d3bbbcfe65ae005a3fe10881baa656a1425af24f0c46
|
|
BLAKE2b-256 checksum How to use checksums |
c1e425324c9b71d89a148224ac2abafa017a2c62f6b39b98c51febbe77bef3c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logRelease files / monopane-0.4.0-py3-none-any.whl
| Download URL | monopane-0.4.0-py3-none-any.whl |
|---|---|
| Size | 347.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6029813c4b66fb8512511a4a28a5372de0c88f7d678ac8ef0dcdbc6328f10a18
|
|
BLAKE2b-256 checksum How to use checksums |
87ceb6dfad9e50d6102be9651d6b216d159d068a86e7534d8be8bdbc1c785748
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logSecurity for monopane 0.4.0
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.
Attestation for monopane-0.4.0.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 Nov 25, 2026.
Transparency logA 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.