To expand on this -- I believe pysam [0] is the official htslib interface for Python.
It's quite good. In addition to providing Python bindings, it also provides extra functionality from within Cython, if you need additional features/speed but don't want to drop all the way down to C.
It's quite good. In addition to providing Python bindings, it also provides extra functionality from within Cython, if you need additional features/speed but don't want to drop all the way down to C.
[0] https://pysam.readthedocs.io/en/latest/