hyperco-client


Namehyperco-client JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryHyper.co client for Python.
upload_time2023-01-09 10:20:30
maintainer
docs_urlNone
authorbanjo
requires_python
licenseMIT
keywords python client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```python
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)

# ------------------------------------------------------ #
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hyperco-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,client",
    "author": "banjo",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/49/4d/d89400c4d8d747571c3b7431ae4ee52d60657a18c6006c9207be8d6fc48b/hyperco-client-0.1.0.tar.gz",
    "platform": null,
    "description": "# Installation\n\n```\npip install hyperco-client\n```\n\n# Introduction\n\nWith this client you can interact with the Hyper.co API withou needing to prepare the requests yourself.\nIt provides a clean and easy way to build client calls.\n\nThe client will raise an exception if the Hyper.co API returns an error response.\n\n# Example\n\n```python\nfrom hyper.client import Client\nfrom hyper.links import CreateLinkParams\n\n\napi_key = \"YOUR_HYPER_API_KEY\"\n\nclient = Client(api_key=api_key)\n\n\n# ---- Get all business licenses  ---------------------- #\n\nlicenses = client.list_licenses(page=2, limit=10)\n\nprint(licenses)\n\n# ------------------------------------------------------ #\n\n\n# ---- Create a new product link  ---------------------- #\n\nparams = CreateLinkParams(\n    product_id=\"product_id\",\n    password=\"link_password\",\n    trial_period_days=7,\n    group_buy_guild=\"0000000000000000\",\n    enable_bot_protection=True,\n    max_usages=50,\n    start_date=datetime.fromtimestamp(1683577538),\n    initial_fee_amount=10\n)\n\nlink = client.create_link(params=params)\n\nprint(link)\n\n# ------------------------------------------------------ #\n\n\n# ---- Authorize a license  ---------------------------- #\n\nvalid_license = client.authorize(license_key=\"license_key\")\n\nprint(valid_license)\n\n# ------------------------------------------------------ #\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Hyper.co client for Python.",
    "version": "0.1.0",
    "split_keywords": [
        "python",
        "client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "620ac13d512766044c9a8f1d5543346dccd3859339acb6da80c2a79c6c492094",
                "md5": "93fbf54c09d84726eb3d11f719dfd36c",
                "sha256": "869f4d5f7ee67bcc313ddfdf8e3b1c8914c8e2a1a8e5de97b84c1a5f6f6e0995"
            },
            "downloads": -1,
            "filename": "hyperco_client-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "93fbf54c09d84726eb3d11f719dfd36c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10551,
            "upload_time": "2023-01-09T10:20:28",
            "upload_time_iso_8601": "2023-01-09T10:20:28.528109Z",
            "url": "https://files.pythonhosted.org/packages/62/0a/c13d512766044c9a8f1d5543346dccd3859339acb6da80c2a79c6c492094/hyperco_client-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "494dd89400c4d8d747571c3b7431ae4ee52d60657a18c6006c9207be8d6fc48b",
                "md5": "a0b01d51689e88fb5945a4f822e99c3e",
                "sha256": "debf4ca2b1167ecfcc7fb1f864d470ccd71182456a51580ce13372c66835147d"
            },
            "downloads": -1,
            "filename": "hyperco-client-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a0b01d51689e88fb5945a4f822e99c3e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8828,
            "upload_time": "2023-01-09T10:20:30",
            "upload_time_iso_8601": "2023-01-09T10:20:30.408049Z",
            "url": "https://files.pythonhosted.org/packages/49/4d/d89400c4d8d747571c3b7431ae4ee52d60657a18c6006c9207be8d6fc48b/hyperco-client-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-09 10:20:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "hyperco-client"
}
        
Elapsed time: 0.02931s