Skip to main content

An API Wrapper for HolaClient

Project description

PyHolaClient

A HolaClient API Wrapper using Python!

Upload Python Package

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 name
package_name = client.user_package('example@gmail.com')
print("\nUser Package Name:")
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


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.3a0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

pyholaclient-0.1.3a0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pyholaclient-0.1.3a0.tar.gz.

File metadata

  • Download URL: pyholaclient-0.1.3a0.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

Hashes for pyholaclient-0.1.3a0.tar.gz
Algorithm Hash digest
SHA256 8c5bc7c17bfe3d1f86ad15b014480982c8d230cf9ce4dc15ada170ca9e13a328
MD5 96f6db22a4acf2835fc1f1ca302132c5
BLAKE2b-256 7976c5a748d9dd48dfde78eaa57a8c7f414c6bc145de354c541b8036e0ff70f1

See more details on using hashes here.

File details

Details for the file pyholaclient-0.1.3a0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyholaclient-0.1.3a0-py3-none-any.whl
Algorithm Hash digest
SHA256 21e42dd4da7f8431a8b2d5cdd0a911fe69702411331bcd2b1d9395669bd7fb1c
MD5 fbbfebb9bb0b9ea73d5729a71baa1770
BLAKE2b-256 42c6bf54ffe3c1f93f99caac8b05b292662921b925f7a511953705b899595381

See more details on using hashes here.

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