Skip to main content

IPython extensions used for teaching

Project description

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 notebooks demonstrating how to use the 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, 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 node, customizes the %%javascript 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 node. 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 html extension 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 UML (Unified Modeling Language), 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.

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

classroom_extensions-0.0.2.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

classroom_extensions-0.0.2-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file classroom_extensions-0.0.2.tar.gz.

File metadata

  • Download URL: classroom_extensions-0.0.2.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for classroom_extensions-0.0.2.tar.gz
Algorithm Hash digest
SHA256 22dedc7506b635922af5f9f0714ea1c223c1ccc82eaee537aa12c97325d22bcd
MD5 d56844547c0a9351e081e4299321ded6
BLAKE2b-256 daef30f01d785be7893f2af263b1fb4451380c252fe9521aa5042dc8d60b6796

See more details on using hashes here.

File details

Details for the file classroom_extensions-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for classroom_extensions-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37229f12bee2b00fd8a8fe26802e6663367d4fdf76e7729762c73c27701a4f20
MD5 eea0fb285de993e9335c7d9cc5d96415
BLAKE2b-256 d00e65fb1bd109ceb472aab1f72adf974e55b43747e79fef894c2639a149f106

See more details on using hashes here.

Supported by

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