dm-api-python
Python SDK for DistroMate dm_api native library.
Install
pip install distromate-dm-api
Quick Start (License)
from dm_api import DmApi
api = DmApi()
api.set_product_data("<product-data>")
api.set_product_id("your-product-id")
api.set_license_key("XXXX-XXXX-XXXX")
if not api.activate_license():
raise RuntimeError(api.get_last_error() or "activation failed")
if not api.is_license_genuine():
code = api.get_last_activation_error()
name = api.get_activation_error_name(code)
raise RuntimeError(f"license check failed: {name}, err={api.get_last_error()}")
API Groups
- License setup:
set_product_data,set_product_id,set_data_directory,set_debug_mode,set_custom_device_fingerprint - License activation:
set_license_key,set_license_callback,activate_license,get_last_activation_error - License state:
is_license_genuine,is_license_valid,get_server_sync_grace_period_expiry_date,get_activation_mode - License details:
get_license_key,get_license_expiry_date,get_license_creation_date,get_license_activation_date,get_activation_creation_date,get_activation_last_synced_date,get_activation_id - Update:
check_for_updates,download_update,cancel_update_download,get_update_state,get_post_update_info,ack_post_update_info,wait_for_update_state_change,quit_and_install - General:
get_library_version,json_to_canonical,get_last_error,reset
Update API Notes
- Update APIs return parsed JSON envelope (
dict) when transport succeeds. - If native API returns
NULL, Python SDK returnsNone; checkget_last_error(). quit_and_install()returns nativeintstatus code directly:1: accepted, process should exit soon-1: business-level rejection (checkget_last_error())-2: transport/parse error
Environment Variables
DM_API_PATH: optional path to native libraryDM_APP_ID,DM_PUBLIC_KEY: optional defaults for app identityDM_LAUNCHER_ENDPOINT,DM_LAUNCHER_TOKEN: launcher IPC variables used by update APIs
Release
- CI workflow validates package build.
- Tag
v*triggers publish workflow to PyPI. - Required secret:
PYPI_API_TOKEN.
Metadata
Release files for distromate-dm-api 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| distromate_dm_api-1.2.0.tar.gz | 7.2 kB | Without provenance | Details for distromate_dm_api-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| distromate_dm_api-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for distromate_dm_api-1.2.0-py3-none-any.whl |
Total release size: 15.7 kB
Release files / distromate_dm_api-1.2.0.tar.gz
| Download URL | distromate_dm_api-1.2.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3f73c8ec249fe162ecd756180c77371f7dc77fa3cd5471d6ce387a711483a29
|
|
BLAKE2b-256 checksum How to use checksums |
d1a740e2413373ad8f8bbea7acdbc6ab27ddf9fa5c16ca3df0b16ed6737a9c02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / distromate_dm_api-1.2.0-py3-none-any.whl
| Download URL | distromate_dm_api-1.2.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba4439390a705da15da038edfc7e1d28a0010100e5e7906420a17fabbcaf9a0e
|
|
BLAKE2b-256 checksum How to use checksums |
b671726555b280d7f2f52c27fe232f94ca1fb2d4cfdcee32b138cf688e56e5f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for distromate-dm-api 1.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.