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, get_paddle_integration, connect_paddle, list_paddle_prices, create_paddle_mapping, get_slack_integration, authorize_slack, delete_slack_connection, update_slack_connection, test_slack_connection

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.5.0

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.5.0
File Size Uploaded Provenance Actions
licenseman_sdk-0.5.0.tar.gz 164.7 kB With provenance Details for licenseman_sdk-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 581.5 kB

Release files / licenseman_sdk-0.5.0.tar.gz

Download URL licenseman_sdk-0.5.0.tar.gz
Size 164.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e29d9f87630e64f52611990bce7d2acdf19a5cf5e87dd1cbcc7b58f1cc6156e5
BLAKE2b-256 checksum
How to use checksums
ddda4034ee111656133c262c4e2438ae2cc42083f2444005228f8a50852ccd46
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 18, 2026.

Transparency log

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

Download URL licenseman_sdk-0.5.0-py3-none-any.whl
Size 416.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8dae12050a65e0591c6d54b0d58fe4c59a43f4c9d7acb274ee79ef7166a16691
BLAKE2b-256 checksum
How to use checksums
5bdf394e58bceee2af82589f4f78d52ae238f01d17130ff57cdd7336ad35cf1d
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 18, 2026.

Transparency log

Security for licenseman-sdk 0.5.0

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.5.0.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 18, 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