Skip to main content

Convert simple JSON quizzes to QTI format for LMS import

Project description

json2qti

PyPI version Lint Test

Instantly convert simple JSON files into QTI import packages for your LMS.

json2qti is a lightweight, zero-dependency tool designed to bridge the gap between AI-generated content and Learning Management Systems (Canvas, Blackboard, Moodle, Brightspace, etc.).

🚀 Why json2qti?

  • LLM Optimized: The input JSON format is designed to be extremely token-efficient, making it perfect for generating quizzes with ChatGPT, Claude, or other LLMs.
  • Zero Dependencies: Runs entirely on the Python standard library. No complex environment setup required.
  • Universal Compatibility: Generates standard QTI v1.2 packages compatible with major LMS platforms.

📄 JSON Format

The input format is minimal by design.

  1. Quiz Title: The top-level key.
  2. Questions: Keys inside the object.
  3. Answers: A list of strings. The first answer is always the correct one. (Don't worry, json2qti shuffles them in the output file).
{
  "Basic Math Quiz": {
    "What is 1+1?": ["2", "3", "4", "5"],
    "What is 1+2?": ["3", "4", "5", "6"]
  }
}

💻 Usage

Quick Run (Recommended)

You can run it directly using pipx without installing anything globally:

pipx run json2qti quiz.json

Manual Execution

Since the tool is a single file, you can also just download json2qti.py and run it:

python3 json2qti.py quiz.json
# Creates quiz.zip ready for LMS import

🛠️ Development

This project includes a test suite to ensure reliability. Tests are located in the tests/ directory.

make test

📦 Dependencies

Just Python 3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json2qti-1.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json2qti-1.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file json2qti-1.1.0.tar.gz.

File metadata

  • Download URL: json2qti-1.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for json2qti-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ce0778ed43bc1c5b0eb36841d2933a03123a789b4ff9269373f026d94fff4663
MD5 dbf1743fcbcd46c9a704a858e711bbeb
BLAKE2b-256 3d08b89c9ce55c7855f8663f13c66bbdc9be0b40a700b56144be734616c5366c

See more details on using hashes here.

File details

Details for the file json2qti-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: json2qti-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for json2qti-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c69c561527adaafc6efc553828d41d84dadc0bf295bf51c5d85d31b2bcdce8f
MD5 fe9fbf84aa41ab37ef8c1df7ea0ba827
BLAKE2b-256 80e23be5458c7f2357bce71170efcbc75cfef5f407e396b4e9a68ebd79cb92b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page