[Feedback] src/jamf_pro_sdk/clients/pro_api/__init__.py may get unwieldy
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Đọc src/jamf_pro_sdk/clients/pro_api/init.py và theo dõi cách các hàm endpoint hiện có được cung cấp thông qua client.pro_api. Xác định cấu trúc module và các yêu cầu tương thích để nhóm các endpoint như computer_v1, sau đó xác minh rằng API client thu được phù hợp với thiết kế đã thống nhất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 69
- Fork
- 16
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của macadmins/jamf-pro-sdk-python
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
[Bug] preview/mdm/commands deprecated & removed which breaks send_mdm_command_preview() method. Đang mởbug
macadmins/jamf-pro-sdk-python#68 · 1 bình luận · 1 người được giao ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
macadmins/jamf-pro-sdk-python#55 · 1 bình luận ·
-
[Feature Request] Pass a model to the Classic and Pro API request methods as the return type. Đang mởenhancement
macadmins/jamf-pro-sdk-python#52 · 1 bình luận · 2 người được giao ·
-
enhancement feedback
macadmins/jamf-pro-sdk-python#33 · 4 bình luận · 1 người được giao ·
Tất cả issue của macadmins/jamf-pro-sdk-python
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·