Copy Protection Solution for Python Software

You can use Dinkey Pro dongles to copy-protect your Python and Cython applications.

The easiest way to protect your Python code is to call the API via Python extensions that are provided in the Dinkey Pro SDK. This allows you to can communicate with the dongle and perform other more technical security checks. 32-bit and 64-bit extensions are provided for Windows, macOS and Linux for all actively-maintained versions of Python. Each version of Python requires a different extension.

The Dinkey Pro SDK also contains Python sample code that demonstrates how to call the relevant Python extensions and fully utilise the functionality offered by the dongle. Examples include checking for the presence of the dongle, executing algorithms inside the dongle, reading and writing data inside the dongle and using the dongle to encrypt or decrypt data passed to it.

Sample code is also provided for both 32-bit and 64-bit Cython that is compatible with both Python 2.x and 3.x. When using Cython you can statically link our API libraries rather than use the dynamically-loaded Python extension modules. This uses native machine code rather than bytecode and so offers a higher level of security and is the preferred solution where possible.

Using the automatic Shell method of protection on executables generated from Python scripts by a 3rd-party tool (such as py2exe, for example) is not recommended. This is because your Python code has not been compiled to native machine code but instead the executable is just a stub loader which still contains your raw Python .py files in an unprotected form.

Learn more about Dinkey Pro