From 3bf81ca7eb3d83575bf59046ad56affb1153a059 Mon Sep 17 00:00:00 2001 From: Arvind Date: Fri, 21 Jun 2013 16:55:51 +0530 Subject: [PATCH] Initial commit --- sweetmaker.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sweetmaker.py diff --git a/sweetmaker.py b/sweetmaker.py new file mode 100644 index 0000000..6396d37 --- /dev/null +++ b/sweetmaker.py @@ -0,0 +1,19 @@ +import requests +import json +def make(what, who, where, how): + sweet = {} + sweet['what'] = what + sweet['who'] = who + sweet['where'] = where + sweet['how'] = how + sweet_list = [] + sweet_list.append(sweet) + return sweet_list + + +def send(sweet): + request = requests.api.post(SWEET_STORE_URL,{'data':json.dumps(sweet)}) + if request.status_code == 200: + return True + else: + return False \ No newline at end of file -- 1.7.10.4