Digital Distribution Management - A library for license key verification and management
Project description
DDM-HD (Digital Distribution Management - HD)
DDM-HD 是一个用于卡密验证和管理的Python库。该库提供了与卡密系统API交互的功能,包括登录验证和心跳保持连接。
功能特点
- 自动设备信息获取:基于硬件信息自动生成唯一的设备标识符
- 配置管理:通过配置对象一次性设置共享参数
- 会话管理:自动管理登录状态和token
- 网络重试机制:内置网络连接重试和超时处理
- 异常处理:完善的错误处理和清晰的错误信息
- 向后兼容:支持传统方式调用
安装
pip install DDM-HD
使用方法
基本使用
from DDM import CDKeyClient, CDKeyConfig
config = CDKeyConfig(
cdkey="你的卡密",
project_secret="你的项目密钥",
project_uuid="你的项目UUID"
)
client = CDKeyClient(config)
response = client.login()
if response.success:
print("登录成功!")
print(f"Token: {response.token}")
heartbeat_response = client.heartbeat()
if heartbeat_response.success:
print("心跳成功!")
API参考
主要类和函数
CDKeyClient: 主要的API客户端类,用于执行登录和心跳操作CDKeyConfig: 配置模型,用于存储共享参数get_device_info(): 获取设备信息函数
响应对象
所有API调用返回的响应对象都包含以下属性:
success: 布尔值,表示调用是否成功code: 状态码msg: 消息描述
许可证
MIT License
贡献
欢迎提交Issue和Pull Request。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ddm_hd-1.0.0.tar.gz
(10.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ddm_hd-1.0.0-py3-none-any.whl
(14.8 kB
view details)
File details
Details for the file ddm_hd-1.0.0.tar.gz.
File metadata
- Download URL: ddm_hd-1.0.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73acf6c0681c4a9b3bef2ab379fce45a2b2d95e962bb9f795c4b7027c34ae47a
|
|
| MD5 |
3d782d6fc9f2d65be9e4bad19b9c49c1
|
|
| BLAKE2b-256 |
b3e859de484b794a3e07a7fea35fa2c41ff256afb4fa4af616f372d53df98960
|
File details
Details for the file ddm_hd-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ddm_hd-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
214c6b4df19e422b914a4bc2fcb9cb1804fbed0c00f02efe20eb42fea1d16f02
|
|
| MD5 |
3873f3dde6be6697fad107ff65f83a0e
|
|
| BLAKE2b-256 |
22dc31af4c19c8ffae1e65d2242838a01ec09603bbcdb093ec249b8f887893d0
|