Skip to main content

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)

Uploaded Source

Built Distribution

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

cpanel_api-0.1.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

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

Hashes for cpanel-api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86ecebe0a9fd90f8f77b38e78b4860256fc1a6567b5f1c9bbcb4908027a760c2
MD5 fab96a74ed1c9190416b638d57491e53
BLAKE2b-256 ff24edf0a8982d5ab75fa486661f54e2b8c2eaff7e543dceb53381370f7dfc1f

See more details on using hashes here.

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

Hashes for cpanel_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 faf7db7c608d4cd9b6ce6049774a62a14f8ac1d4595ed5ab2a4b7c9f19eecbcb
MD5 147a09e24507874e99d74a0005cb63e2
BLAKE2b-256 f5aeb9a167fd6923dfa0f10ca466201175781d8c45e247e5efedf923458e7806

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