Releases: pfptcommunity/psat-api-python
Release list
PSAT API Python v4.0.0
v4.0.0 is the first Klarient-based release of psat-api. This is a major release because the package has been rebuilt around a typed resource model while continuing to target the public PSAT v0.3.0 reporting API.
The previous public release line was v3.1.0, which removed older PSAT v0.1.0/v0.2.0 endpoint support and targeted the v0.3.0 API. This release continues that direction with a cleaner typed client implementation. See the
previous release context in the GitHub releases page: https://github.com/pfptcommunity/psat-api-python/releases
Highlights
-
Rebuilt the client on top of Klarient.
-
Models the PSAT v0.3.0 reporting API as a typed resource tree.
-
Provides typed report resources for:
- CyberStrength
- Enrollments
- PhishAlarm
- Phishing
- Phishing Extended
- Training
- Users
-
Provides typed report rows and nested attributes objects for response data.
-
Provides typed filter objects for each report type.
-
Supports paging through Klarient Page objects with direct access to page metadata such as page_size, current_page_number, last_page_number, record_count, and navigation links.
-
Supports automatic page iteration through pageable resources.
-
Supports custom user tags through enable_user_tags() and with_user_tag().
-
Supports network configuration through RequestsOptions, including timeout, proxy, and SSL verification settings.
-
Includes endpoint-focused examples for each report area.
Breaking Changes
v4.0.0 is a major release and is not guaranteed to be backward compatible with the 3.x client API. The package has been rebuilt on Klarient, which changes the public object model, pagination model, response wrappers, filtering
objects, and network configuration surface.
Known compatibility changes include:
- Requires Python 3.11 or newer.
- Requires klarient[requests]>=0.3.0.
- The client is now modeled as a typed resource tree.
- Report responses are Klarient Page objects.
- Pagination metadata is exposed through properties such as record_count, page_size, current_page_number, last_page_number, self_link, and next_link.
- Network settings now use RequestsOptions and RequestsTimeout.
- Filters and response objects have been remodeled around typed request and response classes.
Recommended migration approach: review the updated README and examples before upgrading production code from 3.x to 4.x.
Install
pip install psat-api
Basic Usage
from psat import Region
from psat.v0_3_0 import PSATClient
client = PSATClient(Region.US, "")
page = client.reports.phishing.retrieve()
print(page.record_count)
for row in page:
print(row.attributes.user_email_address)
print(row.attributes.campaign_name)
Full Changelog: v3.1.0...v4.0.0
Proofpoint Security Awareness Training Python API Package
Proofpoint Security Awareness Training Python API Package that supports all versions of the PSAT API.
Limitations
There are currently no known limitations.
For more information, please see: https://proofpoint.securityeducation.com/api/reporting/documentation/#api-Introduction-Introduction
Changes
- Restrict to Python 3.9 and higher
- Support for proxies was added
- Proofpoint notified they will be ending support of the v0.1.0 endpoints on September 30, 2023. Proofpoint support also confirmed v0.2.0 was never meant to be a public release. In version 3.1.0 and higher of this library, v0.1.0 and v0.2.0 have been removed accordingly.
- Getter and setter functions were replaced with properties
Full Changelog: v3.0.2...v3.1.0
Proofpoint Security Awareness Training Python API Package
Proofpoint Security Awareness Training Python API Package that supports all versions of the PSAT API.
Limitations
There are currently no known limitations.
For more information, please see: https://proofpoint.securityeducation.com/api/reporting/documentation/#api-Introduction-Introduction
Fixes:
- Restrict to Python 3.9 and higher
- Fixed code formatting
- Fixed documentation
Proofpoint Security Awareness Training Python API Package
Proofpoint Security Awareness Training Python API Package that supports all versions of the PSAT API.
Limitations
There are currently no known limitations.
For more information, please see: https://proofpoint.securityeducation.com/api/reporting/documentation/#api-Introduction-Introduction