Hi Simon - Martin was saying to create a folder on your management server and call it "cpapi". Then download all of the files API into it like the instructions say on the github page.
Example CPAPI path: /home/admin/cpapi
If you put your script in this folder: /home/admin/
This should allow it to find the CPAPI module. See the example I did using the find_dup_ip.py sample script:
[Expert@mgmt-sa1:0]# pwd
/home/admin
[Expert@mgmt-sa1:0]# ls -d c*
cpapi
[Expert@mgmt-sa1:0]# cd cpapi/
[Expert@mgmt-sa1:0]# ls
__init__.py __init__.pyc api_exceptions.py api_exceptions.pyc api_response.py api_response.pyc cli.py mgmt_api.py mgmt_api.pyc utils.py utils.pyc
[Expert@mgmt-sa1:0]# cd ..
[Expert@mgmt-sa1:0]# python find_dup_ip.py
Enter server IP address or hostname:x.x.x.x
Enter username: admin
Enter password:
Processing. Please wait...
Saving data to debug file api_calls.json
List of Duplicate IP addresses:
-------------------------------