CPanel API Client. Supports latest UAPI.
Project description
CPanel API Client for Python
Supports only UAPI.
$ pip install cpanel-api
Basic usage:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import sys
from cpanel_api import *
logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)
hostname = 'HOSTNAME_OR_IPADRESS'
username = 'USERNAME'
password = 'PASSWORD'
client = CPanelClient(hostname, username, password)
r = client.SSH.get_port()
print('SSH port:', r.data.port)
from pprint import pprint
r = client.DomainInfo.list_domains()
pprint(r.data)
Function call syntax:
client.ModuleName.function_name({'param': 'value'})
client.ModuleName.function_name(param='value')
client.ModuleName.function_name({'param': 'value'}, param='value')
client.api('ModuleName', 'function_name', {'param': 'value'}, param='value')
Pagination:
client.ModuleName.function_name({'api.paginate': 1, 'api.paginate_size': 10, 'api.paginate_page': 2})
Links:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cpanel-api-0.1.2.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for cpanel_api-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20472fd14735cee395b30a9015c9605d00e3f023b09a617ed2cdf3f5dcf58962 |
|
MD5 | 05d1e4e198a0746d651d9ae8e5551f09 |
|
BLAKE2b-256 | 5bea97661c0d143eeb1e74756f1a94f9d8fe0433f9341eb256ea54ed02e70149 |