Skip to main content
https://img.shields.io/badge/code%20style-black-000000.svg https://coveralls.io/repos/github/assuncaomarcos/classroom_extensions/badge.svg?branch=main

IPython Extensions for Teaching

This project provides a set of IPython extensions used for teaching at the Ecole de Technologie Superieure (ETS) of Montreal. The extensions work on Google Colab, and Jupyter notebooks with some effort, and provide a set of magics (e.g., %%sql) while customizing existing ones (e.g., %%javascript) to enable lecturers and students to deploy software frameworks quickly and provide notes with working examples.

The notebooks directory contains a set of Google Colab examples of how to use the IPython extensions.

Installing the Extensions

You can use pip to install the extensions:

pip3 install classroom-extensions

or:

pip3 install git+https://github.com/assuncaomarcos/classroom_extensions.git

Or clone this git repository and load the required extensions from the classroom_extensions package.

MariaDB Magics

Two extensions are available for MariaDB. One extension (mariadb) uses some components of the MariaDB Jupyter Kernel and creates a %%sql cell magic that enables code cells to accept SQL commands that an instance of MariaDB interprets. However, unlike the MariaDB Jupyter Kernel, this extension does not change the IPython kernel and its magics, hence enabling one to continue coding in Python, JavaScript, etc. To ease the creation of notebooks on Google Colab, a second extension (mariadb_install) installs MariaDB and the required libraries to run the first extension without worrying about setting things up.

Server-Side JavaScript

This extension, called web, customizes the %%javascript cell magic to enable executing JavaScript code on the server or container hosting the Jupyter Notebook or on Google Colab. Node.js executes the code provided in a cell whose –target argument receives the value web. It also enables starting long-running Node.js server processes that will listen on given ports without blocking the code cell of the notebook. In addition to executing JavaScript code on the server side, when run on the browser, the magic enables printing the output of the browser’s console in the result section of the code cell.

Custom HTML Magic

The web extension also customizes the %%html magic. After rendering the HTML code inserted in the cell, the extension displays a high-level copy of the browser’s console. This behavior helps in teaching HTML or JavaScript that writes on the console.

PlantUML Magics

PlantUML is a textual Domain-Specific Language (DSL) used for creating diagrams, primarily focused on software engineering and system design. It allows you to express diagrams using a simple and intuitive syntax, which PlantUML transforms into various types of visual diagrams, such as Unified Modeling Language (UML), sequence, class, activity, and more.

MongoDB Shell Magics

The IPython extension %%mongo enables seamless interaction with MongoDB using the mongosh CLI. By simply prefixing a cell with %%mongo, users can execute queries and commands against a MongoDB database directly within their IPython environment or Colab. The extension leverages the power of the mongosh CLI to provide a simple and familiar MongoDB Shell experience, allowing for data exploration, manipulation, and administration tasks.

Metadata

Release files for classroom-extensions 0.0.20

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

Source distribution (sdist)

Source distribution for classroom-extensions 0.0.20
File Size Uploaded Provenance Actions
classroom_extensions-0.0.20.tar.gz 23.3 kB Without provenance Details for classroom_extensions-0.0.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for classroom-extensions 0.0.20
File Interpreter ABI Platform Actions
classroom_extensions-0.0.20-py3-none-any.whl Python 3 none any Details for classroom_extensions-0.0.20-py3-none-any.whl

Total release size: 45.7 kB

Release files / classroom_extensions-0.0.20.tar.gz

Download URL classroom_extensions-0.0.20.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
874801732131a88d534fe8fb018f98e3ad546288cefdc6568cf01ecefbcdbbd6
BLAKE2b-256 checksum
How to use checksums
87d1d9515324c75f927165c16c8d8ae6f4ae6067c2141283de332b1b7f934c49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / classroom_extensions-0.0.20-py3-none-any.whl

Download URL classroom_extensions-0.0.20-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5976871ec90eaafa0c392393194f355b9b3c013507f457611743dd043da43759
BLAKE2b-256 checksum
How to use checksums
a973b0bcc02fe3657d450639a696cba7b5bbdfc50174414d652444f50e331684
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for classroom-extensions 0.0.20

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