-
Notifications
You must be signed in to change notification settings - Fork 15
[Feedback] src/jamf_pro_sdk/clients/pro_api/__init__.py may get unwieldy #30
Copy link
Copy link
Open
Labels
feedbackPotential improvements or changesPotential improvements or changes
Description
Current
The current behaviour is to put all the functions for all the pro endpoints into the __init__.py file. I realise this allows calls like
ifrom jamf_pro_sdk import JamfProClient, BasicAuthProvider
client = JamfProClient(
server="dummy.jamfcloud.com",
credentials=BasicAuthProvider("username", "password")
)
all_computers = client.pro_api.get_computer_inventory_v1()but when the number of endpoints gets high this file will grow to be difficult to deal with.
Proposed
I would propose that in the directory there could be a file computer_v1 which contains (among others) the function get_inventory then the call would be:
from jamf_pro_sdk import JamfProClient, BasicAuthProvider
client = JamfProClient(
server="dummy.jamfcloud.com",
credentials=BasicAuthProvider("username", "password")
)
all_computers = client.pro_api.computer_v1.get_inventory()System Information
SDK version 4.0a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feedbackPotential improvements or changesPotential improvements or changes