There does not seem to be any permissively licenced drill hole compositing software in python. dhcomp is a MIT licenced open source one function utility that (currently) composites geophysical data to a set of intervals.
Installation
pip install dhcomp
https://www.fractalgeoanalytics.com/articles/2023-01-13-compositing-drill-hole-intervals/