Flow metrics library for kanban forecasting
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
6# quando
Kanban flow metrics for Python. Answers the eternal question: "quando vai ficar pronto?" — when will it be done?
quando computes Service Level Expectations (SLE) from your team's historical delivery data: given a list of work item start/end dates, it tells you at what percentile a single item will be finished.
This library was built to support the talk "Quando vai ficar pronto?", which walks through SLE and Monte Carlo forecasting for software teams using kanban.
Installation
pip install quando-forecast
Quick start
from datetime import date
from quando import Quando
items = [
(date(2024, 1, 1), date(2024, 1, 3)), # 3 days
(date(2024, 1, 5), date(2024, 1, 5)), # 1 day (same-day delivery)
(date(2024, 1, 8), date(2024, 1, 14)), # 7 days
# ... more historical items
]
w = Quando(items)
w.percentile(85) # → int: 85% of items finish within this many days
w.percentile(50) # → int: median lead time
sle = w.sle() # → SLE(p50=..., p85=..., p95=...)
sle.p85 # → int: named access
p50, p85, p95 = sle # or unpack as a tuple
Loading from a CSV
w = Quando.from_csv("delivery_data.csv")
The CSV is expected to have started_at and finished_at columns (header is optional). Both date (2024-01-15) and datetime (2024-01-15 09:00:00) formats are accepted.
started_at,finished_at
2024-01-01,2024-01-03
2024-01-05,2024-01-05
2024-01-08,2024-01-14
Custom column names are supported:
w = Quando.from_csv("export.csv", started_col="start_date", finished_col="end_date")
API
Quando(items)
Constructs a flow dataset from a sequence of (start, end) tuples.
startandendcan bedatetime.dateordatetime.datetime(time component is ignored)- Raises
ValueErrorifitemsis empty or any tuple hasend < start
Quando.from_csv(path, *, started_col="started_at", finished_col="finished_at")
Constructs from a CSV file. Handles mixed date/datetime formats and drops unparseable rows.
.lead_times -> list[int]
The computed lead time in calendar days for each item (end - start + 1, so a same-day item = 1).
.percentile(p: float) -> int
Returns the p-th percentile of the lead time distribution, ceiling-rounded. p is 0–100 (e.g. 85, not 0.85).
.sle() -> SLE
Returns an SLE(p50, p85, p95) named tuple — the three standard confidence thresholds for a kanban SLE commitment. Can be unpacked or accessed by name.
What is SLE?
A Service Level Expectation is a probabilistic commitment: "X% of our work items finish within N days."
"Our SLE is 7 days @ 85% confidence"
→ 85% of items in our history finished in 7 days or fewer.
P85 is the recommended default for external commitments: it gives a 15% error rate by design, which is honest and achievable. P50 (median) is useful internally; P95 is for high-stakes items.
Related
- quando-vai-ficar-pronto — the companion talk and Jupyter notebook that demonstrates SLE and Monte Carlo forecasting end-to-end
License
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 quando_forecast-0.1.0.tar.gz.
File metadata
- Download URL: quando_forecast-0.1.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c407a3efc3bdc6476ab60d4bb5195d18df28a7988b5f0d763e43e5f89021992
|
|
| MD5 |
12aa7a90be11c49daa4649d632a3fe16
|
|
| BLAKE2b-256 |
1eacda6105c9fc85ff510ae89c68c0b14c0e61fdda0a4b3650a6ef9b356b0006
|
Provenance
The following attestation bundles were made for quando_forecast-0.1.0.tar.gz:
Publisher:
publish.yml on rodbv/quando
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quando_forecast-0.1.0.tar.gz -
Subject digest:
1c407a3efc3bdc6476ab60d4bb5195d18df28a7988b5f0d763e43e5f89021992 - Sigstore transparency entry: 1395687805
- Sigstore integration time:
-
Permalink:
rodbv/quando@245396892b31ddb57aaf5a29d034908364d2280f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rodbv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@245396892b31ddb57aaf5a29d034908364d2280f -
Trigger Event:
release
-
Statement type:
File details
Details for the file quando_forecast-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quando_forecast-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.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 |
a0213db9bd6b8b1bdf4b0a06b38b981017ebc2047770d25f64cce883ae6ee2de
|
|
| MD5 |
79908decfd069a07485583b8a5856f27
|
|
| BLAKE2b-256 |
14a4a90c5817d296773236e6a16476fec432af8d9ccb05783e59accb7ebb9449
|
Provenance
The following attestation bundles were made for quando_forecast-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on rodbv/quando
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quando_forecast-0.1.0-py3-none-any.whl -
Subject digest:
a0213db9bd6b8b1bdf4b0a06b38b981017ebc2047770d25f64cce883ae6ee2de - Sigstore transparency entry: 1395687816
- Sigstore integration time:
-
Permalink:
rodbv/quando@245396892b31ddb57aaf5a29d034908364d2280f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rodbv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@245396892b31ddb57aaf5a29d034908364d2280f -
Trigger Event:
release
-
Statement type: