How do I protect my Python codebase so that guests can't see certain modules but so it still works?

后端 未结 3 1500
情深已故
情深已故 2021-01-03 09:09

We\'re starting a new project in Python with a few proprietary algorithms and sensitive bits of logic that we\'d like to keep private. We also will have a few outsiders (sel

3条回答
  •  情书的邮戳
    2021-01-03 09:43

    Use some sort of plugin system, and keep your plugins to your self, but also have publically available plugins that gets shipped with the open code.

    Plugin systems abound. You can easily make dead simple ones yourself. If you want something more advanced I prefer the Zope Component Architecture, but there are also options like setuptools entry_points, etc.

    Which one to use in your case would be a good second question.

提交回复
热议问题