py interface