Patch ModelsΒΆ
- class PatchTitle(*, title: str, title_id: str, released: str, hosts_patched: int, missing_patch: int, latest_version: str, completion_percent: float = 0.0, total_hosts: int = 0, install_label: list[Label] | None = [], homebrew_cask: list[CaskMatch] | None = [])[source]ΒΆ
Represents patch software title information retrieved via API calls.
- Variables:
title β The name of the patch title.
title_id β The
softwareTitleIdof the patch title from Jamf API response.released β The release date of the patch title.
hosts_patched β The number of hosts that have applied the patch.
missing_patch β The number of hosts missing the patch.
latest_version β The latest version available for the software title.
completion_percent β The percentage of hosts that have applied the patch.
total_hosts β The total number of hosts.
install_label β The corresponding InstallomatorClient label(s) if available.
homebrew_cask β The corresponding Homebrew Cask coverage stub(s) if available. Populated only when Homebrew matching is enabled; an independent signal from
install_label.
- Parameters:
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- classmethod cast_as_string(value: int | str) str[source]ΒΆ
Ensures the
title_idproperty is always a string, regardless of type in API response payload.
- calculate_completion_percent()[source]ΒΆ
Calculates the completion percentage and total hosts of a
PatchTitleobject based on hosts patched and missing patch.See
get_summaries()
Patch DeviceΒΆ
- class PatchDevice(*, computerName: str, deviceId: str, username: str, operatingSystemVersion: str, lastContactTime: datetime, buildingName: str | None = None, departmentName: str | None = None, siteName: str | None = None, version: str)[source]ΒΆ
Represents device information from Jamf Pro patch management data.
- Variables:
computer_name β The name of the computer.
device_id β The unique device identifier from Jamf Pro.
username β The username associated with the device.
operating_system_version β The macOS version running on the device.
last_contact_time β The last time the device contacted Jamf Pro.
building_name β The building assignment for the device, if any.
department_name β The department assignment for the device, if any.
site_name β The site assignment for the device, if any.
version β The patch software version installed on the device.
- Parameters:
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.