AssessLite (Python)
Test what your analysis depends on.
Structural assumption assessment for causal analysis — the native Python interface to
the AssessLite core specification v0.1. The R package (assesslite on r-universe) implements
the same spec; audit records written by either conform to the same JSON Schema.
Every causal result borrows strength across units, places, or times, licensed by invariance assumptions usually left implicit inside exchangeability or i.i.d. sampling. AssessLite makes them explicit, attacks them, and records what survived — with three-way verdicts (stable / unstable / not resolvable at this n), because every stability gate is a bright line on a noisy estimate.
Install
pip install assesslite
Pure numpy + pandas; the Cox (Breslow partial likelihood) and GLM (IRLS) estimators are
implemented in-package, so there is no heavy or version-fragile stats dependency.
Use
from assesslite import StructuralAudit
assessment = StructuralAudit(
data=lung_registry, # pandas DataFrame
outcome=("time", "status"), # Cox; or "y" for a GLM
exposure="adherence",
covariates=["age", "sex", "stage"],
cluster="hospital",
time="diagnosis_year",
subgroups=["stage"],
unit="patient",
)
assessment.assume(
"cluster_exchangeability",
rationale="hospitals follow the same national guideline; assumed provisionally",
licenses="one pooled effect across hospitals; transport to a hospital outside the sample",
)
assessment.test(
["unit_permutation", "cluster_holdout", "temporal_split", "subgroup_stability"]
).decide(abstain_if={"estimate_sign_changes": True})
print(assessment)
audit = assessment.export_audit("audit.json") # durable audit record (also returned as a dict)
assessment.render_report("report.html") # self-contained HTML report
Product, process, output
- AssessLite is the product.
- an assessment — a
StructuralAudit— is the process: open it, declare its ledger, attack it, decide. - an audit record is the durable output:
export_audit()returns it as a dict and writes it as schema-conforming JSON.
Estimators
("time", "status")→ Cox proportional hazards (Breslow ties), log hazard ratio.- binary 0/1 outcome → logistic GLM, log odds ratio.
- continuous outcome → linear GLM, linear coefficient.
The Cox implementation reproduces R's coxph(ties="breslow") coefficients and standard errors
exactly.
See examples/worked_example.py for a complete run on simulated multicentre data.
Apache License 2.0.
Release files for assesslite 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| assesslite-0.4.0.tar.gz | 39.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| assesslite-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 79.8 kB
Release files / assesslite-0.4.0.tar.gz
| Download URL | assesslite-0.4.0.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14cbab1c649e89c722c175f27694169f387f796c0b4cefb475b911417563d26e
|
|
BLAKE2b-256 checksum How to use checksums |
ce0a2101a7a4ce204810846da879fe209c645fcefd24c5c3e1b5cdb93b37257c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency logRelease files / assesslite-0.4.0-py3-none-any.whl
| Download URL | assesslite-0.4.0-py3-none-any.whl |
|---|---|
| Size | 40.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90b27632af67ce1b2032bd9cb6456939a4096bc9a0bc6920d97157d99bf2e52a
|
|
BLAKE2b-256 checksum How to use checksums |
e285a8066b87e7bb817f2f03237608d3135db59d699f1fb41286d48d42b5dc24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency log