It is OK to run an import statement on every request -- the Python 
interpreter will only import the module on the first request (per process) 
-- after that, it will remain in memory.

Anthony

On Saturday, February 18, 2017 at 3:45:05 PM UTC-5, Khalil Khamlichi wrote:
>
> Hello everyone, 
> I need to query redis a lot, do I have to import redis on each request ? 
> also I am sedning websocket messages, do I need to import websocket library 
> on every request ? isn"t there any way to load them permanently into web2py 
> ?
>
> Thanks in advance.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to