summaryrefslogtreecommitdiff
path: root/ausbutler/interface.py
diff options
context:
space:
mode:
Diffstat (limited to 'ausbutler/interface.py')
-rw-r--r--ausbutler/interface.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ausbutler/interface.py b/ausbutler/interface.py
new file mode 100644
index 0000000..95696c1
--- /dev/null
+++ b/ausbutler/interface.py
@@ -0,0 +1,14 @@
+from .db import Session
+
+
+class Interface:
+
+ def __init__(self):
+ self.session = Session()
+
+ def init_db(self, force=False):
+ from .model import Base
+ if force:
+ Base.metadata.drop_all(self.session.get_bind())
+ Base.metadata.create_all(self.session.get_bind())
+