merge with upstream master

This commit is contained in:
Senad Uka
2017-12-19 15:18:35 +01:00
parent efb4547a37
commit 197db1003b
85 changed files with 2522 additions and 697 deletions

16
helix/json_builder.py Normal file
View File

@@ -0,0 +1,16 @@
try:
import ujson as json
except ImportError:
import json
class JsonBuilder:
def build_bom_output(self, rows):
data = []
headers = ['Part #', 'Description', 'Total']
for row in rows:
d = {}
for i, value in enumerate(row):
d[headers[i]] = value
data.append(d)
return json.dumps(data)