In web2py, your models and controllers are executed, not imported. They are executed every time a request arrives. If you click the [compile] button in admin, they will be compiled bytecode and some other optimizations will be performed.
If your application (in models and controllers) performs "import somemodule", then the import statement is executed for each request, but "somemodule" is actually imported only at the first start, as you requested.
source share