Skip to main content

jupyterlab-anticheat

A JupyterLab extension that blocks copy-paste in code cells to prevent cheating during university programming exams. Students are required to type code manually, reinforcing genuine learning.

Features

  • Blocks Ctrl+V / Cmd+V keyboard paste in code cells
  • Blocks drag-and-drop of code into cells
  • Blocks right-click → Paste from the context menu
  • Shows a clear red notification message to the student
  • Works in Anaconda JupyterLab and web-hosted JupyterLab (both run in a browser)
  • Instructor can enable/disable via Command Palette or Settings
  • Configurable block message via Settings

Installation

cd jupyterlab-anticheat
pip install -e .
jupyter labextension develop --overwrite .

See install.txt for full step-by-step instructions.

Instructor Controls

Open the Command Palette (Ctrl+Shift+C) and search for AntiCheat to:

  • Enable paste blocking (Exam Mode)
  • Disable paste blocking
  • Toggle paste blocking

Settings

Go to Settings → Advanced Settings Editor → AntiCheat Exam Extension to configure:

  • enabled — turn blocking on or off (default: true)
  • message — customize the message shown when paste is blocked

How It Works

The extension registers event listeners at the document level using capture phase (addEventListener(..., true)), which means it intercepts events before JupyterLab's editor (CodeMirror) can process them. It checks whether the target element is inside a code cell and, if so, cancels the event and displays a notification.

Limitations

  • A technically advanced student could open browser DevTools and disable the extension from the console. For high-stakes exams, combine with browser lockdown tools.
  • Does not block paste in Markdown cells (intentional — Markdown editing is not exam content).

License

MIT

Metadata

Release files for jupyterlab-anticheat 1.0.6

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

Source distribution (sdist)

Source distribution for jupyterlab-anticheat 1.0.6
File Size Uploaded Provenance Actions
jupyterlab_anticheat-1.0.6.tar.gz 118.0 kB Without provenance Details for jupyterlab_anticheat-1.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-anticheat 1.0.6
File Interpreter ABI Platform Actions
jupyterlab_anticheat-1.0.6-py3-none-any.whl Python 3 none any Details for jupyterlab_anticheat-1.0.6-py3-none-any.whl

Total release size: 136.0 kB

Release files / jupyterlab_anticheat-1.0.6.tar.gz

Download URL jupyterlab_anticheat-1.0.6.tar.gz
Size 118.0 kB
Tags Source
SHA-256 checksum
How to use checksums
59d42d8677cfc81254580dfbbe8d1f427d6e9d377724449e518b07eea760c881
BLAKE2b-256 checksum
How to use checksums
6befe40beca4464653a4360fed78fdc5ae3bffb4611cd620dbb65e09b44c8f19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / jupyterlab_anticheat-1.0.6-py3-none-any.whl

Download URL jupyterlab_anticheat-1.0.6-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de3d17c3fce876ad92942c67b69c24c5ad6fda3bb9875613b85180a671cbe683
BLAKE2b-256 checksum
How to use checksums
bf9466a58b49e2594c0c550b3b85ce6f1f74e3b1db1052c47d049c516e9db3c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Security for jupyterlab-anticheat 1.0.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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