0

I have a python script/app which is running on RPi in .py file. Now I need to share this app, but I want to protect the code.

On windows I always export it to .exe and share it in order to make it executable and protect the code (mostly using python auto-py-to-exepython auto-py-to-exe). What about Raspbian? Any suggestions?

Regards

Directx995
  • 17
  • 7

2 Answers2

1

Python, being a byte-code-compiled interpreted language, is very difficult to lock down.

So you have to apply ordinary commercial methods.

  1. Licenses or any other something like that.
  2. Offer web based service like PaaS, SaaS
Nyamkhuu Buyanjargal
  • 621
  • 2
  • 11
  • 29
1

The theoretical aspects if you can obfuscate python sourcecorde are already widely discussed for example in this stackoverflow question.

If you just want to make it a little bit harder for someone to read your code compiling it as .pyc could be a solution or maybe your .exe export even runs with WINE on raspbian.

53RT
  • 649
  • 3
  • 20
  • In the end, I compile it to `.pyc` and send it like that. I found some of those "decompilers" that can basically translate the code back to `.py` but I didn't research any further. Thanks for suggestion. – Directx995 Jul 28 '22 at 11:41
  • Perfect. Thank you for your reply, it is interesting for me to read what solution you chose. – 53RT Jul 28 '22 at 15:06