New libstempo API and ipython notebook demo