Implementation of singly API for Python