Skip to main content

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


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 details)

Uploaded Source

Built Distribution

hyperco_client-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file hyperco-client-0.1.0.tar.gz.

File metadata

  • Download URL: hyperco-client-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for hyperco-client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 debf4ca2b1167ecfcc7fb1f864d470ccd71182456a51580ce13372c66835147d
MD5 a0b01d51689e88fb5945a4f822e99c3e
BLAKE2b-256 494dd89400c4d8d747571c3b7431ae4ee52d60657a18c6006c9207be8d6fc48b

See more details on using hashes here.

File details

Details for the file hyperco_client-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hyperco_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for hyperco_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 869f4d5f7ee67bcc313ddfdf8e3b1c8914c8e2a1a8e5de97b84c1a5f6f6e0995
MD5 93fbf54c09d84726eb3d11f719dfd36c
BLAKE2b-256 620ac13d512766044c9a8f1d5543346dccd3859339acb6da80c2a79c6c492094

See more details on using hashes here.

Supported by

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