This document presents a brief, high-level overview of pybugsnag’s primary features.
pybugsnag is a python wrapper for the Bugsnag Data Access API
# install pybugsnag pip install pybugsnag
from pybugsnag import BugsnagDataClient from pybugsnag.models import Error client = BugsnagDataClient("$AUTH_TOKEN") organization = client.organizations # first organization for the auth token project = organization.projects # first project in the organization project.get_errors( sort=Error.Sort.LAST_SEEN, direction=Error.Sort.Direction.DESCENDING, per_page=30, ) # gets errors for this project, project.get_trend_buckets() # data for a trend histogram
The following is pulled directly from the Bugsnag Data Client API specifications.
The time window for rate limits is 1 minute.
Requests that have not been denied due to rate limiting will have the following response headers:
- X-RateLimit-Limit: number of requests allowed per time window
- X-RateLimit-Remaining: number of requests remaining in the current time window
Requests that have been rate limited will return a 429 response code and have a Retry-After response header to indicate how long you should wait (in seconds) before trying again.