Skip to main content

License System for Dai Chao Online

Project description

License System

Project Description

License System is a lightweight Python package for managing desktop software licenses on Windows.

It generates license keys tied to a unique hardware ID (HWID), stores the license securely in the Windows Registry, and validates it online using Google Sheets.

This package is designed for developers who want a simple but effective way to:

  • Control application access
  • Bind licenses to specific machines
  • Set expiry dates
  • Approve or reject users remotely
  • Receive Telegram notifications for new registrations

Fixed Issues

  • Fixed the issue where the license key was not being generated correctly.

Usage

from license_system.license_manager import LicenseKeys
from license_system.telegram_notifier import TelegramNotifier

# Optional: enable Telegram notification
telegram = TelegramNotifier(
    token="YOUR_BOT_TOKEN",
    chat_id="YOUR_CHAT_ID"
)

# Create license manager
license_manager = LicenseKeys(
    telegram=telegram,
    sheetID="YOUR_GOOGLE_SHEET_ID"
)

# Step 1: Generate license if not exists
license_manager.check_or_generate_license()

# Step 2: Validate license
if license_manager.validate_local_license():
    print("License is valid")
else:
    print("License is invalid or expired")

# Step 3: Get expiry date
expiry = license_manager.get_online_expiry_date()
print("License expires on:", expiry)

Installation

pip install dc-license-system

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dc_license_system-0.0.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dc_license_system-0.0.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file dc_license_system-0.0.4.tar.gz.

File metadata

  • Download URL: dc_license_system-0.0.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for dc_license_system-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d1d90cdaf1fc8043269f3f4a031a5d824ee7f9e3985ac7e6110beee18b46b77f
MD5 6d3c55fe0270a946d6d9142f75472d69
BLAKE2b-256 dee53269b0050759c3c82818e95c44bdddab0b55a2c0355ea3d2952508bc285a

See more details on using hashes here.

File details

Details for the file dc_license_system-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for dc_license_system-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6bdf8fe01b4f06f4b0aaecdec0a312aef8895e73f563eea0ba861abc388c94be
MD5 097c38e7d5eb45d074601b10750c0f8e
BLAKE2b-256 b10cb9e6535ad5261286999c427661d5d0cdf64aa2433099857e6c05d25d6a5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page