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.27.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stigg_api_client-6.27.0.tar.gz | 100.9 kB | Without provenance | Details for stigg_api_client-6.27.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stigg_api_client-6.27.0-py3-none-any.whl | Python 3 | none | any | Details for stigg_api_client-6.27.0-py3-none-any.whl |
Total release size: 203.1 kB
Release files / stigg_api_client-6.27.0.tar.gz
| Download URL | stigg_api_client-6.27.0.tar.gz |
|---|---|
| Size | 100.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86f5c40f2ca6afad798a066abe723ad39f33e0e7f876597667951f866e12a184
|
|
BLAKE2b-256 checksum How to use checksums |
3f3bc04c9bed3cd9649a8944d98a713e16af3868d607731d63f1f5667f0de1d5
|
| 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.27.0-py3-none-any.whl
| Download URL | stigg_api_client-6.27.0-py3-none-any.whl |
|---|---|
| Size | 102.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d28b051cbb3feefa8ef69a1ef87b5cf64dd31125eae5752d6ab7a99ab39adce0
|
|
BLAKE2b-256 checksum How to use checksums |
76901fc65d6a44eab57d5b55e481c1498454e0876696c5e231525d2d5da5498d
|
| 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.27.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.