Mercurial > mozilla > hg > talosnames
diff talosnames/api.py @ 1:a10ae1ea8325
WIP
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 08 Jul 2012 10:09:51 -0700 |
parents | 3e1f069ac608 |
children | c98f2a383595 |
line wrap: on
line diff
--- a/talosnames/api.py Fri Jul 06 16:22:42 2012 -0700 +++ b/talosnames/api.py Sun Jul 08 10:09:51 2012 -0700 @@ -1,5 +1,21 @@ +import sqlite3 +import urllib2 + class TalosNames(object): graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql' - + schema = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/schema.sql' + + tables = ['os_list', + 'branches', + 'machines', + 'pagesets', + 'tests'] + def __init__(self): - import pdb; pdb.set_trace() + self.db = sqlite3.connect(':memory:') + for table in self.tables: + pass + schema = urllib2.urlopen(self.schema).read() + cursor = self.db.cursor() + cursor.executescript(schema) +