How to protect Python Code?
Option 1: Convert Python into Binaries, which client can’t decompile.
http://cython.org/ – Free, Apache License
Article on Cython: https://medium.com/@xpl/protecting-python-sources-using-cython-dcd940bb188e
Option 2: Minify / Obfuscate
Minify: Remove empty lines, comments,…etc
Obfuscate: Convert human-readable names to nonreadable format.
How to decompile “.PYC” Files?
Option 3: Please add copyright and other file headers to get a legal edge.
Note: Combination of all above based on business need.