A ConnectWise API tool for the rest of us.
Project description
ConnectPyse
ConnectWise (Manage) REST API client written in Python 3.x The original project was created by Joshua M. Smith. This forked version was started by Mark Ciecior.
ConnectWise RESTful API Client
Following the layout style of the official SDKs from CW team. Classes and their API counter part classes are under their appropriate sections. Import the API class(es) you want to leverage and the model classes are imported with them.
Setup (old way)
- Copy your_api.json to new my_api.json file and update with your API key and clientId details
Setup (new way)
- Create two variables which are passed to the constructor of the API classes.
- URL = 'https://connectwise.mycompany.com/v4_6_release/apis/3.0'
- AUTH = {'Authorization': 'Basic Wmdlasdkjfeklamwekf='}
Usage
- Import the sections you'll be using
- Create an object from API Class
- Leverage member methods to access features
For example to get a Member's office phone number you would:
>>> from connectpyse.system import members_api
>>> m = members_api.MembersAPI() #Assuming the my_api.json file has been updated
-or-
>>> from connectpyse.system import members_api
>>> m = members_api.MembersAPI(url=URL, auth=AUTH) #No my_api.json file necessary
>>> a_member = m.get_member_by_id(123)
>>> print(a_member.officePhone)
For example to find the name of all activities related to a particular opportunity you would:
>>> from connectpyse.sales import activity_api
>>> myAct = activity_api.ActivityAPI() #Assuming the my_api.json file has been updated
-or-
>>> from connectpyse.sales import activity_api
>>> myAct = activity_api.ActivityAPI(url=URL, auth=AUTH) #No my_api.json file necessary
>>> myAct.conditions = 'opportunity/id=1250'
>>> allActivities = myAct.get_activities()
>>> for oneAct in allActivities:
>>> print(oneAct.name)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
connectpyse-0.5.0.1.tar.gz
(26.9 kB
view details)
Built Distribution
File details
Details for the file connectpyse-0.5.0.1.tar.gz
.
File metadata
- Download URL: connectpyse-0.5.0.1.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.35.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33e5d80fc1a63dc3e66d5d892bf1fd222c0c7e01f1bedf9ee749433c0949ba37 |
|
MD5 | f3acddfadf11d22628ebffe378519fa7 |
|
BLAKE2b-256 | 49044b6796c696fe1196aa205fa5d8ab6915575173ad0e1c42120c6e597d7a11 |
Provenance
File details
Details for the file connectpyse-0.5.0.1-py3-none-any.whl
.
File metadata
- Download URL: connectpyse-0.5.0.1-py3-none-any.whl
- Upload date:
- Size: 91.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.35.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 681cca73f8f1e0e6667f7acb41001afda7f6871317f63e1a728ab3dacda0a1d2 |
|
MD5 | 273253d01a64f447f67e748cba2390cc |
|
BLAKE2b-256 | aa31c99de3ef53bae078ecce693c0d8cccbcca46af7991fa3592fa1188b2c129 |