Skip to main content

LicenseManager Python SDK

PyPI version Python versions PyPI downloads License Documentation

The official Python SDK for the LicenseManager API: issue, manage and validate software licenses. Typed client with Pydantic models.

Documentation · API reference · Changelog

Requirements

Python 3.10 or later.

Installation

pip install licenseman-sdk

Usage

Create an API key in the LicenseManager app, then create a license after a sale:

import os

import licensemanager

configuration = licensemanager.Configuration(
    api_key={"apiKey": os.environ["LICENSEMANAGER_API_KEY"]},
)

with licensemanager.ApiClient(configuration) as api_client:
    licenses = licensemanager.LicensesApi(api_client)
    license = licenses.create_license(
        product_id="x7Kp2QaZ",
        create_license=licensemanager.CreateLicense(email="jane@example.com"),
    )

And validate it from your application, which needs no API key:

import licensemanager

with licensemanager.ApiClient() as api_client:
    licenses = licensemanager.LicensesApi(api_client)
    license_token = licenses.validate_key(
        product_id="x7Kp2QaZ",
        validate_key=licensemanager.ValidateKey(key="7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF", fingerprint="4c:32:75:8f:9a:1e", version="1.4.2"),
    )

Authentication

Most endpoints take an organization API key: keep it on your servers. The endpoints your application calls directly, like validating a key, take no credentials or a token scoped to a customer, license or machine. See authentication and scoped tokens.

# With an API key, from your backend:
configuration = licensemanager.Configuration(api_key={"apiKey": os.environ["LICENSEMANAGER_API_KEY"]})

# With a token scoped to a customer, license or machine:
configuration = licensemanager.Configuration(access_token=token)

Errors

Failed requests answer an error with a stable code to branch on, listed for each endpoint in the API reference. See errors.

try:
    licenses.get_license(id="l3Nv8KwB")
except licensemanager.ApiException as error:
    # The body is { "error": { "code", "message" } }.
    print(error.status, error.body)

Reference

Every method is documented, with its parameters and responses, in the docs folder:

Class Methods
LicensesApi validate_key, list_licenses, create_license, list_customer_licenses, get_license, delete_license, update_license, get_license_stats, send_license_keys, get_signing_key
PortalApi get_portal, request_portal_link, create_portal_link, send_portal_link
ProductsApi list_products, create_product, get_product, delete_product, update_product, reset_product, upload_product_logo, delete_product_logo, get_product_stats
PoliciesApi list_policies, create_policy, get_policy, delete_policy, update_policy
CustomersApi list_customers, create_customer, get_customer, delete_customer, update_customer
MachinesApi list_machines, get_machine, deactivate_machine
ReleasesApi list_releases, create_release, get_release, delete_release, update_release
TokensApi create_customer_token, create_license_token, create_machine_token
EventsApi list_policy_events, list_license_events
IntegrationsApi get_stripe_integration, connect_stripe, disconnect_integration, check_integration, list_stripe_prices, create_stripe_mapping, delete_stripe_mapping, update_stripe_mapping

Versioning

This SDK follows semantic versioning and is generated from the OpenAPI document of the API: each release is listed in the changelog. Please don't open pull requests, they would be overwritten by the next release: open an issue instead.

License

See LICENSE.

Metadata

Release files for licenseman-sdk 0.1.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 licenseman-sdk 0.1.1
File Size Uploaded Provenance
licenseman_sdk-0.1.1.tar.gz 131.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for licenseman-sdk 0.1.1
File Interpreter ABI Platform
licenseman_sdk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 454.8 kB

Release files / licenseman_sdk-0.1.1.tar.gz

Download URL licenseman_sdk-0.1.1.tar.gz
Size 131.0 kB
Tags Source
SHA-256 checksum
How to use checksums
97a1a010f6570c4edfc7174d6d6017b0f6aaf9b94f172a178f19948191ea1e6e
BLAKE2b-256 checksum
How to use checksums
0f8c4f1b1b8422e9ee1c7a40a1c6a9b3ec9505d7a96ef2671e1259b79641285c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 20, 2026.

Transparency log

Release files / licenseman_sdk-0.1.1-py3-none-any.whl

Download URL licenseman_sdk-0.1.1-py3-none-any.whl
Size 323.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83ca1bb90dbbe5abf991c062d9074b2e6c64ddf014b6dcdaa2d029f798140707
BLAKE2b-256 checksum
How to use checksums
a006b40fd8b843fa389ce559bdeca58db8b1ea99a08e92bc010de3efec79b762
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 20, 2026.

Transparency log

Security for licenseman-sdk 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for licenseman_sdk-0.1.1.tar.gz

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 Oct 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full 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