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.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.1.0
File Size Uploaded Provenance
licenseman_sdk-0.1.0.tar.gz 130.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 454.6 kB

Release files / licenseman_sdk-0.1.0.tar.gz

Download URL licenseman_sdk-0.1.0.tar.gz
Size 130.8 kB
Tags Source
SHA-256 checksum
How to use checksums
138131bf471c427c64646369329c6f46f8130533b040ac52513a382dbb4b0c41
BLAKE2b-256 checksum
How to use checksums
8f32e0bcaa5c384cd1854eb8f922e4ee025a9890ada597fa0dc91152ae43283b
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.0-py3-none-any.whl

Download URL licenseman_sdk-0.1.0-py3-none-any.whl
Size 323.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62acf9862b6873d8a8c5a0676df4c22b7dced0f14e1a810fa5bde1ffa021e7c2
BLAKE2b-256 checksum
How to use checksums
cd1dff2bb168e2f89b5b5834cb99435b268ac8d8a09acc9cc42983154899bd3a
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.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

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

Select from 2 files

Attestation for licenseman_sdk-0.1.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 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.0 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