Skip to main content

Python SDK for the GrowPanel subscription analytics REST API

Project description

growpanel (Python)

Official Python SDK for the GrowPanel subscription analytics REST API.

pip install growpanel
from growpanel import GrowPanel

gp = GrowPanel(api_key="gp_...")

summary = gp.reports.get_summary()
print(summary.summary.mrr_current)

mrr = gp.reports.get_mrr(date="20260101-20260531", interval="month")
for period in mrr.result:
    print(period.date, period.total_mrr)

Auth

Issue a key in app.growpanel.io → Account → API keys. Pass it as api_key= when constructing the client; it's sent as Authorization: Bearer <key> on every request.

Surfaces

The SDK mirrors the interactive docs:

Analytics (read-only):

  • gp.reports.* — MRR, leads, cohorts, cashflow, retention, churn
  • gp.customers.* — list + detail (analytics view)
  • gp.plans.* — list plans

Account & integrations:

  • gp.profile.*, gp.notifications.*, gp.webhooks.*

Data ingestion (CRUD on a data source):

  • gp.data.customers.* — create / read / update / delete raw customer rows
  • gp.data.plans.* — raw plan CRUD
  • gp.data.plan_groups.* — group plans together
  • gp.data.segments.* — saved filter combinations
  • gp.data.invoices.* — raw invoice CRUD
  • gp.data.sources.* — connected billing systems

gp.data.* mirrors the /data/* URL prefix and keeps the ingestion API visually separate from the analytics surfaces.

For anything not exposed as a named method, gp.raw is the generated module tree — every endpoint in the OpenAPI spec is reachable from there.

Generating from the live spec

pip install -e ".[dev]"
openapi-python-client generate \
    --url https://api-dev.growpanel.io/openapi.json \
    --config openapi-python-client.config.yaml \
    --overwrite

Output lands in src/growpanel/_generated/. In CI, this runs automatically on every API change.

Errors

from growpanel import GrowPanel, GrowPanelError

gp = GrowPanel(api_key="...")
try:
    gp.customers.detail(id="cus_doesnotexist")
except GrowPanelError as err:
    if err.status == 404:
        ...  # handle not-found
    raise

Interactive docs

The full reference (with try-it-out) lives at api.growpanel.io/docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

growpanel-0.1.0.tar.gz (132.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

growpanel-0.1.0-py3-none-any.whl (521.6 kB view details)

Uploaded Python 3

File details

Details for the file growpanel-0.1.0.tar.gz.

File metadata

  • Download URL: growpanel-0.1.0.tar.gz
  • Upload date:
  • Size: 132.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for growpanel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a2ccd4aaf1b969eaf6370666013164e892edbbd4ab742a63446001ff80334a9f
MD5 387dcc00fe751ad17c0e68395c72e499
BLAKE2b-256 1a48fc5f8ade84b5a97546ccacead52728af6719a206331f0feafa9e40abeaca

See more details on using hashes here.

File details

Details for the file growpanel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: growpanel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 521.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for growpanel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58dbe574247acc9e96f635d260e60b8f9c0593c4649896be06f4974c2e21aa3d
MD5 b692d3afb2947b448f373c000473369d
BLAKE2b-256 23fa5be6939349f272c306326703fa76f74ea9aa3988ab8baed38f8dbe7b369e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page