Open, auditable clinical calculators - Python bindings for the clincalc Rust engine
Project description
clincalc (Python)
Python bindings for the clincalc Rust engine - open, auditable clinical calculators.
Install
pip install clincalc
With pandas support for batch computation:
pip install clincalc[pandas]
Quick start
import clincalc
# Discover available calculators
print([c["name"] for c in clincalc.list_calculators()])
# Calculate BMI
result = clincalc.calculate("bmi", {"weight_kg": 70, "height_cm": 175})
print(result["result"]) # 22.857142857...
print(result["interpretation"]) # "normal"
# Inspect a calculator's input schema
print(clincalc.get_schema("egfr"))
# Get a fillable input template
print(clincalc.get_template("egfr"))
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
AGPL-3.0-or-later.
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 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.2.2.tar.gz.
File metadata
- Download URL: clincalc-0.2.2.tar.gz
- Upload date:
- Size: 511.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbd3ca626f8bf8b8c3258dad08bf92cfb108491b0476905a282f8e53a538c695
|
|
| MD5 |
8a380287ae783b7d084af4c07b7cd964
|
|
| BLAKE2b-256 |
76f302f419536b6b773ccd8ee8ab29449691100fdd2fdd06ee7ae591650bb24d
|
Provenance
The following attestation bundles were made for clincalc-0.2.2.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.2.2.tar.gz -
Subject digest:
fbd3ca626f8bf8b8c3258dad08bf92cfb108491b0476905a282f8e53a538c695 - Sigstore transparency entry: 2211611417
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.2.2-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: clincalc-0.2.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
011549ecbb4db8071fb9aaa6da1bec29f275e54119f8ea228e520d7181360f90
|
|
| MD5 |
33f7607b9d4e430a791cae208763c6cb
|
|
| BLAKE2b-256 |
54bbdc20acfce0d31d3d6bf8af1a4879e2948d80c5b566228041d22d4c9b8431
|
Provenance
The following attestation bundles were made for clincalc-0.2.2-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.2.2-cp39-abi3-win_amd64.whl -
Subject digest:
011549ecbb4db8071fb9aaa6da1bec29f275e54119f8ea228e520d7181360f90 - Sigstore transparency entry: 2211611538
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: clincalc-0.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70627e8d0524350367697a60fbfdff431c2091ef14d8307d923d5681f68d95aa
|
|
| MD5 |
46b043733f1cac2cfe606d9538cd54f1
|
|
| BLAKE2b-256 |
0d86d6f38bbc1da0566150a888661c6f532fb1ed197082d12d78f0344adc0bce
|
Provenance
The following attestation bundles were made for clincalc-0.2.2-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.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
70627e8d0524350367697a60fbfdff431c2091ef14d8307d923d5681f68d95aa - Sigstore transparency entry: 2211611459
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: clincalc-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c868f625e24941fc9e04d53eefa13948f06105b838ed7db98377f554af62323
|
|
| MD5 |
f3b49468ca291dd327b231963187a530
|
|
| BLAKE2b-256 |
52ff8839ccc7f369c6f5f828d263eab5c4e811c9add7574e278851be919dc5d1
|
Provenance
The following attestation bundles were made for clincalc-0.2.2-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.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
8c868f625e24941fc9e04d53eefa13948f06105b838ed7db98377f554af62323 - Sigstore transparency entry: 2211611571
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.2.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: clincalc-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
630f8c85a0f74bdcf0c8244ce32e816b097915ff48d3d5f9fc24ba9e11b337a1
|
|
| MD5 |
f8188fead2efe75e22596be85e1ea3af
|
|
| BLAKE2b-256 |
24d6aeb7a68ca2715f56b9b4ee852e50076865b99ffa032de4136383ad06b951
|
Provenance
The following attestation bundles were made for clincalc-0.2.2-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.2.2-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
630f8c85a0f74bdcf0c8244ce32e816b097915ff48d3d5f9fc24ba9e11b337a1 - Sigstore transparency entry: 2211611491
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clincalc-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: clincalc-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22447899fcbf123e28fc7905c59f740709195a05660ddb362a125c6bd8d03cd4
|
|
| MD5 |
c5d4851aef9c31e1ee00646f06cc909f
|
|
| BLAKE2b-256 |
9e07283fa417fa367f0da665a9baa7c81df26940b3666150152e0bd233f61e20
|
Provenance
The following attestation bundles were made for clincalc-0.2.2-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.2.2-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
22447899fcbf123e28fc7905c59f740709195a05660ddb362a125c6bd8d03cd4 - Sigstore transparency entry: 2211611510
- Sigstore integration time:
-
Permalink:
pacharanero/clincalc@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pacharanero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@2d304b8d5adba84e92a35a0e7638022cbcf168f1 -
Trigger Event:
workflow_dispatch
-
Statement type: