Skip to main content

Asychronous client for Jamf Classic/Pro API

Project description

PyJamfPro

PyPI - Python Version PyPI MIT

PyJamfPro is a basic Python wrapper for asychronous 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 asychronous calls to the API.

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

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

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

Refer to the endpoints.py file for other built-in methods. Additionally, you can use the fetch_data and fetch_paginated_data methods to access any Jamf API endpoint. Basic support for POST has been included through the post_data method.


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.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

pyjamfpro-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjamfpro-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for pyjamfpro-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c177d3bcaf2ed33fa8e63818b3b3fd5bf734fbb8741dfd40662a46ddb2e50ea5
MD5 d7939b08dd302de31167a9e728f153ec
BLAKE2b-256 1a50a3102dae46c564b892a147aa99a16c03bf768e2a5574a3f0a5ffda0ff7c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjamfpro-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for pyjamfpro-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ff94402389fea70eef68928695203b273ef90d5a43fe15177afd78780f25965
MD5 5609de047b0819fa5ecff9307a1ce112
BLAKE2b-256 328622abfc7e0b462d23b8f15e53760d4eb8f2a4acf0fe2a0b9708e27e0ff988

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