Python Implementation of Pact.