python-api: initial commit