LSS4PY
LSS4PY is a Python 3.14 Lean Six Sigma utility library for the current Yellow Belt slice.
It is focused on repeatable process metrics and yield calculations.
It is not yet a full SPC, capability, simulation, or deliverables platform.
Stable Today
The current stable surface is intentionally small.
It includes these public functions:
lead_timewait_timeprocess_cycle_efficiencytakt_timecreated_to_booked_yieldbooked_to_completed_yieldrolled_yield
It also includes a process-model IR for integrating FLO-derived process structure with observed tabular data:
ProcessModelIRProcessStepIRProcessEdgeIRMetricBindingsIRLeadTimeBindingIRStageBindingsIRMetricSemanticsIREventLogBindingsIR
It also includes stable event-log contracts and helpers:
EventLogvalidate_event_logmap_process
Topology-aware event-log calculations are also part of the current stable surface for:
lead_timewait_timeprocess_cycle_efficiency
Contract
LSS4PY works from two inputs.
The FLO side supplies a normalized process model IR.
The pandas side supplies observed process data.
That is the current implementation contract. Proposed ADR-0004 replaces the concrete pandas dependency with a tested dataframe-neutral boundary before the analytical surface expands.
LSS4PY calculates metrics from both.
The IR defines process structure and semantic bindings.
The DataFrame provides timestamps, stage outcomes, and measured times.
Explicit per-call metric arguments override IR bindings.
Parallel paths and rework loops are represented in the IR with explicit graph edges.
Event-log rows are the canonical observed data shape for process-model-aware metrics.
The default elapsed-time interpretation for parallel paths is critical_path semantics.
An alternate sum_all_branches interpretation is also supported for event-log-aware calculations.
Quick Start
Requirements
- Python 3.14
uv
Install
uv sync
Verify
uv run python -c "import lss4py; print('lss4py ready')"
Example
import pandas as pd
from lss4py import (
LeadTimeBindingIR,
MetricBindingsIR,
MetricSemanticsIR,
ProcessEdgeIR,
ProcessModelIR,
ProcessStepIR,
StageBindingsIR,
created_to_booked_yield,
lead_time,
process_cycle_efficiency,
rolled_yield,
wait_time,
)
process_model = ProcessModelIR(
name="Client intake",
steps=[
ProcessStepIR(
id="review",
name="Review",
cycle_time_column="review_hours",
value_classification="non_value_add",
),
ProcessStepIR(
id="approve",
name="Approve",
cycle_time_column="approval_hours",
value_classification="value_add",
),
],
edges=[
ProcessEdgeIR(source_step_id="review", target_step_id="approve", kind="sequence"),
ProcessEdgeIR(source_step_id="approve", target_step_id="review", kind="rework"),
],
bindings=MetricBindingsIR(
lead_time=LeadTimeBindingIR(
start_column="created_at",
end_column="completed_at",
),
stages=StageBindingsIR(
created="created",
booked="booked",
completed="completed",
),
),
metric_semantics=MetricSemanticsIR(parallel_timing="critical_path"),
)
data = pd.DataFrame(
{
"created_at": ["2026-01-01T08:00:00", "2026-01-02T09:00:00"],
"completed_at": ["2026-01-01T18:00:00", "2026-01-02T15:00:00"],
"review_hours": [2.0, 1.0],
"approval_hours": [1.0, 2.0],
"created": [1, 1],
"booked": [1, 1],
"completed": [1, 0],
}
)
lead = lead_time(data, process_model=process_model)
wait = wait_time(data, process_model=process_model)
pce = process_cycle_efficiency(data, process_model=process_model)
created_booked = created_to_booked_yield(data, process_model=process_model)
rolled = rolled_yield(data, process_model=process_model)
API Summary
Basic Process Metrics
lead_time(data, ..., process_model=None)returns per-row elapsed time from start to end timestamps.wait_time(data, ..., process_model=None)returns per-row lead time minus active cycle time.process_cycle_efficiency(data, ..., process_model=None)returns per-row value-add time divided by lead time.takt_time(available_time=..., customer_demand=...)returns a scalar pace target.
Yield Helpers
created_to_booked_yield(data, ..., process_model=None)returns first-stage conversion yield.booked_to_completed_yield(data, ..., process_model=None)returns second-stage conversion yield.rolled_yield(data, ..., process_model=None)returns end-to-end rolled yield.
Process Model IR
ProcessModelIRis the top-level FLO-compatible process model contract.ProcessStepIRdefines step ids, names, cycle-time columns, and value classification.ProcessEdgeIRdefines sequence, parallel split, parallel join, and rework edges.MetricBindingsIRgroups lead-time and stage-column bindings.MetricSemanticsIRdefines process-metric interpretation defaults such as parallel timing.EventLogBindingsIRdefines the case, step, start, and end columns for event-log-aware metrics.
Event-Log Contracts And Helpers
EventLogrepresents the observed event-log contract used by stable event-log helpers.validate_event_log(event_log)returns machine-readable warnings for empty logs or missing required event fields.map_process(event_log)returns discovered activity nodes and transition counts from observed event order.
Topology-Aware Event-Log Metrics
- event-log-aware
lead_timeuses per-case event boundaries from observed rows. - event-log-aware
wait_timesupports branch-aware elapsed work from explicit parallel edges. - event-log-aware
process_cycle_efficiencysupports value-add calculations across parallel and rework-aware event logs. - repeated step occurrences require explicit rework edges in the process model.
- overlapping step intervals require explicit parallel edges in the process model.
What Is Not Stable Yet
These areas are not part of the stable book-facing API today:
- capability analysis
- SPC reporting
- simulation workflows
- bottleneck workflows
- before/after comparison workflows
- reporting bundles
- automatic
.floparsing insidelss4py
The IR and metric engine now support stable topology-aware event-log calculations for the current Yellow Belt slice.
Broader graph-driven semantics outside that slice are still future work.
Development Status
This repository is in active pre-1.0 development.
The Yellow Belt metric surface above is the current stable target.
Other modules and ideas in the repository should be treated as experimental, internal, or future work unless they are explicitly listed in the stable surface.
Validation
The repository is currently validated with:
uv lock --checkuv run --locked lint-importsuv syncuv run --locked ruff check .uv run --locked pyrightuv run --locked xenon --max-absolute B --max-modules A --max-average A src/lss4py testsuv run --locked pytestuv run --locked vulture src tests --min-confidence 80
Install both local hook stages with:
uv run pre-commit install --install-hooks --hook-type pre-commit --hook-type pre-push
The pre-commit stage runs Ruff on changed files and the locked test suite without coverage.
The pre-push stage and CI run the full locked repository-wide gates.
CI additionally enforces 95% coverage on the current supported slice and runs a built-wheel smoke test outside the source tree.
Roadmap
The governed roadmap targets a complete Yellow Belt MVP at v0.3, Green Belt capability at v0.5, Black Belt capability at v0.7, and a feature-frozen polish phase at v0.9 before the stable 1.0 contract.
See the documentation index for user requirements, technical
requirements, ADRs, and governance conventions. R SixSigma coverage is tracked
separately in the compatibility matrix.
License
LSS4PY is available under the MIT License.
See CONTRIBUTING.md to contribute and SECURITY.md to report a vulnerability privately.
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 lss4py-0.1.0.tar.gz.
File metadata
- Download URL: lss4py-0.1.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18cfe556ca41ff3a32d245ef459f8ee408ba2faba0ba0973762e13511dd7893c
|
|
| MD5 |
192332f6e98990e43a7d4f6cffab1642
|
|
| BLAKE2b-256 |
32af952e0d9231635346fa11f96123581b214a5c71b9c666eddc6238f9983e64
|
Provenance
The following attestation bundles were made for lss4py-0.1.0.tar.gz:
Publisher:
release.yml on shanewilkins/lss4py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lss4py-0.1.0.tar.gz -
Subject digest:
18cfe556ca41ff3a32d245ef459f8ee408ba2faba0ba0973762e13511dd7893c - Sigstore transparency entry: 2399449701
- Sigstore integration time:
-
Permalink:
shanewilkins/lss4py@af1f0ce0ff1bae952b0823bf21456955d2376f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/shanewilkins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@af1f0ce0ff1bae952b0823bf21456955d2376f5c -
Trigger Event:
release
-
Statement type:
File details
Details for the file lss4py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lss4py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4183380620ade3c110ebb382b712d351b3245a059f0b468e22e8e142893f8af
|
|
| MD5 |
16ea350e03fee4cc852258d0d55cc0b6
|
|
| BLAKE2b-256 |
f55deb1b0647309bed01ed3f84b236a4970d55b2f681847888f70388bca918f2
|
Provenance
The following attestation bundles were made for lss4py-0.1.0-py3-none-any.whl:
Publisher:
release.yml on shanewilkins/lss4py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lss4py-0.1.0-py3-none-any.whl -
Subject digest:
c4183380620ade3c110ebb382b712d351b3245a059f0b468e22e8e142893f8af - Sigstore transparency entry: 2399449753
- Sigstore integration time:
-
Permalink:
shanewilkins/lss4py@af1f0ce0ff1bae952b0823bf21456955d2376f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/shanewilkins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@af1f0ce0ff1bae952b0823bf21456955d2376f5c -
Trigger Event:
release
-
Statement type: