stigg-api-client-v2


Namestigg-api-client-v2 JSON
Version 3.81.0 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2025-09-14 14:35:22
maintainerNone
docs_urlNone
authorStigg
requires_python<4.0,>=3.9
licenseSTIGG SDK LICENSE
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stigg-api-client-v2 (BETA)

This library provides a Python wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on 
the operations that are in use by the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk).

The [ariadne-codegen](https://github.com/mirumee/ariadne-codegen) code generator is used to generate a typesafe Python API client.

## Documentation

TBD

## Installation

    pip install stigg-api-client-v2

## Usage

Initialize the client:

```python

import os
from stigg import Stigg

api_key = os.environ.get("STIGG_SERVER_API_KEY")

client = Stigg.create_async_client(api_key)

```

Provision a customer

```python



import os
from stigg import Stigg
from stigg.generated import ProvisionCustomerInput

api_key = os.environ.get("STIGG_SERVER_API_KEY")

client = Stigg.create_async_client(api_key)

customer_input = ProvisionCustomerInput(
    **{
        "customer_id": "1661115567186116608", # mandatory, everything else is optional
        "name": "Acme",
        "email": "billing@acme.com",
        "additional_meta_data": {"key": "value"},
        "subscription_params": {"plan_id": "plan-acme-free"},
    }
)
result = await client.provision_customer(customer_input)

print(result.provision_customer.customer)

```

Get a customer by ID

```python

import os
from stigg import Stigg
from stigg.generated import GetCustomerByRefIdInput

api_key = os.environ.get("STIGG_SERVER_API_KEY")

client = Stigg.create_async_client(api_key)

result = await client.get_customer_by_id(GetCustomerByRefIdInput(**{"customer_id": "1661115567186116608"}))

print(result.get_customer_by_ref_id.name)

```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "stigg-api-client-v2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Stigg",
    "author_email": "support@stigg.io",
    "download_url": "https://files.pythonhosted.org/packages/86/87/6d3ff82cb89489de188fd492472df495683a17a1d7f06400a1610348dca4/stigg_api_client_v2-3.81.0.tar.gz",
    "platform": null,
    "description": "# stigg-api-client-v2 (BETA)\n\nThis library provides a Python wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on \nthe operations that are in use by the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk).\n\nThe [ariadne-codegen](https://github.com/mirumee/ariadne-codegen) code generator is used to generate a typesafe Python API client.\n\n## Documentation\n\nTBD\n\n## Installation\n\n    pip install stigg-api-client-v2\n\n## Usage\n\nInitialize the client:\n\n```python\n\nimport os\nfrom stigg import Stigg\n\napi_key = os.environ.get(\"STIGG_SERVER_API_KEY\")\n\nclient = Stigg.create_async_client(api_key)\n\n```\n\nProvision a customer\n\n```python\n\n\n\nimport os\nfrom stigg import Stigg\nfrom stigg.generated import ProvisionCustomerInput\n\napi_key = os.environ.get(\"STIGG_SERVER_API_KEY\")\n\nclient = Stigg.create_async_client(api_key)\n\ncustomer_input = ProvisionCustomerInput(\n    **{\n        \"customer_id\": \"1661115567186116608\", # mandatory, everything else is optional\n        \"name\": \"Acme\",\n        \"email\": \"billing@acme.com\",\n        \"additional_meta_data\": {\"key\": \"value\"},\n        \"subscription_params\": {\"plan_id\": \"plan-acme-free\"},\n    }\n)\nresult = await client.provision_customer(customer_input)\n\nprint(result.provision_customer.customer)\n\n```\n\nGet a customer by ID\n\n```python\n\nimport os\nfrom stigg import Stigg\nfrom stigg.generated import GetCustomerByRefIdInput\n\napi_key = os.environ.get(\"STIGG_SERVER_API_KEY\")\n\nclient = Stigg.create_async_client(api_key)\n\nresult = await client.get_customer_by_id(GetCustomerByRefIdInput(**{\"customer_id\": \"1661115567186116608\"}))\n\nprint(result.get_customer_by_ref_id.name)\n\n```\n",
    "bugtrack_url": null,
    "license": "STIGG SDK LICENSE",
    "summary": null,
    "version": "3.81.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "896b92b36a9afd224638d87ca69596413086010c9e316be3cb1f7faea5c12f72",
                "md5": "38b345d57de75b4910be40f26f45a0ea",
                "sha256": "fffff93adab7f63f2be5f1d65aedb5a6088519658b743d3ba61efc0290a07012"
            },
            "downloads": -1,
            "filename": "stigg_api_client_v2-3.81.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38b345d57de75b4910be40f26f45a0ea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 511615,
            "upload_time": "2025-09-14T14:35:20",
            "upload_time_iso_8601": "2025-09-14T14:35:20.727262Z",
            "url": "https://files.pythonhosted.org/packages/89/6b/92b36a9afd224638d87ca69596413086010c9e316be3cb1f7faea5c12f72/stigg_api_client_v2-3.81.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86876d3ff82cb89489de188fd492472df495683a17a1d7f06400a1610348dca4",
                "md5": "6cfddd9ca2e600dc36763aa364d02133",
                "sha256": "0fd21395d5064f281feb2fc69770eed116d09755dc51439f9dc0f9de1a2e8157"
            },
            "downloads": -1,
            "filename": "stigg_api_client_v2-3.81.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6cfddd9ca2e600dc36763aa364d02133",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 443302,
            "upload_time": "2025-09-14T14:35:22",
            "upload_time_iso_8601": "2025-09-14T14:35:22.960531Z",
            "url": "https://files.pythonhosted.org/packages/86/87/6d3ff82cb89489de188fd492472df495683a17a1d7f06400a1610348dca4/stigg_api_client_v2-3.81.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-14 14:35:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "stigg-api-client-v2"
}
        
Elapsed time: 4.10933s