Skip to main content

Synchronous client for Jamf Classic/Pro API

Project description

PyJamfPro

PyPI - Python Version PyPI MIT

PyJamfPro is a basic Python wrapper for synchronous communication with the Jamf Pro (and/or Classic) API. The goal is to simplify the process of communicating with the Jamf Pro device management server API by handling authentication and decoding, allowing you to focus on using the data, not retrieving it.

PyJamfPro is not endorsed, sponsored, or affilitated with Jamf in any way.


Usage

Begin by installing the PyJamfPro module, using pip.

pip install pyjamfpro

In your code, simply import the PyJamfPro module and instantiate a new client object. The constructor requires three arguments:

  1. base_url - the base URL of your Jamf Pro server
  2. username
  3. password
  • Note: The Jamf Pro API uses the standard User Accounts and Groups functionality of Jamf Pro. You will need to ensure the account you use has the proper privilages for the actions you would like to perform with the API.
from pyjamfpro import jamfpro

client = jamfpro.Client('https://example.jamfserver.com', 'username', 'password')

Once you have a client, you can start making synchronous calls to the API.

# returns list of all mobile devices, using the Classic API
devices = client.classic_mobile_devices()

# returns a dictionary of inventory data for the mobile device with ID 1234,
# using the Classic API
device = client.classic_mobile_device_for_id(1234)

# returns a list of all computers, using the Jamf Pro API
computers = client.pro_computers()

Refer to the endpoints.py file for other built-in methods. Additionally, you can use the make_api_request method to access any Jamf API endpoint. Full support for GET, POST, PUT, and DELETE are included.

Contributing

If you have a feature or idea you would like to see added to PyJamPro, please create an issue explaining your idea.

Likewise, if you come across a bug, please create an issue explaining the bug with as much detail as possible.

The Jamf Pro API provides access to a lot of information and, unfortunately, we don't have time to research and implement every endpoint. Please feel free to open a pull request with any additional endpoints you create. We would love to have as many of the core endpoints covered as possible.

License

PyJamPro is released under an MIT license. See LICENSE for more information.

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

pyjamfpro-0.1.3.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

pyjamfpro-0.1.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pyjamfpro-0.1.3.tar.gz.

File metadata

  • Download URL: pyjamfpro-0.1.3.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for pyjamfpro-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f3a5a7a7d11be458d1b05be67c60e146b6dde1e0c5599d7b410c21b0495dfb28
MD5 0f5cedeea917d052d3e3eb90a7f086b5
BLAKE2b-256 f835f1ac377c7d1de68c34191035199e32e9f2ea20c86f974ab3c4d9dd888f01

See more details on using hashes here.

File details

Details for the file pyjamfpro-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyjamfpro-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for pyjamfpro-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f8cebddb3bca6242facedfad5707c9dbb57e7f28fdca01ece9b168cfae846bdf
MD5 22a4afa6f22c8f2df8c51fc4575d9357
BLAKE2b-256 d723aadbc1dbdd5efd618875ff12323bbe220cb9735a97b2420a6199b30b193b

See more details on using hashes here.

Supported by

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