Replicate services from old bottle implementation in flask app