Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpanel_api-0.1.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

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

Hashes for cpanel-api-0.1.2.tar.gz
Algorithm Hash digest
SHA256 281c35e04a2ca4d5f9fa252b7dc42a161cad9b6f6ffe6d8e0da78b6d7d68d2b3
MD5 7e717daa952be0152602d7385eb1b18b
BLAKE2b-256 334939f40fd0e1091f3a766d803d0583431f360097006088ae341be16e189172

See more details on using hashes here.

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

Hashes for cpanel_api-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20472fd14735cee395b30a9015c9605d00e3f023b09a617ed2cdf3f5dcf58962
MD5 05d1e4e198a0746d651d9ae8e5551f09
BLAKE2b-256 5bea97661c0d143eeb1e74756f1a94f9d8fe0433f9341eb256ea54ed02e70149

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page