Skip to main content

quizazz

YAML question bank validator, compiler, and CLI for Quizazz quizzes.

Use it as a command-line tool to compile quiz YAML into a browser-ready manifest, or as a Python library to compile assessments directly into dicts — ideal for host frameworks that bundle quizzes at their own build time.

Install

pip install quizazz

Python 3.12+ required.

CLI

# Compile a single quiz directory to a JSON manifest
quizazz generate --input data/my-quiz/ --output app/src/lib/data/

# Batch-compile every quiz under a parent directory
quizazz generate --all --input data/ --output app/src/lib/data/

quizazz --help lists all subcommands. The CLI exits non-zero on validation errors and prints one diagnostic per violation to stderr.

Library API

For host frameworks that want to compile assessments without shelling out:

from pathlib import Path
from quizazz import compile_assessment, validate_assessment, ValidationError

try:
    manifest = compile_assessment("module-4-pre.yaml", base_dir=Path("content"))
    # → dict with schemaVersion, quizName, tree, questions
except ValidationError as exc:
    print(exc.file_path, exc.message, exc.detail)

errors = validate_assessment("bad.yaml", base_dir=Path("content"))
# → [] on success, or one human-readable string per violation

Both functions accept str or Path for their arguments. yaml_path is joined under base_dir and must resolve strictly inside it; traversal attempts (.., absolute paths outside the base, escaping symlinks) raise ValidationError with detail={"base_dir", "resolved"}. Neither function writes to disk, spawns subprocesses, or issues network calls.

validate_assessment never raises — it swallows ValidationError and surfaces one string per underlying violation in the returned list.

YAML schema

Each question requires five or more answers distributed across four categories — correct, partially_correct, incorrect, and ridiculous:

menu_name: "General Knowledge"
questions:
  - question: "What is the capital of France?"
    tags: ["geography"]
    answers:
      correct:
        - text: "Paris"
          explanation: "Paris has been the capital since the 10th century."
      partially_correct:
        - text: "Lyon"
          explanation: "Second-largest city but not the capital."
      incorrect:
        - text: "Berlin"
          explanation: "Berlin is the capital of Germany."
      ridiculous:
        - text: "Atlantis"
          explanation: "A mythical city."
        - text: "The Moon"
          explanation: "Not a city."

Subtopic grouping is optional. See the full repository README for the complete schema, tag filtering, and the SvelteKit quiz UI that consumes the compiled manifests.

Manifest schema version

The compiled manifest includes a top-level schemaVersion field. quizazz 1.x emits "1.0"; consumers should check compatibility before treating the manifest as authoritative. This is the cross-package versioning boundary between quizazz (producer) and @pointmatic/quizazz (future npm consumer).

License

Apache-2.0. See the repository LICENSE.

Metadata

Release files for quizazz 1.4.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 quizazz 1.4.0
File Size Uploaded Provenance Actions
quizazz-1.4.0.tar.gz 24.8 kB With provenance Details for quizazz-1.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 39.8 kB

Release files / quizazz-1.4.0.tar.gz

Download URL quizazz-1.4.0.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7d8f2353b5e8b8a7de152efe8cfd4d796664e5791f56b47fe1ba0779a7bf2616
BLAKE2b-256 checksum
How to use checksums
dd7ef070b91f90aca66d53e6ecfb5cdca98765eccad2e5f09fe8d5eca4622c2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 22, 2026.

Transparency log

Release files / quizazz-1.4.0-py3-none-any.whl

Download URL quizazz-1.4.0-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18eaac453b475a8e989d2db0a37480a33c8ff39273f01196ba1d1402a4c56512
BLAKE2b-256 checksum
How to use checksums
fd35c68f4240d2d90d2ed268eda37566e27974eaee0c770ed77b319b7934e98d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 22, 2026.

Transparency log

Security for quizazz 1.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.

Select from 2 files

Attestation for quizazz-1.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 May 22, 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