Add custom rate to python backend

commit is written on top of #18, so it includes that diff until that pull request is merged.

(so merge that one first)