coderoftheday
coderoftheday

Reputation: 2075

Generating license keys for my python app

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.

Upvotes: 6

Views: 21308

Answers (4)

user1098761
user1098761

Reputation: 579

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.

Upvotes: 0

user16308018
user16308018

Reputation:

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()

Upvotes: 1

Swaroop
Swaroop

Reputation: 41

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.

Upvotes: 4

Prashant Godhani
Prashant Godhani

Reputation: 347

you can generate using python uuid after that need to store in database from there you can authanticate, remove or add new keys.

Upvotes: 0

Related Questions