TeachBooks Python Package#
The TeachBooks Python package is a collection of tools that are used to enhance the Jupyter Book software package by adding features and making customization easier. In general, it is only of interest to user types 4 and 5 when building a book locally. However, it may be important for other users to know what the package does, as it is incorporated in the Deploy Book Workflow and, therefore, any book created from the TeachBooks Template. This raises two important points:
If you are a book user using the TeachBooks Template and/or the Deploy Book Workflow, your book is by default built with the
teachbooks
package, and the way your book is built and features that are included in the book may change automatically when it is updated (these will be non-breaking changes; if not, we will notify our mailing list).If you are using the
jupyter-book
package to build your book, some of the features described in this Manual may not be available to you (i.e., those listed on this page). This will be the case if you are using a setup described in the Jupyter Book Manual, for example, this GitHub workflow.
For those who wish to use the package, it is available on PyPI and can be installed using pip install teachbooks
. As teachbooks
is a wrapper, the package is meant to replace the usage of jupyter-book
commands (although it does indeed add a few new commands to the CLI, e.g., serve
). It is conventionally used in an identical way, as follows:
teachbooks build book
This Manual describes the main features and usage of the package. For those who wish to understand more of hte technical details, note that the implementation the API is is documented at teachbooks.readthedocs.io/.
List of Features#
Items in the list here are currently implemented in the TeachBooks package and described on other pages of this manual:
The package is also set up to handle APA references when using the Draft-Release Workflow (the _ext
subdirectory and its contents are manually copied during the pre-build phase). This will not be necessary once the APA Reference feature is turned into a proper Sphinx extension or Pybtext plugin.