find solution to imlement api-handling with python