# Python license client

Requires: `pip install cryptography`

```python
from license_client import LicenseClient

client = LicenseClient(
    base_url="https://YOUR-SERVER",
    product="your-product-slug",
    public_key_b64="PASTE_SIGNING_PUBLIC_KEY_FROM_/docs_HERE",
)

result = client.check(license_key)
if result.valid:
    print("licensed, status:", result.status, "expires:", result.expires_at)
else:
    print("not licensed:", result.reason)
```

See `example.py` for a runnable script, and the `/docs` page on your server for
the full protocol reference (what each `reason` value means, HWID spec,
signature format, offline grace behavior).

`check()` calls `/api/v1/verify` first, and transparently falls back to
`/api/v1/activate` the first time a key is used on a device. Every response
is Ed25519-verified locally before being trusted or cached. If the server is
unreachable, the last-known-good signed response is used for up to 72h
(`from_offline_cache=True` on the result) before failing closed.
