Update python partnership library

@lopatin I make a bunch of changes in several commits, please review.  Thanks!
Would it make sense to validate the notification url and thresholds in this situation also?