Penguin Tech License Client
PenguinTech License Server Python client for license validation and feature gating.
Installation
pip install penguin-licensing
# With Flask extras
pip install penguin-licensing[flask]
Usage
Basic License Validation
from penguin_licensing import LicenseClient
# Initialize client
client = LicenseClient(
license_key="PENG-XXXX-XXXX-XXXX-XXXX-ABCD",
product="elder"
)
# Validate license
info = client.validate()
print(f"License valid: {info.valid}")
print(f"Customer: {info.customer}")
print(f"Tier: {info.tier}")
Feature Gating
from penguin_licensing import get_license_client
client = get_license_client()
# Check specific feature
if client.check_feature("advanced_analytics"):
# Feature is available
pass
# Check tier requirement
if client.check_tier("enterprise"):
# Has enterprise license or higher
pass
Flask Integration
from flask import Flask
from penguin_licensing.decorators import license_required, feature_required
app = Flask(__name__)
@app.route('/api/v1/enterprise-feature')
@license_required('enterprise')
def enterprise_endpoint():
return {"message": "Enterprise feature"}
@app.route('/api/v1/analytics')
@feature_required('advanced_analytics')
def analytics_endpoint():
return {"data": "analytics"}
Environment Variables
LICENSE_KEY=PENG-XXXX-XXXX-XXXX-XXXX-ABCD
PRODUCT_NAME=elder
LICENSE_SERVER_URL=https://license.penguintech.io
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src tests
ruff check src tests
# Type check
mypy src
License
AGPL-3.0 - See LICENSE for details.
Metadata
Release files for penguin-licensing 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| penguin_licensing-0.1.0.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| penguin_licensing-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / penguin_licensing-0.1.0.tar.gz
| Download URL | penguin_licensing-0.1.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58dba3c178f609e511e88db69963a26eeaf15de506f713ffa66772463829e686
|
|
BLAKE2b-256 checksum How to use checksums |
aec7b10a10fc1e4b3df93c5eff3bc6af78c1b8ffc8b9f2d026f0de5a1317f01d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 11, 2026.
Transparency logRelease files / penguin_licensing-0.1.0-py3-none-any.whl
| Download URL | penguin_licensing-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cc33381eb9450081a15607439a9506f27867c97eabaa8820b006607de35950f
|
|
BLAKE2b-256 checksum How to use checksums |
16c59a82fbf70e3c09754b9445382b86ea19382093a223eb5032d839e0f22a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 11, 2026.
Transparency log