Skip to main content

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


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)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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