Skip to main content

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.

Metadata

Release files for clincalc 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clincalc 0.4.0
File Size Uploaded Provenance Actions
clincalc-0.4.0.tar.gz 834.8 kB With provenance Details for clincalc-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for clincalc 0.4.0
File Actions
clincalc-0.4.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for clincalc-0.4.0-cp39-abi3-win_amd64.whl
clincalc-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for clincalc-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
clincalc-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for clincalc-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
clincalc-0.4.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for clincalc-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
clincalc-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for clincalc-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 10.4 MB

Release files / clincalc-0.4.0.tar.gz

Download URL clincalc-0.4.0.tar.gz
Size 834.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e60058051dd11a920011faa83604a54582962ddcdbb42145c56485f74660c3af
BLAKE2b-256 checksum
How to use checksums
f89ad8d2d605ace03f22a7da9038dd2f745f1918da495022e52bf0a58a53b887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release files / clincalc-0.4.0-cp39-abi3-win_amd64.whl

Download URL clincalc-0.4.0-cp39-abi3-win_amd64.whl
Size 2.0 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8d73a91e1d2a171e9e84caefd6e30d920d5cb1ee99cd9c0ff00c4b807356fb5a
BLAKE2b-256 checksum
How to use checksums
56e74c373e76b3a6b06b1ece6ebeb8f135fdc91517470d0233013c9af88a6e76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release files / clincalc-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL clincalc-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.0 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b6542daa0014ebe5085c8a199ede9a2d0e701d722f533211c8607b8a098bbe1f
BLAKE2b-256 checksum
How to use checksums
f22a91dabd99718438e5584865a022c2cfd552a9bf6b12c041d6c8bc7d18183a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release files / clincalc-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL clincalc-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.0 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
4e61dc164e48c301e36f9008275e6242a9319ce2dfbb2b6bc1da324eb5108591
BLAKE2b-256 checksum
How to use checksums
03a0ce0c30e9901ab58df593950e11502e2bbab30bf608c534d0d171c3559822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release files / clincalc-0.4.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL clincalc-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Size 1.8 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2dbcfd891cd6c9d1f812d0792d9bc6e07e2747a69e504fcfc9b25a8d8b1f7311
BLAKE2b-256 checksum
How to use checksums
1c66d17c2dcf1c675bbe70ae152a90855c9e220b854951fce45c335e7bab08eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release files / clincalc-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL clincalc-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.9 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
dd4874ed306ef42d6943e1971ce146997967ce4b9c6a5ccf0afd3f19e226b826
BLAKE2b-256 checksum
How to use checksums
e46ac9cf5bdaf4368f825fbf355d339770ad2083bf2de939e1741358a7854b30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Security for clincalc 0.4.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for clincalc-0.4.0.tar.gz

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 Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page