Skip to main content

Python wrapper for Jamf Pro API

Project description

python-jamf

Programmatic Automation, Access & Control of Jamf Pro

python_jamf_logo

Introduction

python-jamf is a Python 3 module to access the Jamf Pro Classic API. The Classic API is the primary tool for programmatic access to data on a Jamf Pro server to allow integrations with other utilities or systems. The concept behind it is to have a class or simply a collection of data (variables) and methods (functions) that maps directly to the API (https://example.com:8443/api).

The python-jamf API class doesn't hide anything from you. It handles the URL requests, authentication, and converts between XML/JSON to Python dictionaries/lists.

The python-jamf module also provides undocumented access to Jamf Admin functionality used for uploading items to Jamf Distribution Points.

python_jamf workflow

Supported Jamf Records

Currently, the python-jamf supports 56 Jamf records like Buildings, Categories, Computers, OSXConfigurationProfiles, and Policies for example.

Each record is a Python object, but they are generic. Objects do not have member variables for Jamf data. All Jamf Pro data is stored as a Python dictionary that is accessed with the data() method. Lists of records and individual records use the same object type as well. So all class names are plural, regardless if they represent a list of objects or one object.

Getting Help

Wiki

For further in-depth details please check out the wiki.

MacAdmin Slack Channel

If you have additional questions, or need more help getting started, post a question on the MacAdmin's Slack jctl channel.

MacAdmin's Slack Logo

Virtual JNUC 2021 Presentation

We will be presenting on python-jamf and jctl at the upcoming Virtual JNUC 2021 on on Thursday, Oct 21 at 1:00 PM - 1:30 PM MDT on Turn 1000 clicks into 1 with python-jamf and jctl

Since 2010, Apple IT, users, and InfoSec leaders from around the world have rallied at the Jamf Nation User Conference (JNUC) for community presentations, deep-dive education sessions, and expert product insights. Focusing on new and better ways to connect, manage and protect Apple devices that simplify workflows for IT and InfoSec and keep users productive. The Virtual JNUC 2021 experience will be October 19 - October 21, 2021, and there will be no cost to attend the online keynote and sessions.

Anyone and everyone is invited to register for the virtual experience.

What are python-jamf and jctl?

Originally, it was a "patch" project that was focused on patch management including installer package management, patch management, including assigning package to patch definition, updating versions, version release branching (i.e. development, testing, production), and scripting and automation. Later, it was split into two projects, python-jamf, which is a python library that connects to a Jamf Pro server using Jamf Pro Classic API, including keychain support for Jamf Pro credentials via keyring python project, support for PyPi to support pip installation and currently supports 56 Jamf Pro record types which will expand in number as the project continues.

The second project, jctl,  is a command-line tool that uses the python-jamf library to select objects to create, delete, print and update. It allows performing Jamf Pro repetitive tasks quickly and provides options not available in the web GUI. It is similar to SQL statements, but far less complex. And recently added PyPi to support pip installation.

Our presentation will cover how it works internally as a simple alternative to the usual cURL usage; usage example of workflows comparing using Jamf Pro web interface vs jctl; and lastly advanced usage and package management including example os subcommands for specific object types, filtering making interacting with the API simple & easy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-jamf-0.6.9.tar.gz (109.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_jamf-0.6.9-py3-none-any.whl (118.5 kB view details)

Uploaded Python 3

File details

Details for the file python-jamf-0.6.9.tar.gz.

File metadata

  • Download URL: python-jamf-0.6.9.tar.gz
  • Upload date:
  • Size: 109.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for python-jamf-0.6.9.tar.gz
Algorithm Hash digest
SHA256 4b93bcab5739f10226a4450f2f9a8c56d175c0f89ea86cc6adb2d1489283a303
MD5 7f6f227c1e799ecb0b22aa52f5fc1756
BLAKE2b-256 404d939ee7add5d27c1c76712d352abe05684f9b9b0096c0168aefd2bc6437d5

See more details on using hashes here.

File details

Details for the file python_jamf-0.6.9-py3-none-any.whl.

File metadata

  • Download URL: python_jamf-0.6.9-py3-none-any.whl
  • Upload date:
  • Size: 118.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for python_jamf-0.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5760bd3d93f79d0e1cd6f0213ebe3044fa09e4270e81743f13b56abca437fe09
MD5 f37b2a7dccbbe6f788cf4d8ba4c40dfd
BLAKE2b-256 aed0be3ee1bb4764149b09e30e6d75c76d2b7c1dda9d6f6c6ba323c7b899c756

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page