The calculation functions within the Digital Growth Charts API are powered by a self-contained Python package extracted out into a separate repository and published on PyPi (the Python Package Index). This enables the centile calculation functions to be used in other programs.
To add the
rcpchgrowth package to your project, install via
pip install rcpchgrowth
We have taken the slightly unusual step of licensing the python package under the GNU Affero General Public License version 3, which may restrict commercial reuse models. This is because all the 'heavy lifting' of the API server depends on this package. We wanted to protect from 'unofficial' commercial competing APIs, at least until the model of Royal College-delivered APIs is established and secure.
If this licensing issue restricts your valid, patient-benefiting, non-profit use-case, then please do reach out to us. We will consider dual-license options or some other arrangement that helps you.
We'd be interested to hear from people who are using the RCPCHGrowth Python package, so we can learn more about the use-cases and how we might continue to improve the package. Please do create issues on our GitHub repo, or discuss the package in the dGC Forums
If you want to contribute to the project, please read the section on Contributing.