clincalc (Python)
Python bindings for the clincalc Rust engine - open, auditable clinical calculators.
Install
clincalc supports CPython 3.9 and later.
python -m pip install clincalc
With pandas support for batch computation:
python -m pip install "clincalc[pandas]"
Quick start
import clincalc
# Calculate BMI
result = clincalc.calculate("bmi", {"weight_kg": 70, "height_cm": 175})
assert result["result"] == 22.9
print(result["calculator"], result["result"])
# bmi 22.9
# Discover available calculators
print([c["name"] for c in clincalc.list_calculators()])
# Inspect a calculator's input schema
print(clincalc.get_schema("egfr"))
# Get a fillable input template
print(clincalc.get_template("egfr"))
You can verify the installation directly from a terminal:
python -c "import clincalc; result = clincalc.calculate('bmi', {'weight_kg': 70, 'height_cm': 175}); print(result['result'])"
The command prints 22.9.
Pandas batch helper
import pandas as pd
import clincalc
patients = pd.DataFrame({
"weight_kg": [70, 90],
"height_cm": [175, 180],
})
results = clincalc.batch("bmi", patients)
print(results[["result", "interpretation"]])
When the DataFrame column names differ from the calculator field names, pass a mapping:
patients = pd.DataFrame({"weight": [70], "height": [175]})
results = clincalc.batch(
"bmi",
patients,
input_columns={"weight_kg": "weight", "height_cm": "height"},
)
License
Original clincalc code is licensed under AGPL-3.0-or-later. The QRISK3 and QFracture modules retain ClinRisk's LGPL-3.0-or-later licence. Wheels and source distributions include the applicable licence texts and third-party notices.
The ASRS-v1.1 six-question scorer accepts coded adult responses covering the past six months from the authorised form, reports the classic dichotomous and alternative continuous methods separately, and carries the required attribution to New York University and the President and Fellows of Harvard College in every result. Current source and releases from 0.3.0 onward do not distribute questionnaire text or the separately licensed 18-question checklist; legacy 0.2.2 source artifacts did include the checklist and should not be used.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 clincalc-0.3.4.tar.gz.
File metadata
- Download URL: clincalc-0.3.4.tar.gz
- Upload date:
- Size: 775.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66d2eb638776ab69e20109dca6563bfcadf50fecaae2998d9c1fb499f3abe542
|
|
| MD5 |
7aad8e84e23e549001c367ad41fe56cc
|
|
| BLAKE2b-256 |
7ad2876ff98699e3398ae24b1a25e7093126471e129fab1615e7d78b9fb9214b
|
Provenance
The following attestation bundles were made for clincalc-0.3.4.tar.gz:
Publisher:
publish-python.yml on pacharanero/clincalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clincalc-0.3.4.tar.gz -
Subject digest:
66d2eb638776ab69e20109dca6563bfcadf50fecaae2998d9c1fb499f3abe542 - Sigstore transparency entry: 2817835104
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.3.4-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: clincalc-0.3.4-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3d99206691a8277e33f88018d90b3e186059224c9f56f3ba4f12a0d62f33670
|
|
| MD5 |
c75643e2fdce792295e737e24aab10c2
|
|
| BLAKE2b-256 |
3b8e6cc626b810baab0bdf94c9f4a53f3d79c12d00a008b99a1b274d108d6aa6
|
Provenance
The following attestation bundles were made for clincalc-0.3.4-cp39-abi3-win_amd64.whl:
Publisher:
publish-python.yml on pacharanero/clincalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clincalc-0.3.4-cp39-abi3-win_amd64.whl -
Subject digest:
e3d99206691a8277e33f88018d90b3e186059224c9f56f3ba4f12a0d62f33670 - Sigstore transparency entry: 2817835332
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.3.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: clincalc-0.3.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbaefbdc3b305d58806adc23d09a70f446eb4aaab7ab71ead9a7ab770d63a18e
|
|
| MD5 |
8586c5b0f41cbef1e7532786986e38f8
|
|
| BLAKE2b-256 |
c650699067568575245d5c3e0355121fbab2b3c838f21e4bdcda0e99e2e12ef6
|
Provenance
The following attestation bundles were made for clincalc-0.3.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish-python.yml on pacharanero/clincalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clincalc-0.3.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
dbaefbdc3b305d58806adc23d09a70f446eb4aaab7ab71ead9a7ab770d63a18e - Sigstore transparency entry: 2817835225
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.3.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: clincalc-0.3.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4798972d21d25c44b6a4228bf4a335eacecfd586078ed04d90ac9168556acb1
|
|
| MD5 |
59f342aec37e9b05d8d8255057a5e4a4
|
|
| BLAKE2b-256 |
71c45d0b045bcf2df92cf83fbb31235afc8ece17683b4dccef2bb11bba72c7b8
|
Provenance
The following attestation bundles were made for clincalc-0.3.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-python.yml on pacharanero/clincalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clincalc-0.3.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
b4798972d21d25c44b6a4228bf4a335eacecfd586078ed04d90ac9168556acb1 - Sigstore transparency entry: 2817835144
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.3.4-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: clincalc-0.3.4-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9940462a06cbc17c2c7fdece5e992eea334ce0aac60bb34c23bd4dd6cc7c98b8
|
|
| MD5 |
74c7d9d492bd93de20ac584d5619d698
|
|
| BLAKE2b-256 |
9c76fa104e5602870b7702a6efbbf382e8983b398f2ef8391ca5fbb7fffbb742
|
Provenance
The following attestation bundles were made for clincalc-0.3.4-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
publish-python.yml on pacharanero/clincalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clincalc-0.3.4-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
9940462a06cbc17c2c7fdece5e992eea334ce0aac60bb34c23bd4dd6cc7c98b8 - Sigstore transparency entry: 2817835276
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.3.4-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: clincalc-0.3.4-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8640e4971aae86b57e84a77ff253ccca0a05ab56b36bf28e947a193014d1aadc
|
|
| MD5 |
17a271e6542aa62bf8ec5d0798e21171
|
|
| BLAKE2b-256 |
b8f406885d7ded6c786dfcdf694b643d478f64809b7ffcdd629c74cb0d69ec57
|
Provenance
The following attestation bundles were made for clincalc-0.3.4-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish-python.yml on pacharanero/clincalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clincalc-0.3.4-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
8640e4971aae86b57e84a77ff253ccca0a05ab56b36bf28e947a193014d1aadc - Sigstore transparency entry: 2817835402
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c4b5e0d485460704f73fa4d4c7e435303c540137 -
Trigger Event:
workflow_dispatch
-
Statement type: