Rest API rate limiting

Hey there,

is there a way to do rate limiting (e.g. only one request from user xy / IP xy per hour) on a default doctype rest api (e.g. OneUp)

If not: can someone refer me how to implement custom python with a whitelisted method in my app.

Thank you guys