Python Overview¶
The Python package exposes derived-variable functions for eager polars.Series
workflows and lazy polars.Expr / polars.LazyFrame workflows.
The implementation has three layers:
- Derived-variable modules define one eager kernel and one lazy expression builder per function.
compehndly.apidiscoversFUNCTION_SPECandFUNCTION_SPECSfromcompehndly.derived_variables.- Public helpers dispatch to the correct eager or lazy path.
Public Helpers¶
Use these imports for most Python workflows:
from compehndly import apply, get_map_fn, list_functions, with_derived_column
list_functions()returns the registered derived-variable names.apply(function_name, ...)applies a function topolars.Seriesorpolars.Exprinputs.with_derived_column(...)adds an output column to apolars.DataFrameorpolars.LazyFrame.get_map_fn(function_name, **params)builds a stable callable for externalmap_batchesstyle integrations.
Stable path-addressable wrappers also live in:
compehndly.entrypoints