macadmins / macadmins/jamf-pro-sdk-python
[Feature Request] Add async/await support to SDK
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 69
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Proposal
Add native asynchronous (async/await) support to the Jamf Pro SDK, enabling use with modern async Python frameworks.
Features:
- Async client classes:
AsyncJamfProClient,AsyncProApi,AsyncClassicApi,AsyncJCDS2, andAsyncWebhooksClient - Async pagination & concurrency operations
- Context manager support
Backwards compatibility is ensured as we would not be modifying existing synchronous code whatsoever.
Implementation Example
import asyncio
from jamf_pro_sdk import AsyncJamfProClient, ApiClientCredentialsProvider
async def main():
async with AsyncJamfProClient(
server="jamf.my.org",
credentials=ApiClientCredentialsProvider("client_id", "client_secret")
) as client:
# Single async operation
computers = await client.classic_api.list_all_computers()
# Concurrent operations
computer_ids = [c.id for c in computers]
async for computer in client.async_concurrent_api_requests(
handler=client.classic_api.get_computer_by_id,
arguments=computer_ids
):
print(f"{computer.general.name}")
asyncio.run(main())
[!NOTE]
To support both sync and async operations, the SDK would usehttpxinstead ofrequests. However,httpxwas built to be a viable replacement forrequests.
Additional Details
This is a follow up to this slack convo. Happy to provide additional details/examples as needed!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by mapping the existing synchronous client and API classes named in the proposal, then review how the current requests-based transport would change to httpx. Use the AsyncJamfProClient example as the behavioral entry point. Done means async versions of the listed clients support pagination, concurrency, and context managers while existing synchronous behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100