MyToy: a minimal Python package

This repository contains a minimal, toy Python package with a few files as illustration for students of how to lay out their code to meet minimal Python packaging requirements.

It has a single source directory (mytoy) with an file and one "implementation" file ( as well as a few tests in mytoy/tests.

In addition to this it includes some basic infrastructure: LICENSE, requirements.txt, and .gitignore files.

This is more or less the absolute minimum for a "real" python package that can be installed from source, tested and experimented with on Binder.

The only docs included are this file - a larger package would have a proper docs directory and associated Sphinx/JupyterBook build.


This project can currently only be installed from source, via

pip install .

or for a development installation via

pip install -e .


You can run the project test suite via

pytest mytoy