Skip to main content

stigg-api-client

⚠️ This package has been deprecated and is no longer actively maintained. Please use stigg-api-client-v2 instead.

This library provides a Python wrapper to Stigg's GraphQL API based on the operations that are in use by the Stigg's Node.js SDK.

It leverages the sgqlc library to generate Python classes for GraphQL types, and utilizes the sgqlc.endpoint.requests.RequestsEndpoint class to send the API requests. The responses are being automatically converted into native Python types.

Documentation

See https://docs.stigg.io/docs/python-sdk

Installation

pip install stigg-api-client

Usage

Initialize the client:

import os
from stigg import Stigg

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

stigg_client = Stigg.create_client(api_key)

Provision a customer

import os
from stigg import Stigg

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

client = Stigg.create_client(api_key)

data = client.request(Stigg.mutation.provision_customer, {
    "input": {
        "refId": "customer-id",
        "name": "Acme",
        "email": "hello@acme.com",
        "couponRefId": "coupon-id",
        "billingInformation": {
            "language": "en",
            "timezone": "America/New_York",
            "billingAddress": {
                "country": "US",
                "city": "New York",
                "state": "NY",
                "addressLine1": "123 Main Street",
                "addressLine2": "Apt. 1",
                "phoneNumber": "+1 212-499-5321",
                "postalCode": "10164"
            },
            "shippingAddress": {
                "country": "US",
                "city": "New York",
                "state": "NY",
                "addressLine1": "123 Main Street",
                "addressLine2": "Apt. 1",
                "phoneNumber": "+1 212-499-5321",
                "postalCode": "10164"
            }
        },
        "additionalMetaData": {
            "key": "value"
        },
        "subscriptionParams": {
            "planId": "plan-revvenu-basic"
        }
    }
})

print(data.provision_customer.customer.name)

Get a customer by ID

import os
from stigg import Stigg

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

client = Stigg.create_client(api_key)

data = client.request(Stigg.query.get_customer_by_id, {
  "input": {"customerId": "customer-id"}
})

customer = data.get_customer_by_ref_id
print(customer.name)

Metadata

Release files for stigg-api-client 6.28.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stigg-api-client 6.28.0
File Size Uploaded Provenance Actions
stigg_api_client-6.28.0.tar.gz 101.0 kB Without provenance Details for stigg_api_client-6.28.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stigg-api-client 6.28.0
File Interpreter ABI Platform Actions
stigg_api_client-6.28.0-py3-none-any.whl Python 3 none any Details for stigg_api_client-6.28.0-py3-none-any.whl

Total release size: 203.2 kB

Release files / stigg_api_client-6.28.0.tar.gz

Download URL stigg_api_client-6.28.0.tar.gz
Size 101.0 kB
Tags Source
SHA-256 checksum
How to use checksums
79e7efea2873e47f265bce600787aca49f0b63bfa41db923850b2b1f00a6bda6
BLAKE2b-256 checksum
How to use checksums
03eee5346f2ddae75dea34455d58e52a555af71f6babf62124f8b0921afe0331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.12 Linux/6.6.141

Release files / stigg_api_client-6.28.0-py3-none-any.whl

Download URL stigg_api_client-6.28.0-py3-none-any.whl
Size 102.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6245496861ed46bcf1a6adf0f2b76e8dbe1c41060adbd00997a79959e7f4385e
BLAKE2b-256 checksum
How to use checksums
0c82990312d2f98f133f84740c2504d0bb90ee5ee2ee333f3e164a45c459fd9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.12 Linux/6.6.141

Security for stigg-api-client 6.28.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

6.28.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page