-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Userale and Stout classes. Currently buggy.
- Loading branch information
mooshu1x2
committed
Jun 9, 2016
1 parent
51c171e
commit 5ec7c69
Showing
2 changed files
with
142 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
''' | ||
distill: This package contains a flask app RESTful api for distill | ||
This flask app exposes some restful api endpoints for querying User-ALE. | ||
Very similar to Lucene syntax for basic query operations. | ||
Copyright 2016, The Charles Stark Draper Laboratory | ||
Licensed under Apache Software License. | ||
''' | ||
|
||
from distill import app | ||
import sqlite3 | ||
import pandas as pd | ||
|
||
class Stout (): | ||
conn = None | ||
cursor = None | ||
|
||
""" | ||
Parse master answer table into readable/queryable format | ||
""" | ||
def parse (f): | ||
pass | ||
|
||
def connect (): | ||
# Load Configurations | ||
app.config.from_pyfile('config.cfg') | ||
db = app.config ['SQLITEDB'] | ||
conn = sqlite3.connect (db) | ||
cursor = conn.cursor () | ||
|
||
def lookup (topic='SYS_IND_SESS_'): | ||
cursor.execute ('SELECT ' + topic + ' FROM stout') | ||
|
||
def operational_task (sessionID=''): | ||
pass | ||
# Look up session ID : tasknum in DB | ||
# Determine if performing task1 or task2 | ||
# Add new column OT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters