Example #1
0
    def __init__(self, db="", user="******", host="genome-mysql.cse.ucsc.edu", password=""):
        self.db = db
        self.user = user
        self.host = host
        self.password = (":" + password) if password else ""
        self.dburl = self.url % dict(db=self.db, user=self.user,
            host=self.host, password=self.password)
        self.engine = create_engine(self.dburl)

        self.session, self.Base = initialize_sql(self.engine)
        self.models = __import__("models", globals(), locals(), ["Mixin"], -1)
Example #2
0
    def __init__(self, db="", user="******", host="genome-mysql.cse.ucsc.edu", password=""):
        self.db = db
        self.user = user
        self.host = host
        self.password = (":" + password) if password else ""
        self.dburl = self.url % dict(db=self.db, user=self.user,
            host=self.host, password=self.password)
        self.engine = create_engine(self.dburl)

        self.session, self.Base = initialize_sql(self.engine)
        self.models = __import__("models", globals(), locals(), ["Mixin"], -1)
Example #3
0
    def __init__(self, db="", user="******", host="genome-mysql.cse.ucsc.edu", password=""):
        if db.startswith(("sqlite://", "mysql://", "postgresql://")):
            self.url = db
            self.dburl = db
            self.user = self.host = self.password = ""
        else:
            self.db = db
            self.user = user
            self.host = host
            self.password = (":" + password) if password else ""
            self.dburl = self.url % dict(db=self.db, user=self.user,
                host=self.host, password=self.password)

        self.engine = create_engine(self.dburl)

        self.session, self.Base = initialize_sql(self.engine)
        self.models = __import__("models", globals(), locals(), ["Feature"], -1)