Skip to main content

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 for ONE product (reads OUBLIETTE_LICENSE_KEY).
# Keys whose signed `products` list does not include "dungeon" give the free tier.
mgr = LicenseManager(product="dungeon", pro_features=PRO_FEATURES)
if mgr.check_feature("scheduler"):
    ...

# Server-side: mint a product-scoped Ed25519 key. The private key comes from the
# argument or OUBLIETTE_LICENSE_PRIVATE_KEY and never leaves the issuer.
key = issue_license(org="Acme", tier="pro", products=["dungeon"],
                    features=["scheduler", "reports"], expires="2027-09-30")

# Gumroad/Paddle webhook -> license (each SKU names its products and duration)
result = license_for_sale(
    payload,
    {"dungeon-pro": {"tier": "pro", "products": ["dungeon"], "duration_days": 365}},
    PRIVATE_KEY, seller_id=SELLER_ID,
    webhook_secret=WEBHOOK_SECRET, raw_body=raw_body, signature=signature,
)

What's inside

  • LicenseManager / FeatureGate / verify_license_token: product-scoped feature gating with Ed25519-signed schema-v2 keys. Anything that does not verify gives the free tier.
  • issue_license / license_record, plus the CLI python -m oubliette_commerce.license_issuer {keygen,pubkey,issue,verify}: server-side key minting.
  • license_for_sale / create_license_webhook_blueprint: Gumroad/Paddle sale → key.
  • UsageTracker: usage metering with optional SQLite persistence and per-product quota/pricing.
  • auth_middleware, rbac, tenant: API-key auth, RBAC, multi-tenancy.

src/oubliette_commerce/_license_core.py is the canonical verification core. Shield, Trap and Dungeon vendor a byte-identical copy, with a sha256 pin test in each repo. See docs/licensing.md for the token format, signing-key generation and storage, rotation, and issuing. The private signing key stays on the issuer and is never committed. Gating is soft-enforce.

License

Apache-2.0.

Metadata

Release files for oubliette-commerce 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oubliette-commerce 0.3.0
File Size Uploaded Provenance Actions
oubliette_commerce-0.3.0.tar.gz 37.6 kB Without provenance Details for oubliette_commerce-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oubliette-commerce 0.3.0
File Interpreter ABI Platform Actions
oubliette_commerce-0.3.0-py3-none-any.whl Python 3 none any Details for oubliette_commerce-0.3.0-py3-none-any.whl

Total release size: 69.6 kB

Release files / oubliette_commerce-0.3.0.tar.gz

Download URL oubliette_commerce-0.3.0.tar.gz
Size 37.6 kB
Tags Source
SHA-256 checksum
How to use checksums
40765dff1fa366f1002792aabbc75e581c089e0c00ab1f609e7c59c736f2aef8
BLAKE2b-256 checksum
How to use checksums
48b6c236483217ac7d48ae8560c1316274f9c82a2db7e6f23d7d596192a220f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / oubliette_commerce-0.3.0-py3-none-any.whl

Download URL oubliette_commerce-0.3.0-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6213dc63322b1a2754694a868123861d192784dd010d328104c9c1ccaee0a02
BLAKE2b-256 checksum
How to use checksums
6602b55ca73cb37036d5e5f329b04a18f4b19225e35bf49ca8e4859f810112fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Security for oubliette-commerce 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page