The PyASCVD package implements the American College of Cardiology's Risk Estimator Plus Equation in python. It's a mixed Rust and Python module, leveraging the speed of Rust for equation implementation and the flexibility of Python for ease of use.
Requirements:
- Python 3.7 to 3.12 on a Silicon Mac / Linux system (more compatibility coming soon)
To install the package, pip install using:
pip install pypascvd
import pyascvd
pyascvd.ascvd(
age=40,
sex="male",
race="white",
systolic_blood_pressure=120,
total_cholesterol=213,
hdl_cholesterol=50,
diabetes=False,
smoker=False,
on_hypertension_treatment=False,
)
Coming soon
This is a mixed Rust and Python module.
The rust source code is used to implement the equations. This is a lower level language that requires compilation prior to being run -- and thus is many times faster than pure python.
The rust source code is located in the /src directory.
The python source is located in the /pyascvd directory.
Unit tests are implemented in the /tests directory using slash.