Thread local proxy

from atasker import g

if not g.has('db'):
    g.set('db', <new_db_connection>)

Supports methods: