Can a site access py on other app not installed?

A js file in a custom app can still be accessed by a site, even if the custom app is not installed to the site, by putting it in build.json and call from hooks so it can be accessed via assets/js/.

What about the py files?
If I have a custom app that is not installed on a site, can the site still access/run the python method in that not-installed app?

Thank you.