Skip to main content

Setup development environment for Jupyter notebooks using UV

Project description

notebookr

PyPI version Python Downloads

A simple tool to set up development environments for Jupyter notebooks. My motivation: people frequently email or file-share Jupyter notebooks, which generally short-circuits my normal flow for recieving, working with, and managing code (usually via GitHub). So, whatʻs the fastest, easiest way to get these loose notebooks into flow?

Using notebookr you can typically cut the setup process down to a very short workflow:

  1. Receive and save Python notebook (.ipynb) file into a working directory
  2. Open a terminal
  3. notebookr SomeNotebook.ipynb

The package runs and creates a project folder with your notebook. At this point, if you are using an IDE, you might:

  1. code some-notebook
  2. source .venv/bin/activate ... or:
  3. .venv\Scripts\activate # windows
  • or - if you are using Jupyter
  1. jupyter lab --notebook-dir=some-notebook

Notebookr will give you

  • A git-initialized, uv-initialized project folder with a name based on the notebook name
  • The uv virtual environment at .venv/, ready to be activated.
  • A simple .gitignore with common patterns, including especially that .venv pattern
  • A pyproject.toml or requirements.txt (optional) file with dependencies read in from the notebook.
  • A notebooks/ folder with your notebook safely tucked away.

Installation

pip install notebookr

or

uv add notebookr

Usage

notebookr path/to/your/notebook.ipynb
notebookr --with_py path/to/your/notebook.ipynb # Also creates a python copy of the notebook

This will:

  1. Create a virtual environment
  2. Generate requirements.txt based on imports in your notebook
  3. Create a .gitignore
  4. Initialize a git repository
  5. Install required packages

Version

0.1.1 added --with_py

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

notebookr-0.1.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notebookr-0.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file notebookr-0.1.2.tar.gz.

File metadata

  • Download URL: notebookr-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for notebookr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ba0dd51ddda60d369b995dca491eaf99cdb4f81f95f2e59dc1f5605c58d22ef1
MD5 fc49c0e9d487f37d41a0ff68b75d2c59
BLAKE2b-256 f87233ab1eb924b318fdffb87e89796f04074e9b989050c44aea0f1ed4b853ae

See more details on using hashes here.

File details

Details for the file notebookr-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: notebookr-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for notebookr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53e7948fcfc0733590fb8701554df4e67317aab28ee156dc3f4d0593855d465b
MD5 7c693167a58f81f70972de35130bc7b3
BLAKE2b-256 44bd2d3cd011006a95c88a49bc60fca19385d7be79f940c48e7c4c826ce82430

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page