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.3.tar.gz (3.4 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.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dc_license_system-0.0.3.tar.gz
  • Upload date:
  • Size: 3.4 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.3.tar.gz
Algorithm Hash digest
SHA256 873d88c462512f3af481664fab9db4e8df460c5020447802ac1fede877fa3878
MD5 b5b82d31c4009f420697133ffb781de7
BLAKE2b-256 13bdbb63cd40f3da08461d2fbc4cc1c10a96f49c451947b4d9c3e862845b96d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dc_license_system-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b3ebb5b55ab33d17259b1c0881c5e2f92b6e7da10654afcf23de84836d9b252c
MD5 bb6cf78ac12c9c4f144000a9875cacde
BLAKE2b-256 f37a0b4899dbc7debb11912177abc85e9ace1c5edc9db6cbfb8663bdf84f264e

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