slowapi icon indicating copy to clipboard operation
slowapi copied to clipboard

Feature request: Return remaining API calls

Open pwichmann opened this issue 3 years ago • 1 comments

What an amazing, easy to use tool this is! Is it possible to return the number of remaining API calls (per decorator) to the user of the API? This way the user of the API can better understand how his/her interaction with an app results in API calls and how many are left.

pwichmann avatar Mar 09 '22 00:03 pwichmann

There are headers injected to the response that provide some of that information. It's enabled within the __init__ of the Limiter, just set to false by default.

twcurrie avatar Mar 09 '22 00:03 twcurrie