Skip to main content

SunLicense — Python Client

Official Python client for SunLicense, a licence management and anti-piracy system for indie software developers.

SunLicense issues, validates and revokes licence keys for Minecraft plugins, Discord bots, FiveM scripts, desktop apps and other paid software — with marketplace automation for BuiltByBit and Polymart.

Early release. Licence validation works today. The wider client surface — activations, entitlements and offline verification — is in active development.

Install

pip install sunlicense

No dependencies — standard library only.

Usage

from sunlicense import SunLicense

client = SunLicense(
    base_url="https://your-instance.example.com",
    token="optional-api-token",
)

result = client.validate("LICENCE-KEY-HERE")

if result.valid:
    print("Licence is valid")
else:
    print("Rejected:", result.status, result.data)

Pass extra context as keyword arguments:

result = client.validate("LICENCE-KEY-HERE", product="my-plugin", host="server-01")

SunLicense(...)

Argument Type Default Description
base_url str — Required. Base URL of your SunLicense instance
token str None API token, if your endpoint requires one
timeout float 10.0 Request timeout in seconds

validate(license_key, **context) -> ValidationResult

Returns a named tuple with valid (bool), status (int) and data (parsed JSON or None).

Requirements

Python 3.8 or newer.

Other clients

SunLicense also provides clients for Java, JavaScript, PHP and Lua.

Licence

MIT © Hapangama

Metadata

Release files for sunlicense 0.0.1

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

Source distribution (sdist)

Source distribution for sunlicense 0.0.1
File Size Uploaded Provenance Actions
sunlicense-0.0.1.tar.gz 4.2 kB Without provenance Details for sunlicense-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sunlicense 0.0.1
File Interpreter ABI Platform Actions
sunlicense-0.0.1-py3-none-any.whl Python 3 none any Details for sunlicense-0.0.1-py3-none-any.whl

Total release size: 8.8 kB

Release files / sunlicense-0.0.1.tar.gz

Download URL sunlicense-0.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5a2a7bcf76ab0d13e84f470d575915014c2e382dbedd73fcb232e15aa3bfb338
BLAKE2b-256 checksum
How to use checksums
9f73a73406ad8860ba4c0e7929527ac635ad33cbe3551b2376fe60faae4204e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sunlicense-0.0.1-py3-none-any.whl

Download URL sunlicense-0.0.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7e298bc9418f6b4b572a613ae949a7330c3a204f091ea3c53c3c28e14720c59
BLAKE2b-256 checksum
How to use checksums
81fbbcff790edf51313b8a76338f17e1800c6d0de8be3c5c5153d1cede0f5de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for sunlicense 0.0.1

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.0.1 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