Bluprint
Bluprint is a command line utility for creating data science project templates, allowing R and Jupyter notebooks seamless access to configuration, data and shared code in this type of structure:
my_project
├── conf
│ └── data.yaml # YAML config with data paths
├── data # Store smaller data
│ ├── emailed
│ │ └── messy.xlsx
│ └── user_processed.csv
├── notebooks # Notebooks
│ └── process.ipynb
└── my_project # Local Python package used by my_project
└── shared_code.py
Configuration conf/data.yaml contains either absolute paths or paths relative to the my_project/data/:
emailed:
messy: 'emailed/messy.xlsx'
user:
processed: 'user_processed.csv'
Notebooks can then easily import myproject.shared_code and file paths:
from bluprint.config import load_data_yaml
data = load_data_yaml() # By default loads conf/data.yaml
# Load data in a portable manner
import pandas as pd
messy_df = pd.read_xlsx(data.emailed.messy)
extras_df = pd.read_xlsx(data.remote.extras)
# Load shared code functions as Python modules
# in any notebook anywhere in this project.
from my_project.shared_code import transform_data
transformed_df = transform_data(messy_df, extras_df)
# Save output
transformed_df.to_csv(data.user.processed)
For a working demonstration of a shareable project see https://github.com/igor-sb/bluprint-demo/.
Features
Write portable notebooks by separating code from configuration - file paths are in YAML configs, loaded with load_data_yaml() and load_config_yaml()
Import packaged code as Python modules
Packaged code can be shared across different projects with pip install
Use both Python and R notebooks in a single project (see Python/R projects)
Share entire projects by copying a project directory and running uv venv && uv sync
Works with common data science IDEs (RStudio, VSCode), notebook tools for linting (nbqa), notebook version control (nbstripout) or workflows (Ploomber)
Documentation
Full documentation available at: https://igor-sb.github.io/bluprint/.
Installation
Install uv 0.4.12 which is a last confirmed working version and run uv tool install bluprint.
For R projects, renv R package is required for creating Bluprint projects with R support.
References
Bluprint integrates:
Bluprint is inspired by these resources:
License
Bluprint is released under MIT license.
Metadata
Release files for bluprint 0.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bluprint-0.4.5.tar.gz | 418.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bluprint-0.4.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 440.0 kB
Release files / bluprint-0.4.5.tar.gz
| Download URL | bluprint-0.4.5.tar.gz |
|---|---|
| Size | 418.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba51ae5a534ad30c037e7dd62ceb0bd58291d0e22e679f663267a40a67b5a036
|
|
BLAKE2b-256 checksum How to use checksums |
471cdba9e614520d99c39e968519db625f0302c5445771961a4b2049cf1455cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / bluprint-0.4.5-py3-none-any.whl
| Download URL | bluprint-0.4.5-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f14419a3d2ab1bacbc24e3ac9058953b409a7cac67753b22f6b3add25c57cf7
|
|
BLAKE2b-256 checksum How to use checksums |
480339bee398d841835eb6dfcdc3f095d6fe4715f3f121b39312b518523bff1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|