Kerberos user management sample flask code. You could re-use this code for Kerberos host management as well @app.route('/krb/user/', methods=['GET', 'DELETE', 'POST', 'PUT']) def userAPI(username): result_code = "success" result_message = "ok" if request.method == 'GET': cmd = "/usr/bin/kadmin -p account/admin -w ADminP@ssW0rd -q \"getprinc " + username + "\"" elif request.method == 'POST': cmd ..