Instead of using getattr here, it probably makes more sense to just use requests.request below/