Skip to main content

Monopane Python SDK

Python client for the Monopane API: courses, modules, lessons and activities; learners, 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 tenant (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"],
)
tenant_id = "tnt_..."

with monopane.ApiClient(config) as client:
    courses = monopane.CoursesApi(client)

    course = courses.create_course(
        tenant_id,
        monopane.CreateCourseRequest(title="Intro to SQL", slug="intro-to-sql"),
    )

    page = courses.list_courses(tenant_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(
    tenant_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.

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.3.0

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

Source distribution (sdist)

Source distribution for monopane 0.3.0
File Size Uploaded Provenance Actions
monopane-0.3.0.tar.gz 120.3 kB With provenance Details for monopane-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for monopane 0.3.0
File Interpreter ABI Platform Actions
monopane-0.3.0-py3-none-any.whl Python 3 none any Details for monopane-0.3.0-py3-none-any.whl

Total release size: 456.0 kB

Release files / monopane-0.3.0.tar.gz

Download URL monopane-0.3.0.tar.gz
Size 120.3 kB
Tags Source
SHA-256 checksum
How to use checksums
81247a57bd19d7df3a6ef5845180094b25e8d5ea0d72370c72b9f1887053cea2
BLAKE2b-256 checksum
How to use checksums
d895ffd072594b10d21176be196b04ac9ea5b2da9300bfa074b35c2a9a6fdd45
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 log

Release files / monopane-0.3.0-py3-none-any.whl

Download URL monopane-0.3.0-py3-none-any.whl
Size 335.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f98deff2ea258dca257ccdfa0d72926133a96f9e3b6dac8c96d183e6129f9198
BLAKE2b-256 checksum
How to use checksums
dd94a405a07278509807a9fb1c05449661a7be50097af39dca73e0bbe2b5456a
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 log

Security for monopane 0.3.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.

Select from 2 files

Attestation for monopane-0.3.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 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