Skip to content
GetmeDocs
Sign inCreate account

Getting started

  • Getme developer documentation

API Reference

  • Introduction
  • Authentication
  • Errors
  • Idempotent requests
  • Metadata
  • Pagination
  • Request IDs
  • Versioning
  • Webhooks
  • Event Catalog
  • SDKs and CLI

Core Resources

  • Auth
  • Events

Site Resources

  • Forms
  • Sites

Commerce Resources

  • Brands
  • Categories
  • Products
  • Services

Crm Resources

  • Customers

Other Resources

  • Media

Dev Tools

  • CLIBeta
  • Website source with the CLIBeta
  • Webhooks with the CLIBeta
  • SDKsBeta
  • Node SDKBeta
  • Python SDKBeta

Guides

  • Guides
  • Quickstart
  • Website source workflow
  • Webhook handler

Changelog

  • Changelog
  • June 10, 2026 - Developer platform docs beta
  • July 15, 2026 - Install token lifecycle safety
  • July 15, 2026 - Source-first site development
  • July 15, 2026 - Site source navigation warnings
Loading documentation...
HomeSDKsPython SDK

Python SDK

Beta

Use the official Getme Python SDK for server-side integrations and automation.

Getme Python is the official Python client for Getme developer APIs.

Installation

bash
pip install getme-python

Python 3.10 or newer is required.

Source code: github.com/getme-tech/getme-python

Quick start

python
from getme import GetmeClient

client = GetmeClient(api_key="gmat_test_...")

sites = client.sites.list()
products = client.products.list(limit=10)
manifest = client.sites.source.manifest("site_...")

print([site["name"] for site in sites["data"]])
print([product["name"] for product in products["data"]])
print([file["path"] for file in manifest["files"]])

Use an app-install access token such as gmat_test_... or gmat_live_....

Pagination

python
first_page = client.sites.list(limit=25)

if first_page["has_more"] and first_page["data"]:
    next_page = client.sites.list(
        limit=25,
        cursor=first_page["data"][-1]["id"],
    )

For full scans:

python
for site in client.sites.list_auto_paging(limit=100):
    print(site["id"], site["name"])

for product in client.products.list_auto_paging(limit=100):
    print(product["id"], product["name"])

The SDK sends cursor as starting_after.

Commerce catalog

python
product = client.products.create({
    "name": "Coffee",
    "sku": "COF-001",
    "status": "draft",
})

client.products.update(product["id"], {"status": "active"})
client.products.archive(product["id"])
client.categories.create({"name": "Menu", "type": "product"})
client.brands.create({"name": "Acme"})
client.services.create({"name": "Consulting"})

Mutations generate an idempotency key automatically unless you pass one in request options.

Website source

Create a standalone site directly from a complete custom source tree when no live site or base-theme selection exists:

python
custom = client.sites.development.create_from_source({
    "name": "Custom storefront",
    "message": "Initial source",
    "files": custom_theme_files,
})

print(custom["site_id"], custom["id"], custom["source_revision"])

The API validates the full archive before creating the draft. The returned site and session ids intentionally match. Subsequent source writes, previews, and publish requests use the existing development-session methods.

python
session = client.sites.development.create_session(
    "site_...",
    {"source_revision": "rev_live", "name": "Header update"},
)

client.sites.development.push_batch(
    "site_...",
    session["id"],
    {
        "source_revision": "rev_live",
        "files": {"theme.json": '{"name":"Updated theme"}'},
    },
)

client.sites.pages.upsert_content(
    "site_...",
    session["id"],
    "wpag_...",
    "en",
    {"source_revision": "rev_live", "values": {"title": "Updated docs"}},
)

preview = client.sites.development.preview(
    "site_...",
    session["id"],
    {"expires_days": 7},
)

print(preview["preview_url"])

Source and page content writes are staged in the development session. They do not publish to the live site. Create a publish request when the change is ready for owner review.

Webhook verification

Use the raw request body bytes for signature verification.

python
from getme.webhooks import construct_event

event = construct_event(raw_body, signature_header, "whsec_...")
print(event["type"])

Testing helpers can create signed payloads for local tests:

python
from getme.webhooks.testing import generate_test_header, generate_test_payload

payload = generate_test_payload({"object": "event", "type": "website.published"})
signature = generate_test_header(payload["raw_body"], "whsec_test")

Errors

The Python SDK raises structured exceptions such as GetmeApiError, GetmeAuthenticationError, GetmePermissionError, GetmeRateLimitError, GetmeConnectionError, and GetmeSignatureVerificationError.

On this page

  • Installation
  • Quick start
  • Pagination
  • Commerce catalog
  • Website source
  • Webhook verification
  • Errors