Initial commit of Python implementation