python jira client and rate limit

48 views Asked by At

I am currently working on a script to do some bulk operations on our company jira instance, that saves plenty of time compared to doing it via the UI.

Unfortunately there is a very strict rate limiting in place. To not run into the limit accidentially, I have to wait 3 minutes after every 3 requests.

It could be more if I could read how to retrieve the response headers by jira, which contain the current rate limit details.

Unfortunately I didn't find a documentation yet how to read the rate limit headers (or even respect the ratelimit out of the box) via the python jira client (https://jira.readthedocs.io/).

Any idea if it's possible to catch the headers of the jira requests in any way?

1

There are 1 answers

0
mdoar On

https://jira.readthedocs.io/examples.html#headers suggests to me that you might be able to get at the info in JIRA.options.headers ?