A pipe-first language for data and ML work, running on top of Python
Project description
Peppermint
A pipe-first language for data and ML work, running on top of Python. Every operation is a pipeline step and errors propagate automatically. The Python ecosystem (pandas, scikit-learn, or your own code) is accessible from within the language.
Install
pip install peppermint-lang
Run
pep file.pep # run a file
pep # interactive REPL
Examples
Transform
load("employees.csv")
|> filter(it.age > 18)
|> add(tax: it.salary * 0.2)
|> sort(by: "salary", dir: "desc")
|> print()
Each step prints a live summary:
|> filter → List 843 rows × 5 cols (157 dropped)
|> add → List 843 rows × 6 cols (+tax)
|> sort → List 843 rows × 6 cols
Aggregate
load("sales.csv")
|> collapse(by: "region",
avg: mean(col.revenue),
n: count()
)
|> sort(by: "avg", dir: "desc")
|> print()
Top N per group
load("sales.csv")
|> each(by: "region",
|> add(rank: rank(col.revenue, dir: "desc"))
|> filter(it.rank <= 3)
|> drop("rank")
)
|> print()
ML pipeline
use ml
use viz
use env
load("data.csv")
|> ml.embed(
on: "text", out: "embedding",
source: "deepinfra", model: "Qwen/Qwen3-Embedding-4B",
apikey: env.get("DEEPINFRA_TOKEN"))
|> ml.kmeans(k: 2..8, on: "embedding", out: "cluster")
|> ml.umap(dims: 2, on: "embedding", out: "umap")
|> viz.scatter(x: "umap1", y: "umap2", color: "cluster", label: "text", display: ["labels", "legend"])
Error handling
result = load("data.csv")
|> filter(it.score > 0.5)
match(result,
Ok(data): data |> print(),
Err(msg): print(msg)
)
See docs/language.md for the full reference and examples/ for more.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peppermint_lang-0.3.2.tar.gz.
File metadata
- Download URL: peppermint_lang-0.3.2.tar.gz
- Upload date:
- Size: 40.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7db24c1d61d3fef9db09922f5b0a7a892aac7287ba8eb8db9b1d15c523232d64
|
|
| MD5 |
761e3d0f2712ac07a4ce18549da81c5a
|
|
| BLAKE2b-256 |
0af9b0f2a7e65ba143e1a83f426259538156d0f31b3bad7eb008881317e5aa27
|
Provenance
The following attestation bundles were made for peppermint_lang-0.3.2.tar.gz:
Publisher:
workflow.yml on chayapatr/peppermint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peppermint_lang-0.3.2.tar.gz -
Subject digest:
7db24c1d61d3fef9db09922f5b0a7a892aac7287ba8eb8db9b1d15c523232d64 - Sigstore transparency entry: 1628382649
- Sigstore integration time:
-
Permalink:
chayapatr/peppermint@4b15ec5279abe4466edee5e1f907fbcf045c191e -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/chayapatr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4b15ec5279abe4466edee5e1f907fbcf045c191e -
Trigger Event:
push
-
Statement type:
File details
Details for the file peppermint_lang-0.3.2-py3-none-any.whl.
File metadata
- Download URL: peppermint_lang-0.3.2-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2839b84bd8b6e8e7a6a9f4502ef4c2421478788d10701af0f8ee82fd10fd4006
|
|
| MD5 |
a98dcef06b88afe02bb0441e6a3ce04c
|
|
| BLAKE2b-256 |
a30a1d9dd7c8669510d51a40e86bf4ccd8802c51e7c09638fa011f7d0a8f6243
|
Provenance
The following attestation bundles were made for peppermint_lang-0.3.2-py3-none-any.whl:
Publisher:
workflow.yml on chayapatr/peppermint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peppermint_lang-0.3.2-py3-none-any.whl -
Subject digest:
2839b84bd8b6e8e7a6a9f4502ef4c2421478788d10701af0f8ee82fd10fd4006 - Sigstore transparency entry: 1628382708
- Sigstore integration time:
-
Permalink:
chayapatr/peppermint@4b15ec5279abe4466edee5e1f907fbcf045c191e -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/chayapatr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4b15ec5279abe4466edee5e1f907fbcf045c191e -
Trigger Event:
push
-
Statement type: