94654f6526
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.
49 lines
1.5 KiB
TOML
49 lines
1.5 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "keysat-licensing-client"
|
|
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"
|
|
license = { text = "MIT OR Apache-2.0" }
|
|
authors = [{ name = "Keysat", email = "licensing@keysat.xyz" }]
|
|
keywords = ["bitcoin", "licensing", "btcpay", "start9", "ed25519"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Security :: Cryptography",
|
|
]
|
|
dependencies = [
|
|
"cryptography>=42",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
online = ["httpx>=0.27"]
|
|
dev = [
|
|
"pytest>=8",
|
|
"ruff>=0.5",
|
|
"mypy>=1.10",
|
|
"httpx>=0.27",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://keysat.xyz"
|
|
Repository = "https://github.com/keysat-xyz/keysat"
|
|
Documentation = "https://github.com/keysat-xyz/keysat/blob/main/docs/INTEGRATION.md"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "-q"
|