Py42

Latest version: v1.27.3

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 14

1.11.1

Not secure
Changed

- `sdk.cases.create()` now raises `Py42CaseNameExistsError` when the case name already
exists in the system.

- `sdk.cases.create()` now raises `Py42DescriptionLimitExceededError` when the description
is more than 250 characters.

- `sdk.cases.update()` now raises `Py42DescriptionLimitExceededError` when the description
is more than 250 characters.

- `sdk.cases.file_events.add()` now raises `Py42CaseAlreadyHasEventError` when the same
event is added to a case more than once.

- `sdk.cases.file_events.add()` now raises `Py42UpdateClosedCaseError` when the event is
added to a closed case.

- `sdk.cases.file_events.delete()` now raises `Py42UpdateClosedCaseError` when the event
is deleted from a closed case.

1.11.0

Not secure
Changed

- `sdk.legalhold.get_custodians_page()` now raises `Py42LegalHoldCriteriaMissingError` when missing one of the required options.

Added

- Python 3.9 support.

- `sdk.cases` methods:
- `sdk.cases.create()`
- `sdk.cases.get_all()`
- `sdk.cases.get_page()`
- `sdk.cases.export_summary()`
- `sdk.cases.get()`
- `sdk.case.update()`

- `sdk.cases.file_events` methods for managing file events associated with a given case:
- `sdk.cases.file_events.add()`
- `sdk.cases.file_events.delete()`
- `sdk.cases.file_events.get()`
- `sdk.cases.file_events.get_all()`

1.10.1

Not secure
Fixed

- Bug where trying to retrieve device settings for a device on legal holds caused an exception to be raised.

1.10.0

Not secure
Fixed

- Bug that occurs when trying to add a user to an alert rule who had never been on any detection list before.

- Bug where an empty destination list in a device's backup set broke creation of DeviceSettings objects for that device.

- Bug where all 401 Unauthorized error responses were being raised as Py42MFARequired exceptions.

- Bug where requests to storage nodes were only using single-use tokens for authentication, causing many extraneous requests.

Added

- `sdk.archive.stream_to_device()` for pushing a restore to another device.

- Added new exception `Py42CloudAliasLimitExceededError` to throw if `add_cloud_alias()` throws `400` and body contains
reason `Cloud usernames must be less than or equal to`.

- Added new exception `Py42UserNotOnListError` to throw error if `remove()` throws `404` when the user is not on a detection list.

- Added new exception `Py42TooManyRequestsError` to raise errors with 429 HTTP status code.

- Added new method `sdk.securitydata.search_all_file_events()` to retrieve all events when events are more than 10,000.

- Added new custom exception `sdk.exceptions.Py42InvalidPageToken` that gets raised when the page token from
`sdk.securitydata.search_all_file_events()` causes a specific bad request error.

1.9.0

Not secure
Changed

- The following methods now support string timestamp formats (`yyyy-MM-dd HH:MM:SS`) as well as a `datetime` instance:
- `sdk.auditlogs.get_page()`, arguments `begin_time` and `end_time`.
- `sdk.auditlogs.get_all()`, arguments `begin_time` and `end_time`.
- `sdk.securitydata.get_all_plan_security_events()`, arguments `min_timestamp` and `max_timestamp`.
- `sdk.securitydata.get_all_user_security_events()`, arguments `min_timestamp` and `max_timestamp`.

- The `departure_date` parameter for methods:
- `sdk.detectionlists.departing_employee.add()`
- `sdk.detectionlists.departing_employee.update_departure_date()`
now support a `datetime` instance.

- The following methods on timestamp-based query filters (e.g. `EventTimestamp`, `DateObserved`) now support string timestamp format (`yyyy-MM-dd HH:MM:SS`) as well as a `datetime` instance:
- `on_or_before()`
- `or_or_after()`
- `in_range()`

Removed

- Removed faulty `within_the_last()` method from `sdk.queries.alerts.filters.alert_filter.DateObserved`.

Added
- Added new exception `Py42UserAlreadyExistsError` to throw if `create_user()` throws `500` and body contains
`USER_DUPLICATE`

- Added `Py42ActiveLegalHoldError` exception when attempting to deactivate a user or device in an active legal hold.
- `py42.sdk.users.deactivate()`
- `py42.sdk.devices.deactivate()`

- Added additional user-adjustable setting for security events page size:
- `py42.settings.security_events_per_page`

- Page page_number and page_size parameters for saved search queries:
- `py42.securitydata.savedsearches.get_query()`
- `py42.securitydata.savedsearches.execute()`

- `sdk.alerts.update_state()` method to update state.

- Support for two-factor authentication in `sdk.from_local_account()`

- `OrgSettings` and `DeviceSettings` classes to help with Org and Device setting management.
- `sdk.orgs.get_settings(org_id)` now returns an instance of `OrgSettings` which can be used to view
existing Org settings and modify them by passing the updated `OrgSettings` object to `sdk.orgs.update_settings()`
- `sdk.devices.get_settings(org_id)` now returns an instance of `DeviceSettings` which can be used to view
existing Device settings and modify them by passing the updated `DeviceSettings` object to `sdk.devices.update_settings()`

- `sdk.auditlogs` method:
- `sdk.auditlogs.get_page()`
- `sdk.auditlogs.get_all()`

Changed

- `py42.sdk.queries.query_filter.filter_attributes` renamed to `py42.util.get_attribute_keys_from_class`

1.8.2

Not secure
Fixed

- Corrected an issue that caused `sdk.detectionlists.departing_employee.get_all()`
and `sdk.detectionslists.high_risk_employee.get_all()` to only return the first page (first 100) records. This same issue also caused other `get_all_X()` methods to only return the first page if the requested `page_size` was less than `settings.items_per_page`.

Added

- `page_size` parameter to:
- `sdk.detectionlists.departing_employee.get_all()`
- `sdk.detectionlists.high_rsik_employee.get_all()`

Page 6 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.