Skip to main content

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 meaningful name whenever you try and save a notebook called 'Untitled'.

You find this annoying? Don't worry, you can disable this one.

Usage example_gif - see github repo

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 Scientists keep their notebooks clean, a reasonably flexible yet conventional template may help. Moreover, the template is also a productivity tool, speeding up common setup, such as library import and configuration.

Quick start

We assume Jupyter notebook is already installed in your environment. However, even if this is not tha case, don't worry: jupytemplate declares Jupyter notebook as a dependency, thus any package manager, like pip, will install it for you.

It is not mandatory, but you can install the full set of Jupyter extensions.

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user

Feel free to visit their 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, as shown below.

Configuration screenshot 1 - see github repo

Configuration screenshot 2- see github repo

Editing the template

Template location can be found by running:

import jupytemplate
print(jupytemplate.get_template_path())

Of course, you can edit the template as you like, in order to adapt it to your own needs, but keep 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:

Metadata

Release files for jupytemplate 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupytemplate 0.3.0
File Size Uploaded Provenance Actions
jupytemplate-0.3.0.tar.gz 24.4 kB Without provenance Details for jupytemplate-0.3.0.tar.gz

Release files / jupytemplate-0.3.0.tar.gz

Download URL jupytemplate-0.3.0.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a6ba34d4e136674920d4731c46cbbaea5b4982b618c7de3cec9ae6196b4dfa7b
BLAKE2b-256 checksum
How to use checksums
76d6746e9fc557358eb8aba243208b9db927a469acb1cdd4449d703f41ed419b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.3

Security for jupytemplate 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page