keep in mind that no matter what protection you have, is someone want to crack it, he will. It is just a matter of time and if it is worth it. Protecting your work is important of course, but it takes time. You must find the right balance between protection efficiency and time spent on it.
If you encrypt your python file, it will block a lot of people being able to read your code but not all. Hackers will be able to decrypt your file and have access to the source code. From there, it is just a matter of time.
Because the balance "protection efficiency/ time spent on it" is different for all user, we cannot guide you finding the best solution. This is code design, and it is out of the scope of our support.
But if other developper want to share their experience here, they are free to.