python-licverify


Namepython-licverify JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryPython client for go-license license verification
upload_time2025-07-31 07:22:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseMIT
keywords license verification rsa go-license
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-licverify

Python client for [go-license](https://github.com/luhtfiimanal/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

```bash
pip install python-licverify  # or uv pip install python-licverify
```

> Depend on `cryptography` and `psutil`. Wheels are provided for Python 3.12+, no extra build tools required.

## Usage

### Library API

```python
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:

```bash
licverify --public-key public.pem --license license.lic
```

Exit status 0 ⇒ valid, status 1 ⇒ invalid.

## Examples

See [`examples/basic_usage.py`](examples/basic_usage.py).

## Development

```bash
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):

```bash
pytest -q
```

## License

This project is licensed under the MIT License – see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-licverify",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "license, verification, rsa, go-license",
    "author": null,
    "author_email": "Luthfi Imanal Satrya <luthfi.imanal@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a6/99/fe56533b12d455df565dfec55fa1c55602c264c57bf4aa7a58a5cf1e0d53/python_licverify-0.1.1.tar.gz",
    "platform": null,
    "description": "# python-licverify\n\nPython client for [go-license](https://github.com/luhtfiimanal/go-license) license verification.\n\n`python-licverify` allows you to verify `.lic` files generated by the `licforge` CLI or Go library **entirely from Python**, including:\n\n* RSA-SHA256 signature validation\n* Hardware binding checks (MAC address, disk ID, hostname)\n* Expiry validation\n* Simple CLI utility\n\n## Installation\n\n```bash\npip install python-licverify  # or uv pip install python-licverify\n```\n\n> Depend on `cryptography` and `psutil`. Wheels are provided for Python 3.12+, no extra build tools required.\n\n## Usage\n\n### Library API\n\n```python\nfrom licverify import Verifier\n\nPUBLIC_KEY_PEM = open(\"public.pem\").read()\nverifier = Verifier(PUBLIC_KEY_PEM)\n\nlicense = verifier.load_license(\"license.lic\")\n\ntry:\n    license.verify(verifier)  # raises on failure\nexcept Exception as exc:\n    print(f\"License invalid: {exc}\")\nelse:\n    print(\"License is valid!\")\n```\n\n### Command-line\n\nAfter installation a `licverify` command is available:\n\n```bash\nlicverify --public-key public.pem --license license.lic\n```\n\nExit status 0 \u21d2 valid, status 1 \u21d2 invalid.\n\n## Examples\n\nSee [`examples/basic_usage.py`](examples/basic_usage.py).\n\n## Development\n\n```bash\ngit clone https://github.com/luhtfiimanal/python-licverify\ncd python-licverify\nuv sync  # install dev deps (optional)\nuv run -m pip install -e .\n```\n\nRun tests (to be added soon):\n\n```bash\npytest -q\n```\n\n## License\n\nThis project is licensed under the MIT License \u2013 see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python client for go-license license verification",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/luhtfiimanal/python-licverify/issues",
        "Source": "https://github.com/luhtfiimanal/python-licverify"
    },
    "split_keywords": [
        "license",
        " verification",
        " rsa",
        " go-license"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a411868f60a4c215f156eecd1b6b068295892c7d39c2d2f0363b1c9964219787",
                "md5": "16bb60b0aad434df6286b2d2e7b44ed9",
                "sha256": "59967db08ee8779e01ea58345ac8f48bfea972212e21ec56fba12683932e61cd"
            },
            "downloads": -1,
            "filename": "python_licverify-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16bb60b0aad434df6286b2d2e7b44ed9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 10249,
            "upload_time": "2025-07-31T07:22:22",
            "upload_time_iso_8601": "2025-07-31T07:22:22.961145Z",
            "url": "https://files.pythonhosted.org/packages/a4/11/868f60a4c215f156eecd1b6b068295892c7d39c2d2f0363b1c9964219787/python_licverify-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a699fe56533b12d455df565dfec55fa1c55602c264c57bf4aa7a58a5cf1e0d53",
                "md5": "90c1a8a7422d9fc1f4b62be972691382",
                "sha256": "7d200f34fabd5af68445038eaebc53f966f5cd9c2bfdd19c963342df9afe0439"
            },
            "downloads": -1,
            "filename": "python_licverify-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "90c1a8a7422d9fc1f4b62be972691382",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 8817,
            "upload_time": "2025-07-31T07:22:24",
            "upload_time_iso_8601": "2025-07-31T07:22:24.469468Z",
            "url": "https://files.pythonhosted.org/packages/a6/99/fe56533b12d455df565dfec55fa1c55602c264c57bf4aa7a58a5cf1e0d53/python_licverify-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-31 07:22:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "luhtfiimanal",
    "github_project": "python-licverify",
    "github_not_found": true,
    "lcname": "python-licverify"
}
        
Elapsed time: 1.08349s