API heart

How to get the heart rate - not max or min - via API within a python program?

Has anyone an idea?