pyjamfpro


Namepyjamfpro JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/dougpenny/PyJamfPro
SummarySynchronous client for Jamf Classic/Pro API
upload_time2024-09-07 19:37:01
maintainerNone
docs_urlNone
authorDoug Penny
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![PyJamfPro](Images/pyjamfpro.png)

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyjamfpro)](https://pypi.org/project/pyjamfpro/)
[![PyPI](https://img.shields.io/pypi/v/pyjamfpro?label=pypi%20package)](https://pypi.org/project/pyjamfpro/)
[![MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)


PyJamfPro is a basic Python wrapper for synchronous communication with the [Jamf Pro (and/or Classic) API](https://developer.jamf.com/jamf-pro/docs). The goal is to simplify the process of communicating with the [Jamf Pro](https://www.jamf.com/products/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`.

```shell
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. client_id
3. client_secret
* _Note_: PyJamfPro uses [Client Credentials](https://developer.jamf.com/jamf-pro/docs/client-credentials) with your Jamf Pro server. You will need to ensure an [API Client](https://learn.jamf.com/en-US/bundle/jamf-pro-documentation-current/page/API_Roles_and_Clients.html) has been created with the correct permissions for the actions you would like to perform with the API.

```python
from pyjamfpro import jamfpro

client = jamfpro.Client('https://example.jamfserver.com', 'client_id', 'client_secret')
```

Once you have a client, you can start making synchronous calls to the API.
```python
# 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`](./src/pyjamfpro/endpoints.py) file for other built-in methods. Additionally, you can use the [`make_api_request`](./src/pyjamfpro/jamfpro.py#L121) 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](https://github.com/dougpenny/PyJamPro/issues/new) explaining your idea.

Likewise, if you come across a bug, please [create an issue](https://github.com/dougpenny/PyJamPro/issues/new) 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](https://opensource.org/licenses/MIT) for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dougpenny/PyJamfPro",
    "name": "pyjamfpro",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Doug Penny",
    "author_email": "dpenny@icloud.com",
    "download_url": null,
    "platform": null,
    "description": "![PyJamfPro](Images/pyjamfpro.png)\n\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyjamfpro)](https://pypi.org/project/pyjamfpro/)\n[![PyPI](https://img.shields.io/pypi/v/pyjamfpro?label=pypi%20package)](https://pypi.org/project/pyjamfpro/)\n[![MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n\nPyJamfPro is a basic Python wrapper for synchronous communication with the [Jamf Pro (and/or Classic) API](https://developer.jamf.com/jamf-pro/docs). The goal is to simplify the process of communicating with the [Jamf Pro](https://www.jamf.com/products/jamf-pro/) device management server API by handling authentication and decoding, allowing you to focus on using the data, not retrieving it.\n\n_PyJamfPro is not endorsed, sponsored, or affilitated with Jamf in any way._\n\n***\n\n## Usage\nBegin by installing the PyJamfPro module, using `pip`.\n\n```shell\npip install pyjamfpro\n```\n\nIn your code, simply import the PyJamfPro module and instantiate a new client object. The constructor requires three arguments:\n1. base_url - the base URL of your Jamf Pro server\n2. client_id\n3. client_secret\n* _Note_: PyJamfPro uses [Client Credentials](https://developer.jamf.com/jamf-pro/docs/client-credentials) with your Jamf Pro server. You will need to ensure an [API Client](https://learn.jamf.com/en-US/bundle/jamf-pro-documentation-current/page/API_Roles_and_Clients.html) has been created with the correct permissions for the actions you would like to perform with the API.\n\n```python\nfrom pyjamfpro import jamfpro\n\nclient = jamfpro.Client('https://example.jamfserver.com', 'client_id', 'client_secret')\n```\n\nOnce you have a client, you can start making synchronous calls to the API.\n```python\n# returns list of all mobile devices, using the Classic API\ndevices = client.classic_mobile_devices()\n\n# returns a dictionary of inventory data for the mobile device with ID 1234,\n# using the Classic API\ndevice = client.classic_mobile_device_for_id(1234)\n\n# returns a list of all computers, using the Jamf Pro API\ncomputers = client.pro_computers()\n```\n\nRefer to the [`endpoints.py`](./src/pyjamfpro/endpoints.py) file for other built-in methods. Additionally, you can use the [`make_api_request`](./src/pyjamfpro/jamfpro.py#L121) method to access any Jamf API endpoint. Full support for GET, POST, PUT, and DELETE are included.\n\n## Contributing\nIf you have a feature or idea you would like to see added to PyJamPro, please [create an issue](https://github.com/dougpenny/PyJamPro/issues/new) explaining your idea.\n\nLikewise, if you come across a bug, please [create an issue](https://github.com/dougpenny/PyJamPro/issues/new) explaining the bug with as much detail as possible.\n\nThe 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.\n\n## License\nPyJamPro is released under an MIT license. See [LICENSE](https://opensource.org/licenses/MIT) for more information.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Synchronous client for Jamf Classic/Pro API",
    "version": "0.2.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/dougpenny/PyJamfPro/issues",
        "Homepage": "https://github.com/dougpenny/PyJamfPro"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92bf9adb866ebb22d48d09d7b0ecca08f8e02124fcf4a3cf52e2f2c13d3d27e5",
                "md5": "e952151ec2fd5e2ea314fc5a1a7249dd",
                "sha256": "c6f1038f11e3ddd2e888cc1dae732aa1fa0992e1dbe70a1a437e8a7f52b1b55c"
            },
            "downloads": -1,
            "filename": "pyjamfpro-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e952151ec2fd5e2ea314fc5a1a7249dd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8058,
            "upload_time": "2024-09-07T19:37:01",
            "upload_time_iso_8601": "2024-09-07T19:37:01.800629Z",
            "url": "https://files.pythonhosted.org/packages/92/bf/9adb866ebb22d48d09d7b0ecca08f8e02124fcf4a3cf52e2f2c13d3d27e5/pyjamfpro-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 19:37:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dougpenny",
    "github_project": "PyJamfPro",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyjamfpro"
}
        
Elapsed time: 0.41263s