v0.2.0 — policy_slug on start_purchase + list_public_policies
Mirrors the TS SDK 0.2.0 + Rust SDK 0.2.0 changes for parity across
all four language clients.
StartPurchaseOptions gains `policy_slug: str | None`. New
`Client.list_public_policies(product_slug)` returns a
`PublicPoliciesResponse` carrying the buyer-visible tier list (slug,
name, price_sats, entitlements, recurring/trial flags, "Most popular"
flag). Same data the licensing service's /buy/<slug> page reads
server-side — public endpoint, no auth.
client.start_purchase("recap", StartPurchaseOptions(
policy_slug="pro",
buyer_email="buyer@example.com",
))
tiers = client.list_public_policies("recap")
for p in tiers.policies:
print(p.slug, p.name, p.price_sats, p.entitlements)
Backwards compatible — existing positional / kwarg callers continue
to work since policy_slug defaults to None.
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "keysat-licensing-client"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
description = "Python client for Keysat — a self-hosted Bitcoin-paid software licensing server that runs on Start9. Verifies signed license keys offline and wraps the HTTP API for purchase, redemption, and revocation checks."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
Reference in New Issue
Block a user