Skip to content

Instantly share code, notes, and snippets.

View itissid's full-sized avatar

Sid itissid

  • New York
View GitHub Profile
@itissid
itissid / fun_orm.py
Created June 21, 2018 11:16 — forked from dmitric/fun_orm.py
A simple read-only ORM like functionality using python's __getattr__. Example uses tornado's torndb Connection and query
class Backend(object):
"""Allows access to backend and removes logic from handlers"""
def __init__(self):
"""Inititalize with the variables you need"""
self.__users_data = None
self.db = Connection(
options.db_host,
options.db,
user=options.db_user,