Skip to main content

devpipe

Tests

devpipe is a little Python package for caching pipeline results.

Installation

Create and activate a virtual environment and then install devpipe:

pip install devpipe

Basic usage

The following example shows a simple ETL pipeline.

import devpipe as dp

@dp.step
def extract(source: str) -> int:
    return 1

@dp.step
def transform(data: int) -> int:
    return data + 1

@dp.step
def load(data: int) -> bool:
    print(data)
    return True

@dp.pipeline
def etl(source: str) -> None:
    extracted = extract(source=source)
    transformed = transform(data=extracted)
    response = load(data=transformed)
    return response

Results are cached by default based on the decorated function arguments. The following code runs the pipeline twice, but only the first time the pipeline is executed. The second time, the results are loaded from the cache.

res1 = etl(source='source')
res2 = etl(source='source')

assert res1 == res2

You can set a name, force rerun or disable cache both at the step and pipeline levels.

import devpipe as dp

@dp.step(name='My Step', rerun=False, cache=True)
def step_function() -> None:
    return None

@dp.pipeline(name='My Pipeline', rerun=True, cache=True)
def pipeline_function() -> None:
    return step_function()

Check the documentation for more details.

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for devpipe 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devpipe 0.1.0
File Size Uploaded Provenance Actions
devpipe-0.1.0.tar.gz 10.9 kB Without provenance Details for devpipe-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for devpipe 0.1.0
File Interpreter ABI Platform Actions
devpipe-0.1.0-py3-none-any.whl Python 3 none any Details for devpipe-0.1.0-py3-none-any.whl

Total release size: 26.8 kB

Release files / devpipe-0.1.0.tar.gz

Download URL devpipe-0.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dd60b0830a33f4f82732241e1eadfb29a068519f538ed6fa9829f624118a1acd
BLAKE2b-256 checksum
How to use checksums
51ba02780ae4b204df97fbd2c64c3a40b0e5f68e99df919d600af6098292c079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.9.19 Darwin/23.6.0

Release files / devpipe-0.1.0-py3-none-any.whl

Download URL devpipe-0.1.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5407a6cab36a57cb5ef1f7373c8a17e12b9e3dcc350bf9be2092b471f367446d
BLAKE2b-256 checksum
How to use checksums
6402355c81101a7fada17c3d4802e8ba3c9759b2fe32dee17b5db1f6372dd969
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.9.19 Darwin/23.6.0

Security for devpipe 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page