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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cpanel-api-0.1.1.tar.gz.
File metadata
- Download URL: cpanel-api-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.7.12-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86ecebe0a9fd90f8f77b38e78b4860256fc1a6567b5f1c9bbcb4908027a760c2
|
|
| MD5 |
fab96a74ed1c9190416b638d57491e53
|
|
| BLAKE2b-256 |
ff24edf0a8982d5ab75fa486661f54e2b8c2eaff7e543dceb53381370f7dfc1f
|
File details
Details for the file cpanel_api-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cpanel_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.7.12-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faf7db7c608d4cd9b6ce6049774a62a14f8ac1d4595ed5ab2a4b7c9f19eecbcb
|
|
| MD5 |
147a09e24507874e99d74a0005cb63e2
|
|
| BLAKE2b-256 |
f5aeb9a167fd6923dfa0f10ca466201175781d8c45e247e5efedf923458e7806
|