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, cancel_license, send_license_keys, get_signing_key
PortalApi get_portal, request_portal_link, create_portal_link, create_billing_portal_session, 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, update_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.3.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.3.1
File Size Uploaded Provenance Actions
licenseman_sdk-0.3.1.tar.gz 147.4 kB With provenance Details for licenseman_sdk-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 514.9 kB

Release files / licenseman_sdk-0.3.1.tar.gz

Download URL licenseman_sdk-0.3.1.tar.gz
Size 147.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a47419f72a8479a11d82cea4c5830b4aac9e44cd220bb761c6feac0fd9113e73
BLAKE2b-256 checksum
How to use checksums
a88e47c7b4d8b87615b82adbc2425895b9ad9ccecaf7920f87e939611bf0179f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

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

Download URL licenseman_sdk-0.3.1-py3-none-any.whl
Size 367.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04dcd1dcd97811ae63b60361ba007ee70353b0436b24b900ff5cf15940a974f8
BLAKE2b-256 checksum
How to use checksums
3d75d1ed69aac2a942ccb6c3bbdc9059153bbc0bbb0e2f1e41217abf00aac224
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for licenseman_sdk-0.3.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 Nov 4, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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