Skip to main content

A framework built on top of Ploomber that allows code-first definition of pipelines.

Project description

Code-First Pipelines

A framework built on top of Ploomber that allows code-first definition of pipelines. No YAML needed!

Installation

To get the minimum code needed to use the pipelines, install it from PyPI:

pip install code-first-pipelines

Usage

Pipelines

import pandas as pd
from sklearn import datasets
from cf_pipelines import Pipeline

iris_pipeline = Pipeline("My Cool Pipeline")

@iris_pipeline.step("Data ingestion")
def data_ingestion():
    d = datasets.load_iris()
    df = pd.DataFrame(d["data"])
    df.columns = d["feature_names"]
    df["target"] = d["target"]
    return {"raw_data.csv": df}

iris_pipeline.run()

See the tutorial notebook for a more comprehensive example.

ML Pipelines

import pandas as pd
from sklearn import datasets
from cf_pipelines.ml import MLPipeline

iris_pipeline = MLPipeline("My Cool Pipeline")

@iris_pipeline.data_ingestion
def data_ingestion():
    d = datasets.load_iris()
    df = pd.DataFrame(d["data"])
    df.columns = d["feature_names"]
    df["target"] = d["target"]
    return {"raw_data.csv": df}

iris_pipeline.run()

See the tutorial notebook for a more comprehensive example.

Getting started with a template

Once installed, you can create a new pipeline template by running:

pipelines new [pipeline name]

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

code-first-pipelines-0.9.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

code_first_pipelines-0.9.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file code-first-pipelines-0.9.0.tar.gz.

File metadata

  • Download URL: code-first-pipelines-0.9.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.14 Linux/5.15.0-1020-azure

File hashes

Hashes for code-first-pipelines-0.9.0.tar.gz
Algorithm Hash digest
SHA256 c989304befedf5abd2cf4c8adc72752faedab0e6d2c453a5afa316bc1d5ec8bb
MD5 6ce368c36213d4d6bc03c61c584cd263
BLAKE2b-256 f4b315497ddb61e3da6b3b5c221d203269adaea4a2f819f5756b774ac3e588bf

See more details on using hashes here.

File details

Details for the file code_first_pipelines-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for code_first_pipelines-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c206affbf5373bc5731b8d5ec42b06f7b245a3bb74e8505ee488f740a5372a5a
MD5 f89ff104fb03fd147cec6ad4ce4136df
BLAKE2b-256 14b88a01151e5e0aa57285565055920aa2a90aba97d9ed90daca8e970553546f

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