alkymi ⚗️
Alkymi is a pure Python (3.7+) library for describing and executing tasks and pipelines with built-in caching and conditional evaluation based on checksums.
Alkymi is easy to install, simple to use, and has very few dependencies outside of Python's standard library. The code is cross-platform, and allows you to write your pipelines once and deploy to multiple operating systems (tested on Linux, Windows and Mac).
Documentation, including a quickstart guide, is provided here.
Features
- Easily define complex data pipelines as decorated Python functions
- This allows you to run linting, type checking, etc. on your data pipelines
- Return values are automatically cached to disk, regardless of type
- Efficiently checks if pipeline is up-to-date
- Checks if external files have changed, bound functions have changed or if pipeline dependencies have changed
- No domain specific language (DSL) or CLI tool, just regular Python
- Supports caching and conditional evaluation in Jupyter Notebooks
- Cross-platform - works on Linux, Windows and Mac
- Expose recipes as a command-line interface (CLI) using alkymi's Lab type
Sample Usage
For examples of how to use alkymi, see the quickstart guide.
Example code:
import numpy as np
import alkymi as alk
@alk.recipe()
def long_running_task() -> np.ndarray:
# Perform expensive computation here ...
hard_to_compute_result = np.array([42])
# Return value will be automatically cached to disk
return hard_to_compute_result
result = long_running_task.brew() # == np.ndarray([42])
Or one of the examples, e.g. MNIST.
Installation
Install via pip:
pip install --user alkymi
Or see the Installation page.
Testing
After installing, you can run the test suite (use the lint, coverage and type_check recipes to perform those
actions):
python3 labfile.py brew test
License
alkymi is licensed under The MIT License as found in the LICENSE.md file
Upcoming Features
The following features are being considered for future implementation:
- Type annotations propagated from bound functions to recipes
- Support for call/type checking all recipes (e.g. by adding a
checkcommand toLab) - Cache maintenance functionality
Known Issues
- alkymi currently doesn't check custom objects for altered external files when computing cleanliness (e.g.
MyClasshas aself._some_paththat points to a file somewhere outside alkymi's internal cache) alk.foreach()currently only supports enumerable inputs of typeListorDict- Recipes marked
transientwill always be dirty, and thus always require reevaluation. This functionality should be replaced by a proper means of creating recipes that don't cache outputs, but only run when needed to provide inputs for downstream recipes
Metadata
Release files for alkymi 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| alkymi-0.3.1.tar.gz | 32.9 kB | Without provenance | Details for alkymi-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alkymi-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for alkymi-0.3.1-py3-none-any.whl |
Total release size: 69.5 kB
Release files / alkymi-0.3.1.tar.gz
| Download URL | alkymi-0.3.1.tar.gz |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc0164be5b2f82a33713c710c7673b187231cf64cc1721f372fb7f77860fcb1d
|
|
BLAKE2b-256 checksum How to use checksums |
d339ed98ab3a15d66888c04ece40ba45a50d70a4a7fcffc1d1ba46ef5b5b4afe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.9.6 requests/2.31.0 setuptools/59.6.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.10.12
|
Release files / alkymi-0.3.1-py3-none-any.whl
| Download URL | alkymi-0.3.1-py3-none-any.whl |
|---|---|
| Size | 36.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
339acb4c8cb291ab0468b64c2f470fc469f26697a3bf644b84136660feb3fc39
|
|
BLAKE2b-256 checksum How to use checksums |
c2d70202eb35be999a290ac73793c03b19365fa7eedb72e79bae90a7a795fc90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.9.6 requests/2.31.0 setuptools/59.6.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.10.12
|
Security for alkymi 0.3.1
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.