Here is how you can create an ML engine directly from Python code:
server.ml_engines.create( 'ml_engine_name', 'ml_engine_handler', connection_data={'api_key': '111'} )