This document presents a brief, high-level overview of pybugsnag’s primary features.

pybugsnag is a python wrapper for the Bugsnag Data Access API


Be aware that this uses the Bugsnag Data Access API directly. The Bugsnag Data Access API we use here is Version 2.


# install pybugsnag
pip install pybugsnag

Basic Usage

from pybugsnag import BugsnagDataClient
from pybugsnag.models import Error

client = BugsnagDataClient("$AUTH_TOKEN")
organization = client.organizations[0]  # first organization for the auth token
project = organization.projects[0]  # first project in the organization
)  # gets errors for this project,
project.get_trend_buckets()  # data for a trend histogram

Rate Limiting

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.