Skip to main content

No project description provided

Project description

docs/source/images/bluprint_logo.png

Bluprint

https://github.com/igor-sb/bluprint/actions/workflows/ci.yml/badge.svg https://codecov.io/gh/igor-sb/bluprint/graph/badge.svg?token=U44L2ASEIG PyPI - License PyPI - Version

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_conf 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()

  • R/Python packages are version-locked with renv and uv

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bluprint-0.2.0.tar.gz (457.2 kB view details)

Uploaded Source

Built Distribution

bluprint-0.2.0-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file bluprint-0.2.0.tar.gz.

File metadata

  • Download URL: bluprint-0.2.0.tar.gz
  • Upload date:
  • Size: 457.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for bluprint-0.2.0.tar.gz
Algorithm Hash digest
SHA256 081f27ca920de1cd778ab5c02079fff89d64922e8bcb415121bcb00553f8346e
MD5 c31d8981cbe88e47ffd50041d2084981
BLAKE2b-256 580644e748c51c24a8b834fd3623b6d030ae02f1b646318f020dbd2ff2720538

See more details on using hashes here.

File details

Details for the file bluprint-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bluprint-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for bluprint-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58be3bf0c2c61f0d4643820c60ecf5df620a4d5bcaf1279cb74a9ac9bdd7f6d4
MD5 55e27c426740a919f00f0c2719821fcc
BLAKE2b-256 c8efcaa3b1df16e272dbc6cc3a76c8868df7dc4d837dd66ffacdc47bbfc4f631

See more details on using hashes here.

Supported by

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