From 511dcb5a59f5fb10b15fb283c08cf2d90d708692 Mon Sep 17 00:00:00 2001 From: josiah Date: Thu, 29 Apr 2021 15:34:27 -0500 Subject: [PATCH] Move to only being a weird stub per examples. --- warren/__init__.py | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/warren/__init__.py b/warren/__init__.py index df33f45..a4c1641 100644 --- a/warren/__init__.py +++ b/warren/__init__.py @@ -1,34 +1,2 @@ -#!/usr/bin/env python -"""Part of the Weir project. -This will listen on two endpoints, and when data is -posted to the proper one, matching a particular format, -it will save that data to a local sqlite3 db.""" +"""Part of the Weir project.""" -import logging -import warren -from flask import Flask, redirect, url_for, request - -__version__ = "0.1.0" - -logging.basicConfig(level=logging.DEBUG) -dbpath = "warren.db" -app = Flask(__name__) - -@app.route('/') -def test(): - return 'the website is up you little bitch' - - -@app.route('/weir',methods = ['POST']) -def weir(): - """""" - try: - python_dict = request.get_json() - warren.write_to_db(python_dict, "warren.db") - return "OK" - except: - return "Error.", 400 - - -if __name__ == '__main__': - app.run(debug = True)