Blocking Dependencies

Yeah; as a rule, Python is not good at segregating one part of a program from another. Once someone can call your functions, they can mess with your code in all sorts of ways - it’s not a security boundary you can defend.

If you want to make something separate, make it a separate dependency and only import it into the apps that need it. Remember, you can import server modules in one app from another app - and you can even call server functions in a dependency from a dependent app! If you want your server functions not to be visible in the autocompleter in dependent apps, you can start their names with an underscore (_).

1 Like