No project description provided
Project description
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 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.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file bluprint-0.4.1.tar.gz
.
File metadata
- Download URL: bluprint-0.4.1.tar.gz
- Upload date:
- Size: 417.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d0f52397eefb3e2f87e5bc38cdd2d27d33b63ea051b6bbfec155b678120ff0d |
|
MD5 | 323d2287e1849ec9a67c1723d638e2f3 |
|
BLAKE2b-256 | de3a96a831c558848ba720754dc35c11a4cdb76785099025e04b9e3c6302c5d5 |
File details
Details for the file bluprint-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: bluprint-0.4.1-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e17dc498004cb1cb952df430e494f5d775bfebb931c8bea6be64915791e64e6 |
|
MD5 | 45c5db266368abb3c3ffcdc95d08e0ba |
|
BLAKE2b-256 | 4e8de6b3bb2e7cca6c395cbd5251514651b507ab7c82be837c0cefb0cf6f2385 |