Python api piece