An API Wrapper for HolaClient
Project description
PyHolaClient
A HolaClient API Wrapper using Python!
Installation To install just run
pip install pyholaclient
Usage:
import pyholaclient
# Initialize the HolaClient with your API URL and API Key
client = pyholaclient.HolaClient('http://localhost', '123')
# Example 1: Get user information
user_info = client.user_info('example@gmail.com')
print("User Info:")
print(f"Email: {user_info.email}")
print(f"First Name: {user_info.first_name}")
print(f"Last Name: {user_info.last_name}")
print(f"Username: {user_info.username}")
# Example 2: Get user package
package_name = client.user_package('example@gmail.com')
print("\nUser Email:")
print(f"Package Name: {package_name}")
# Example 3: Set user coins
status = client.set_coins('example@gmail.com', 100)
print("\nSet User Coins:")
print(f"Status: {'Success' if status else 'Failed'}")
# Example 4: Create a coupon
coupon = client.create_coupon(100, 1024, 1024, 1, 1, 1, 1, 1)
print("\nCreate Coupon:")
print(f"Coins: {coupon.coins}")
print(f"RAM: {coupon.ram} MB")
print(f"Disk: {coupon.disk} GB")
print(f"CPU: {coupon.cpu}%")
print(f"Servers: {coupon.servers}")
print(f"Backups: {coupon.backups}")
print(f"Allocations: {coupon.allocation}")
print(f"Databases: {coupon.database}")
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
pyholaclient-0.1.4.tar.gz
(16.6 kB
view details)
Built Distribution
File details
Details for the file pyholaclient-0.1.4.tar.gz
.
File metadata
- Download URL: pyholaclient-0.1.4.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf76d9ab48b299d72f55c59b5844e2678b28a08c2469fa48c57f6c5f080c01c |
|
MD5 | 3d88ec223522d00e1e58f3b69560f1fd |
|
BLAKE2b-256 | c1dcab0a76d27f34c85104dfd3681d12e046cf2b1092ea0f259d2e375aa35279 |
File details
Details for the file pyholaclient-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: pyholaclient-0.1.4-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 343016a467a2f2b420a2dc8eab944280f397ee873c8ecb807e5d8d19635ba2fe |
|
MD5 | fd3bf99ad101fc0c0c94f7c7e0feb860 |
|
BLAKE2b-256 | 96968deed50cbfcdbd041e1c985059b3232c30d553c01791fa2befbbc50cee88 |