added python api-test script from fred