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 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.2.tar.gz.
File metadata
- Download URL: cpanel-api-0.1.2.tar.gz
- Upload date:
- Size: 3.1 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 |
281c35e04a2ca4d5f9fa252b7dc42a161cad9b6f6ffe6d8e0da78b6d7d68d2b3
|
|
| MD5 |
7e717daa952be0152602d7385eb1b18b
|
|
| BLAKE2b-256 |
334939f40fd0e1091f3a766d803d0583431f360097006088ae341be16e189172
|
File details
Details for the file cpanel_api-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cpanel_api-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.1 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 |
20472fd14735cee395b30a9015c9605d00e3f023b09a617ed2cdf3f5dcf58962
|
|
| MD5 |
05d1e4e198a0746d651d9ae8e5551f09
|
|
| BLAKE2b-256 |
5bea97661c0d143eeb1e74756f1a94f9d8fe0433f9341eb256ea54ed02e70149
|