A Python package for interacting with WHM + cPanel
Project description
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'])
Project details
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for cpanel_client-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dda4279864f180b9b5510da06f9ad4586a41c82729e9fbae8b7ee7ad7b061fa7 |
|
MD5 | 10d999b5c29a9420fa30ec7c89dc7e91 |
|
BLAKE2b-256 | 772b063c41cd8f22cc3c9d1e2a3f443637d4d26f4c0b56404221469a15eeb7bd |