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_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.3.3

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.3
File Size Uploaded Provenance Actions
licenseman_sdk-0.3.3.tar.gz 151.7 kB With provenance Details for licenseman_sdk-0.3.3.tar.gz

Built distribution (wheel)

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

Total release size: 530.9 kB

Release files / licenseman_sdk-0.3.3.tar.gz

Download URL licenseman_sdk-0.3.3.tar.gz
Size 151.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5f344da3f6dc9a282d24d056911a399bd1f10683d5ce1dc5f0be420d91cb42b4
BLAKE2b-256 checksum
How to use checksums
1bfa7a8d6ed988180bf4c877647a66d6a7546ad4e2a2a0a393a1a1b7bf6ace36
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 6, 2026.

Transparency log

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

Download URL licenseman_sdk-0.3.3-py3-none-any.whl
Size 379.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6e7197f14948a72cfbb66c16f7f30a2c5494aca18f92ccd8b7b33da89b81a58
BLAKE2b-256 checksum
How to use checksums
6507e52ab422b3fc3c1a347f4ccc2dc7f5e3cf718da71495e5b432d0a14fd699
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 6, 2026.

Transparency log

Security for licenseman-sdk 0.3.3

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.3.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 6, 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