CPanel API Client. Supports latest UAPI.
Project description
CPanel API Client for Python
Supports only UAPI.
$ pip install cpanel_api
Examples:
#!/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_IP_ADRESS'
username = 'USERNAME'
password = 'PASSWORD'
client = CPanelClient(hostname, username, password)
client.Module.function({'param': 'value'}, param='value')
client.api('Module', 'function', {'param': 'value'}, param='value')
res = client.SSH.get_port()
# {
# 'data': {'port': '1243'},
# 'errors': None,
# 'metadata': {},
# 'warnings': None,
# 'messages': None,
# 'status': 1,
# }
print(res.data.port)
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.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for cpanel_api-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | faf7db7c608d4cd9b6ce6049774a62a14f8ac1d4595ed5ab2a4b7c9f19eecbcb |
|
MD5 | 147a09e24507874e99d74a0005cb63e2 |
|
BLAKE2b-256 | f5aeb9a167fd6923dfa0f10ca466201175781d8c45e247e5efedf923458e7806 |