Please see http://vallis.github.io/libstempo.
Note that the master branch has now been switched to version 2.X of libstempo, which has a new (and better!) API. Look at the demo notebook for a description. The old API is still available in the libstempo1 branch.