this is my first time ever making full python app with tkinter and wanting to distribute it. I've been searching the net, but I cant quite figure out how to make a license key for my application, as in I want a unique key I give to certain people which allows them to run the application, and also I want to able to deactivate that key and make new ones. Note this is an application for window computers, Thanks for any help in advance.
Check out keygen.sh - It's LaaS (Licensing as a service).
You create an account and generate license keys with or without an expiration date and number of unique devices. From your app, you then use their API to validate/activate your license.
There's an example showing device activation, license validation and deactivation.
I hope this helps :)
import requests
def license():
# The list with all keys.
keys = requests.get("http://yourlink.com/licensekeys.txt").text
# keys = ["key1", "key2", "key3"]
# License key from user.
keyfromuser = "mykey"
for key in keys.splitlines():
if key == keyfromuser:
# Code when key match.
return
# Code if the key don't match.
exit()
license()
you can generate using python uuid after that need to store in database from there you can authanticate, remove or add new keys.
If you want to convert it to exe then ship it with an installer, InstallForge app can generate serial codes for you. At the left panel of InstallForge, there is a Dialog section containing 'Serial Validation.' You can generate random serial codes with it and store it in your activation server.
© 2022 - 2024 — McMap. All rights reserved.