Skip to main content

A package to create programming assignments

Project description


This library lets you easily set up programing homeworks

A homework is defined as two files, one with some lines changed according to the language defined by the library (see the docs) and anotherone with the solution. The solution file is encrypted so that the student's do not have it.

The rules are simple instructions that you add as comments to your code. All commands are structured as follows ## homework:[cmd]:[flag]. Here is an example:

## homework:replace:on
# dw = 
# w = 
dw = compute_gradients()
w -= alpha * dw
## homework:replace:off

When parsing the above code, the API will produce a solution file encrypted and
the original code will be replaced with:
## homework:start
dw = 
w = 
## homework:end


First run python make, which returns the encryption key and creates the following files:

  •, which contains some broken lines so that the students can fill the gaps.
  •, which is the encrypted version of the source file (

Now you could send your students and remove the original while keeping the encryption key. This way only people with the key can uncover the solution to the homework, by entering python uncover [encryption key] in the terminal.

Future work

  • Support for defining homeworks out of jupyter notebooks
  • Install the library via pip
  • Perhaps something you want to suggest!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for homework, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size homework-0.0.1-py3-none-any.whl (4.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size homework-0.0.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page