Hyper.co client for Python.
Project description
Installation
pip install hyperco-client
Introduction
With this client you can interact with the Hyper.co API withou needing to prepare the requests yourself. It provides a clean and easy way to build client calls.
The client will raise an exception if the Hyper.co API returns an error response.
Example
from hyper.client import Client
from hyper.links import CreateLinkParams
api_key = "YOUR_HYPER_API_KEY"
client = Client(api_key=api_key)
# ---- Get all business licenses ---------------------- #
licenses = client.list_licenses(page=2, limit=10)
print(licenses)
# ------------------------------------------------------ #
# ---- Create a new product link ---------------------- #
params = CreateLinkParams(
product_id="product_id",
password="link_password",
trial_period_days=7,
group_buy_guild="0000000000000000",
enable_bot_protection=True,
max_usages=50,
start_date=datetime.fromtimestamp(1683577538),
initial_fee_amount=10
)
link = client.create_link(params=params)
print(link)
# ------------------------------------------------------ #
# ---- Authorize a license ---------------------------- #
valid_license = client.authorize(license_key="license_key")
print(valid_license)
# ------------------------------------------------------ #
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
hyperco-client-0.1.0.tar.gz
(8.8 kB
view hashes)
Built Distribution
Close
Hashes for hyperco_client-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 869f4d5f7ee67bcc313ddfdf8e3b1c8914c8e2a1a8e5de97b84c1a5f6f6e0995 |
|
MD5 | 93fbf54c09d84726eb3d11f719dfd36c |
|
BLAKE2b-256 | 620ac13d512766044c9a8f1d5543346dccd3859339acb6da80c2a79c6c492094 |