'Protect python source code that runs as API

The company has built a python API with Machine Learning modules and we want to install this API on our customers' local server.

Of course, we don't want them to read the code, but when I try to use pyinstaller or pyarmor the fastAPI server can't understand the code anymore.

Is there a way to obfuscate or compile the python code and make it work with a server like fastapi with the uvicorn command?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source