added python api wrapper

Tried again, sorry for the inconvenience.