stigg-sidecar-sdk
Stigg Python SDK makes it easier to interact with Stigg Sidecar
Documentation
See https://docs.stigg.io/docs/sidecar-sdk
Installation
pip install stigg-sidecar-sdk
Usage
Initialize the client:
import os
from stigg_sidecar_sdk import Stigg, ApiConfig
api_key = os.environ.get("STIGG_SERVER_API_KEY")
# Run the sidecar separately, then point the SDK at it:
# docker run -it -p 80:80 -e SERVER_API_KEY="<SERVER_API_KEY>" public.ecr.aws/stigg/sidecar:latest
stigg = Stigg(
ApiConfig(
api_key=api_key,
),
remote_sidecar_host='localhost',
remote_sidecar_port=80
)
Get single entitlement of a customer
from stigg_sidecar_sdk import Stigg, ApiConfig, GetMeteredEntitlementRequest, MeteredEntitlementOptions
async def get_entitlement():
stigg = Stigg(ApiConfig(api_key='api_key'), remote_sidecar_host='localhost')
resp = await stigg.get_metered_entitlement(
GetMeteredEntitlementRequest(customer_id='customer-demo-01',
feature_id='feature-01-templates',
options=MeteredEntitlementOptions(requested_usage=1))
)
print(resp.entitlement.has_access)
Accessing the api client:
from stigg_sidecar_sdk import Stigg, ApiConfig
from stigg.generated import ProvisionCustomerInput
async def get_entitlement():
stigg = Stigg(ApiConfig(api_key='api_key'), remote_sidecar_host='localhost')
resp = await stigg.api.provision_customer(
ProvisionCustomerInput(
customer_id='customer-demo-01',
name='customer-name'
)
)
print("customer created", resp.provision_customer.customer.created_at)
Metadata
Release files for stigg-sidecar-sdk 8.1.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_sidecar_sdk-8.1.0.tar.gz | 11.2 kB | Without provenance | Details for stigg_sidecar_sdk-8.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stigg_sidecar_sdk-8.1.0-py3-none-any.whl | Python 3 | none | any | Details for stigg_sidecar_sdk-8.1.0-py3-none-any.whl |
Total release size: 23.0 kB
Release files / stigg_sidecar_sdk-8.1.0.tar.gz
| Download URL | stigg_sidecar_sdk-8.1.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c86d68cd51f32229529bea992ef9ff0cbb6c46ad7127d099e6819c0149ee200e
|
|
BLAKE2b-256 checksum How to use checksums |
c82fafe08aa44f6ecd534bccdf16a30ac4e58bea41bc2c8e7ce409720b1efc8c
|
| 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_sidecar_sdk-8.1.0-py3-none-any.whl
| Download URL | stigg_sidecar_sdk-8.1.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b96cf86f2a8792040331bd0132eb74324e92d1d0483f4332fb488cfaa86bd2c3
|
|
BLAKE2b-256 checksum How to use checksums |
788d806f689c933b094b32300a57ea9814c8c3a34942190c342e5f63b4528b68
|
| 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-sidecar-sdk 8.1.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.