From 0a14dd610f52cbae8e12dece39d6d6747b3b12d5 Mon Sep 17 00:00:00 2001 From: Brad Ganley Date: Mon, 29 Sep 2025 16:25:15 -0500 Subject: [PATCH] first commit --- main.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..3e1a9f0 --- /dev/null +++ b/main.py @@ -0,0 +1,25 @@ +from pyconnectwise import ConnectWiseManageAPIClient +import os +from dotenv import load_dotenv +load_dotenv() +comp_id = os.getenv('comp_id') +client_id = os.getenv('client_id') +api_pub = os.getenv('api_pub') +api_priv = os.getenv('api_priv') +url_base = "portal.gotocompu.com" +print(comp_id,api_pub) +# init client +api_client = ConnectWiseManageAPIClient( +# your company name, + comp_id, +# manage instance url, + url_base, +# your api client id, + client_id, +# your api public key, + api_pub, +# your api private key, + api_priv, +) +companies = api_client.company.companies.get() +print(companies[10]) \ No newline at end of file