LabQuiz bundle that includes labquiz, quiz-editor, and quiz-dash.
Project description
Sponsor:
LabQuiz is a Python package that allows to seamlessly integrate interactive quizzes directly into Jupyter notebooks โ useful for labs, tutorials, practical assignments, continuous assessment, and controlled exams.
- ๐๐ผ
Live versionTry it in binder !
It combines:
- โ Multiple-choice and numerical questions
- ๐งฉ Template-based parameterized questions
- ๐ Configurable number of attempts
- ๐ก Hints and detailed feedback
- ๐ Automatic scoring
- ๐ Optional remote logging (Google Sheets)
- ๐ Real-time monitoring dashboard (if logging)
- ๐ Integrity checks and anti-tampering mechanisms
And it comes with two optional companion tools:
- โ๏ธ
quiz_editorโ Create, edit, encrypt, and export question banks streamlit app | src code - ๐
quiz_dashโ Monitor, correct, and analyze results in real time streamlit app | src code
flowchart LR
%% Nodes
A["YAML Quiz<br/>(Quiz-as-Code)"]
B["quiz_editor<br/>Authoring Interface<br/>(optional)"]
C["Jupyter Notebook<br/>+ Interactive Quizzes"]
D["Remote Backend<br/>(e.g., Google Sheets)"]
E["quiz_dash<br/>Monitoring Dashboard"]
F[Analytics]
G[Marks Table]
H[Student Reports]
I[Exports: <br/>Web-based Training Quizzes <br/>AMC / LaTeX Paper Quizzes]
%% Flows
B -.-> A
A ---> C
C -.-> D
D --> E
E --> F
E --> G
E --> H
A -.-> I
%% Styles
classDef authoring fill:#e3f2fd,stroke:#1e88e5,stroke-width:1px;
classDef runtime fill:#e8f5e9,stroke:#43a047,stroke-width:1px;
classDef backend fill:#fff3e0,stroke:#fb8c00,stroke-width:1px;
classDef dashboard fill:#f3e5f5,stroke:#8e24aa,stroke-width:1px;
classDef outputs fill:#fce4ec,stroke:#d81b60,stroke-width:1px;
classDef export fill:#e0f7fa,stroke:#00838f,stroke-width:1px;
%% Assign classes
class A,B authoring;
class C runtime;
class D backend;
class E dashboard;
class F,G,H outputs;
class I,J export;
Figure: Overview of the LabQuiz ecosystem. Dashed arrows indicate optional components. YAML quizzes drive both interactive notebooks and exports, monitored via a dashboard producing analytics, marks tables, and student reports.
Installation:
# From source
pip install git+https://github.com/jfbercher/labquiz.git
# or from PyPI
pip install labquiz
๐ Why LabQuiz?
LabQuiz is designed for active learning and controlled assessment in computational notebooks.
It helps instructors:
- Increase student engagement with embedded exercises
- Provide structured feedback during lab sessions
- Monitor progress in real time
- Run controlled tests and exams
- Detect configuration tampering or integrity violations
It helps students:
- Learn through interaction and immediate feedback
- Track their progress
- Work within structured assessment modes
๐ What LabQuiz Does
Inside your notebook, you can:
- โ
Add multiple-choice questions (
mcq) - ๐ข Add numerical questions with tolerance (
numeric) - ๐งฉ Create parameterized template questions
- ๐ Limit attempts
- ๐ก Provide hints and corrections
- ๐ Compute automatic scores
- ๐ Log all activity to a Google Sheet backend (optional)
- ๐ Enable exam mode with integrity checks
Example:
from labquiz import QuizLab
quiz = QuizLab(URL, "my_quiz.yml", retries=2, exam_mode=False)
quiz.show("quiz1")
๐ธ Examples
Multiple-choice question (with hints & correction)
Numerical question
Template-based question (dynamic variables)
๐งฉ Question Types, Pedagogical modes, Logging
Question types
LabQuiz supports four types:
| Type | Description |
|---|---|
mcq |
Standard multiple-choice |
numeric |
Numerical answers with tolerance |
mcq-template |
Context-dependent MCQ |
numeric-template |
Context-dependent numerical questions |
Template questions allow dynamic evaluation based on runtime variables โ ideal for practical lab computations.
Example:
quiz.show("quiz54", a=res1, b=res2)
Variables can also be generated dynamically
quiz.show("quiz54", autovars=True)
The expected solution is dynamically computed using Python expressions.
Pedagogical modes
LabQuiz supports three pedagogical modes:
- Learning mode (hints + correction available, score display)
- Test mode (limited attempts, score display but no correction)
- Exam mode (no feedback, secure logging)
Quizzes are defined in simple YAML format and support
- Logical constraints (XOR, IMPLY, SAME, IMPLYFALSE)
- Bonuses and penalties
- Relative and absolute tolerances
- Variable generation for templates
๐ Remote Logging & Dashboard
All data can be stored in a Google Sheet backend.
LabQuiz can log: Validation events, Parameters, User answers, Integrity hashes... LabQuiz also includes multiple anti-cheating mechanisms (Machine fingerprinting, Source hash verification, Detection of parameter tampering, Optional encrypted question files, Runtime integrity daemon...)
โ๏ธ Installation
From PyPI
pip install labquiz
From source:
pip install git+https://github.com/jfbercher/labquiz.git
Import:
import labquiz
from labquiz import QuizLab
Instantiate:
quiz = QuizLab(URL, QUIZFILE,
retries=2,
needAuthentication=True,
mandatoryInternet=False)
๐ Additional Tools
โ๏ธ quiz_editor โ Build & Export Question Banks
Creating YAML files manually works โ but quiz_editor is intended to makes it easier. It can also be useful outside ob LabQuiz as a general quiz-editor with export capabilities.
Key features:
-
Visual question editing (MCQ, numeric, templates)
-
Categories & tags
-
Variable generation for templates
-
Bonus / malus configuration
-
Logical constraints (XOR, IMPLY, SAME, etc.)
-
One-click export to:
- โ YAML
- ๐ Encrypted version
- ๐ Interactive HTML (training mode)
- ๐ HTML exam version (Google Sheet connected)
- ๐ AMCโLaTeX format (paper exams)
Online version: ๐ https://jfb-quizeditor.streamlit.app/
Install locally:
pip install quiz-editor
๐ quiz_dash โ Real-Time Monitoring & Correction
quiz_dash is the companion dashboard for instructors.
It connects to your Google Sheet backend and provides:
- ๐ Live tracking of submissions
- Live class overview
- ๐ค Student-by-student monitoring
- ๐ Integrity checks (mode changes, retries tampering, hash verification)
- โ Adjustable grading weights
- ๐ Automatic recalculation
- ๐ฅ CSV export of results
Online version: ๐ https://jfb-quizdash.streamlit.app/
๐ Optional: Zero Installation with JupyterLite
LabQuiz can run entirely in the browser using JupyterLite (WASM). Perfect for fully web-based lab environments.
๐ฆ Ecosystem
| Tool | Purpose |
|---|---|
| labquiz | Notebook quiz engine |
| quiz_editor | Question bank creation & export |
| quiz_dash | Monitoring & correction dashboard |
๐ฆ Repositories:
- https://github.com/jfbercher/labquiz
- https://github.com/jfbercher/quiz_editor
- https://github.com/jfbercher/quiz_dash
Online tools:
๐ฏ Typical Workflow
- Prepare questions (YAML or
quiz_editor) - Optionally encrypt file
- Create Google Sheet backend
- Instantiate
QuizLabin notebook - Run lab / test / exam
- Monitor using a python console or with
quiz_dash - Post-correct with adjustable grading
๐ Demonstration
See:
labQuizDemo.ipynbinextras/- ๐๐ผ
Live version๐ Try it in binder
๐ License
GPL-3.0 license
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labquizbundle-0.9.9.tar.gz.
File metadata
- Download URL: labquizbundle-0.9.9.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a62d746b7468375b5a06e3e3620ae3b93cc249a4a0dbc67b850f9079bfd2cdda
|
|
| MD5 |
0fabaeaca05a946ef6063565ae28658e
|
|
| BLAKE2b-256 |
7a2061571413163794582bfb7a3f64de63e52feeadb3335985b98b66f638a520
|
File details
Details for the file labquizbundle-0.9.9-py3-none-any.whl.
File metadata
- Download URL: labquizbundle-0.9.9-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e90efa211ca3a877bb7d1f035e54cde05b37fa6ce86ee5b33e521af96d1309e8
|
|
| MD5 |
f83ad92785394d4c10e9e7b1d8999afd
|
|
| BLAKE2b-256 |
a60d6038595376384d215f3cb3cbde58e5a11aee381e36fccf3aea1ac1037b71
|