Skip to main content

Jupyter extension to support templates

Project description

Jupyter template

Lifecycle: experimental GitHub PyPI - Python Version PyPI Build Status GitHub issues Downloads Downloads Say Thanks!

A simple template for jupyter notebooks.

The extension sets up any new Jupyter Notebook with a conventional and general-purpose template to shape Data Science analysis.

The template includes conventional sections, like Data Import, Processing and References, as well as code to perform common operations, like importing and configuring charting libraries.

Moreover, it prompts for a notebook name.

Quite annoyingly.

But don't worry, you can disable this one.

Motivation

Jupyter notebooks are awesome tools: they enable fast prototyping and ease result sharing. However, due to their flexibility, they are prone to be abused.

In order to help Data Scientist keep their notebooks clean, a reasonably flexible yet conventional template may help. Moreover, such a template may be also a productivity tool, which speeds up common setup, such as library import.

Quick start

It is not mandatory, but it is strongly recommended to install nbextension_configurator. Alternatively, and even more conveniently, you can install the full set of Jupyter extensions.

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user

Feel free to visit the repository for more information.

Now you can install the package:

pip install jupytemplate

Then, you have to install the javascript files from the Python package in a conventional jupyter directory:

jupyter nbextension install --py jupytemplate --sys-prefix

Finally, you may want to enable the extension:

jupyter nbextension enable jupytemplate/main --sys-prefix

You can easily enable, disable or configure the extension by using the nbextension_configurator server extension.

Changing the template

Template location can be found by running:

import jupytemplate
print(jupytemplate.get_template_path())

Of course, you can modify the template as you like, do not modify the file name template.ipynb.
After editing the template, run:

jupyter nbextension install --py jupytemplate --sys-prefix
jupyter nbextension enable jupytemplate/main --sys-prefix

to make changes effective.

References

Please consider reading the following resources for a more comprehensive understanding:

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

jupytemplate-0.1.tar.gz (23.8 kB view hashes)

Uploaded Source

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