Skip to main content

Python library to interact with cPanel API

Install

pip install cpanel-client

Create a new cPanel account

server = ServerAPI('WHM_USERNAME', 'WHM_PASSWORD', 'https://your-whm-url.com', 2087)  
          
# create account 
result = server.create_account('USER_EMAIL_ADDRESS', 'USER_DOMAIN', 'package_name')
print(result)
success = result['success']
self.assertEqual(success, 1)
if success == 1:
    print('New cPanel Account created')

# Suspend account
suspend_result = server.suspend_account(c_username)

# Terminate account
destroy_result = server.terminate_account(result['username'])

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpanel_client-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

cpanel_client-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file cpanel_client-1.0.0.tar.gz.

File metadata

  • Download URL: cpanel_client-1.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for cpanel_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 954e55a312269987607e0b58808e438cc9a4d3ac82389c32efc834e87da45028
MD5 e313500cb681814a9698e0e98188361a
BLAKE2b-256 0849e9c20d0b87dd14c3f1abe425b867df67e97a00e229ca887c1506d3934eb0

See more details on using hashes here.

File details

Details for the file cpanel_client-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cpanel_client-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for cpanel_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dda4279864f180b9b5510da06f9ad4586a41c82729e9fbae8b7ee7ad7b061fa7
MD5 10d999b5c29a9420fa30ec7c89dc7e91
BLAKE2b-256 772b063c41cd8f22cc3c9d1e2a3f443637d4d26f4c0b56404221469a15eeb7bd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

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