Fixed CURL API insert for Python 3