Setup development environment for Jupyter notebooks using UV
Project description
notebookr
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 receiving, 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:
- Receive and save Python notebook (.ipynb) file into a working directory
- Open a terminal
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:
code some-notebooksource .venv/bin/activate... or:.venv\Scripts\activate# windows
- or - if you are using Jupyter
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.tomlorrequirements.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:
- Create a virtual environment
- Generate requirements.txt based on imports in your notebook
- Create a .gitignore
- Initialize a git repository
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notebookr-0.1.3.tar.gz.
File metadata
- Download URL: notebookr-0.1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f126a85f0e7cd2be2cac1d94d7f6deba402ca9d9c72f3f299fa0d924af1ac293
|
|
| MD5 |
1ac6141f9d15a80485f310bf625cbb21
|
|
| BLAKE2b-256 |
4a1c13055df9968b1ba5213ed33184bace86c2a91b3220039eea8c098942e9b3
|
File details
Details for the file notebookr-0.1.3-py3-none-any.whl.
File metadata
- Download URL: notebookr-0.1.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ed58cfd6000feff7878b2d1599425ff36d1159b0f2280323d2167fa0d4b8e00
|
|
| MD5 |
c1be4badb9e4b27268f848f9bab1c960
|
|
| BLAKE2b-256 |
ff23d44087c7f83d6d39849642e5987b8bfeb7458db95f98e959438197d03cdf
|