jemorriso / PySBR

MIT License
76 stars 24 forks source link

What's the rate limit? #4

Open franz101 opened 3 years ago

franz101 commented 3 years ago

Maybe we can implement a method to avoid hitting it.

jemorriso commented 3 years ago

I don't know, I just figured that if people are running scripts using this library, somebody will get rate limited / IP banned. I don't know what best practices are regarding internal rate limiting of APIs... there are libraries such as ratelimit which make this easy to implement, just not sure if it's a good idea.

jeremyjpj0916 commented 3 years ago

I think possibly adding a configurable limit (defaults to no limit) would be good. So responsible engineers can set say a x calls per y seconds would be good so they don't have to focus on adding odd system timer pauses with the lib and can let the lib native handle the wait. I would go for like 1 api call every 3 seconds or something of the sort in my personal config.

Then folks who don't use it and abuse the lib/write bad code get IP banned due to their own fault 😆 .

jemorriso commented 3 years ago

Just saw your message. That's a good idea