I've been using the unofficial Python interface from Andy Casey for a bit. A few weeks ago I was able to use his code to get ratelimits on my API token but now I can't get them using the same code. I can query the database and get the data I want but the ratelimits are just empty strings. I don't really know what I'm doing, but I've tried to inspect HTTP response headers using the Python requests package and I can't find anything like X-RateLimit in API query responses.
I've done
import requests
r = requests.get("https://api.adsabs.harvard.edu/v1/search/query?q=q", headers={'Authorization': 'Bearer ' + token})
I've been using the unofficial Python interface from Andy Casey for a bit. A few weeks ago I was able to use his code to get ratelimits on my API token but now I can't get them using the same code. I can query the database and get the data I want but the ratelimits are just empty strings. I don't really know what I'm doing, but I've tried to inspect HTTP response headers using the Python requests package and I can't find anything like X-RateLimit in API query responses.
I've done
and the resulting
r.headers
data isHow should I get my ratelimits in Python?