Shared revenue SDK for the Oubliette product suite — config-driven licensing, metering, key issuance, and sale webhooks
Project description
Oubliette Commerce
Shared revenue SDK for the Oubliette product suite — config-driven licensing, usage metering, signed key issuance, and merchant-of-record (Gumroad/Paddle) sale webhooks.
This is internal infrastructure: the single source of truth so Shield, Dungeon, Trap, and
Warden don't each carry a copy of the commercial layer. The engine is product-neutral — each
product supplies its own pro_features and pricing/quota tables.
Usage
from oubliette_commerce import LicenseManager, issue_license, license_for_sale
PRO_FEATURES = frozenset({"scheduler", "reports", "api"})
# Validate a customer's license, gating this product's Pro features
mgr = LicenseManager(signing_key=SIGNING_KEY, pro_features=PRO_FEATURES)
if mgr.check_feature("scheduler"):
...
# Server-side: mint a signed key (e.g. from a Gumroad sale webhook)
key = issue_license(org="Acme", tier="pro", features=["scheduler", "reports"],
signing_key=SIGNING_KEY)
# Gumroad/Paddle webhook -> license
result = license_for_sale(payload, {"acme-pro": {"tier": "pro", "features": [...]}},
SIGNING_KEY, seller_id=SELLER_ID)
What's inside
LicenseManager/FeatureGate— config-driven feature gating (HMAC-signed keys).issue_license— server-side signed key minting.license_for_sale/create_license_webhook_blueprint— Gumroad/Paddle sale → key.UsageTracker— usage metering with optional SQLite persistence + per-product quota/pricing.auth_middleware,rbac,tenant— API-key auth, RBAC, multi-tenancy.
The signing key (OUBLIETTE_LICENSE_SIGNING_KEY) stays server-side; gating is soft-enforce.
License
Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oubliette_commerce-0.2.0.tar.gz.
File metadata
- Download URL: oubliette_commerce-0.2.0.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc053fe2217b352136d42bbae02f3f16647d1353fc1ccaa7d51d9c3a858eca3b
|
|
| MD5 |
d25b225a9397338f1685be956831875a
|
|
| BLAKE2b-256 |
d64975cedabfc706b7f757a8e94e6750e21fcfe145947914d593b6d17f38135c
|
File details
Details for the file oubliette_commerce-0.2.0-py3-none-any.whl.
File metadata
- Download URL: oubliette_commerce-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54faa1117dcdb498f2744f396f05c1f2d277c945ad5dc0f54e6788b31bd3464d
|
|
| MD5 |
bc4d38be61238bcbd905025471c536f0
|
|
| BLAKE2b-256 |
e0929c5c4cc8e9fbc2abf507afc9c5aa00622fcdb7833023060873ac67aad74c
|