Python module for the HaloPSA API using Client Credentials from HaloPSA's HaloPSA API integration item.
No docs yet.
-
Clone the repository into your project:
git clone [email protected]:neschram/Py-HaloPSA.git
-
Install the package:
python -m pip install /path/to/Py-HaloPSA/.
There are two options for configuring the module to your API.
Create or update a
python-decouple
compatilble config file.
Add the configuration to your system's environment variables
If you do not already have a python-decouple
compatible config file,
follow these steps to create one. If you do already have a compatible config file,
add the content from step 2 into your existing document.
-
Create a file named
.env
in the root of your project. -
Copy the contents of pyHaloPSA/.env.template to your
.env
file. -
Update the variables with your API's information
- Optional variables are commented out with a
#
- Optional variables are commented out with a
Add the following to your environment variables:
-
BASE_URL
: The base path to your API.- example:
"https://support.haloservicedesk.com"
- example:
-
TENANT
: Your HaloPSA tenant name.- example:
haloservicedesk
- example:
-
CLIENT_ID
: Your HaloPSA API's Client ID -
CLIENT_SECRET
: Your HaloPSA API's Client Secret
from halo_api import Halo
>>> clients = Halo.get("clients")
>>> Halo.lookup("clients", "Sandboxed Thoughts")
>>> agents = Halo.get("agents")
>>> Halo.lookup("agents", "Nate")