Python client for go-license license verification
Project description
python-licverify
Python client for go-license license verification.
python-licverify allows you to verify .lic files generated by the licforge CLI or Go library entirely from Python, including:
- RSA-SHA256 signature validation
- Hardware binding checks (MAC address, disk ID, hostname)
- Expiry validation
- Simple CLI utility
Installation
pip install python-licverify # or uv pip install python-licverify
Depend on
cryptographyandpsutil. Wheels are provided for Python 3.12+, no extra build tools required.
Usage
Library API
from licverify import Verifier
PUBLIC_KEY_PEM = open("public.pem").read()
verifier = Verifier(PUBLIC_KEY_PEM)
license = verifier.load_license("license.lic")
try:
license.verify(verifier) # raises on failure
except Exception as exc:
print(f"License invalid: {exc}")
else:
print("License is valid!")
Command-line
After installation a licverify command is available:
licverify --public-key public.pem --license license.lic
Exit status 0 ⇒ valid, status 1 ⇒ invalid.
Examples
Development
git clone https://github.com/luhtfiimanal/python-licverify
cd python-licverify
uv sync # install dev deps (optional)
uv run -m pip install -e .
Run tests (to be added soon):
pytest -q
License
This project is licensed under the MIT License – see the LICENSE file for details.
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 python_licverify-0.2.1.tar.gz.
File metadata
- Download URL: python_licverify-0.2.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5f617d3e74c38059b24dda1a72d6c6fe9ada2148858ff75d67acc3827c92ca7
|
|
| MD5 |
97b3cf9facd23d1952fec68920d9b8aa
|
|
| BLAKE2b-256 |
fd922ff0b52ef9dc3c4af778c36e9c39298f34f51efe3b108a8c59212d9b4d95
|
File details
Details for the file python_licverify-0.2.1-py3-none-any.whl.
File metadata
- Download URL: python_licverify-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8665263d6dafa239f6a1da515f8989060b0313eb1713a21dc68b941aafe8b424
|
|
| MD5 |
c0465bf5eb03bf0879c8d91ba6747e22
|
|
| BLAKE2b-256 |
d8c2b520a2ad083ba44e1d55c9a7bb4e8052ef9df15fac8e7a4b10c3ebf408cb
|