Skip to main content

Asynchronous client for Jamf Classic/Pro API

Project description

PyJamfPro

PyPI - Python Version PyPI MIT

PyJamfPro is a basic Python wrapper for asynchronous 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 asynchronous 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.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjamfpro-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 dd7ccff57f690129cca701c3dc9fdfcd0095361e49990017b7e294155ed2733c
MD5 3134f220262f4c8a1b9fc6b7285c5162
BLAKE2b-256 9410f09319f3380a17eedd3133c92fb06e25678fb9e0245dffa5abe689ee50ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjamfpro-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 baa1bfedf9838ec3fac252755aa5a8c508ad4963a45e5cfeca4a10b10f12984e
MD5 2a19dac7aaf75cce601acb41ab019a7e
BLAKE2b-256 20eb2d106cc2751430c343a84b80129301fa01fa169da73e572ca26f2a37772b

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