Changelog
2025-07-08: New features - Version 3.0.0
Breaking Change: the method
ApiClient.normalize_params
no longer modifies parameters. The implementation of it that previously did, which was meant only for the child classRestApiV2Client
, has been migrated to that class as an override.New Features:
New method
OAuthTokenClient.refresh_client
: instantiates and returns aRestApiV2Client
instance and auto-refreshes the access tokenNew method
RestApiV2Client.iter_history
: iterates through large historical data sets that exceed the hard limit of classic paginationNew method
RestApiV2Client.get_total
: returns the total number of matching records in a classic pagination endpointExpanded coverage of type hints
Documentantion revisions
Fixes:
Method
RestApiV2Client.rpatch
now fully implemented (it mistakenly was left with no return value in previous versions)Mutable default values in optional keyword arguments have been replaced with
None
.
2025-06-23: Add a new OAuth token exchange client class - Version 2.3.0
This version introduces a new client class for obtaining OAuth tokens using code grant / token refresh or for a scoped app.
2025-06-03: Add py.typed marker file - Version 2.2.0
Add a
py.typed
marker file so that type checkers recognize thatpagerduty
supports type checking.
2025-05-19: Bug fixes for iter_cursor and HTTP 204 response handling - Version 2.1.2
Allow
try_decoding
to returnNone
for empty input; fixes GitHub issue #46.Non-breaking changes to
RestApiV2Client.iter_cursor
, to fix GitHub issue #45:It now uses the
default_page_size
client setting as thelimit
parameter.It accepts a
page_size
parameter that can override said default (andparams
can also override this default), similar toiter_all
.When called indirectly via
iter_all
, theitem_hook
keyword argument is passed through to it, along withpage_size
.
2025-05-14: Bug fix - Version 2.1.1
The “main” method in the entry script is expected to receive no arguments, but in v2.1.0, it requires one positional argument.
2025-05-13: Command line interface - Version 2.1.0
Add a basic command line interface for Events API v2, for feature parity with the legacy library that is used in the Monit Integration Guide.
2025-04-08: Multi-file refactor - Version 2.0.0
This release introduces major structural changes to the module and how it is built and tested. These changes were made for long-term maintainability of the codebase. Previously, it was all contained within a monolithic .py
file (with a single Python script for all unit tests); now it is organized into smaller, appropriately-named Python files.
Some lesser changes are also included:
The docstrings for the
submit
andsend_change_event
methods ofEventsApiV2Client
have been updated to reflect how they are expected to always returnNone
; this was causing Airflow build failures.The default user agent header has been updated: the prefix has been changed from
pagerduty
topython-pagerduty
.The version number
pagerduty.__version__
is now maintained inpyproject.toml
and discovered through package metadata introspection at import time. In Python versions prior to 3.8, the version will be2.*.*
because the newimportlib
feature required for it is unavailable.
2025-01-02: Migrate from PDPYRAS - Version 1.0.0
BREAKING CHANGE: class names have changed from what they were in
pdpyras
; see: PDPYRAS Migration GuideThe REST API client now supports new status page, event orchestrations, custom incident fields, OAuth delegations and alert grouping settings APIs.