DanDB 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
dandb-0.0.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Retro2D
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
dandb-0.0.2/PKG-INFO ADDED
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: DanDB
3
+ Version: 0.0.2
4
+ Summary: DanDB An open-source statistics module created by Daniel Long. Note: This module isn't ready for any heavy tasks yet. This is mostly a passion project built for fun by Danny.
5
+ Author-email: Daniel Long <dandevthetrue@gmail.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.8
9
+ Description-Content-Type: text/markdown
10
+
11
+ # DanDB
12
+ DanDB is a multi-purpose module built for statistics, analyitics, and some other uses (such as a limited selection of machine learning functions).
13
+
14
+ Current release is 0.0.1. It can:
15
+ -Create and manipulate some basic two-dimensional graphs
16
+ -Print out spreadsheets of those graphs
17
+ -Provide an amount of essential formulas for graphing, data science, and machine learning (currently W.I.P with ML formulas)
18
+
19
+ **IMPORTANT NOTICE:** This project is currently in pre-alpha. It currently isn't meant for any serious work; it is mostly a fun side project I am building.
20
+
21
+ # Guide
22
+ Guide to using the module's functions. Importing the module is what you do for any other module: `import DanDB`. That's it.
23
+
24
+ ## Creating a table:
25
+
26
+ To create a basic chart, use the `create_table()` function. The `create_table()` function has all the essential parameters for creating a basic table. It requires `name` and `rows` parameters to function; their usage is self explanatory.
27
+
28
+ The `name` parameter simply refers to the name you want to give the chart in both JSON and pretty print form, while the `rows` parameter refers to the amount of rows you want to give your chart.
29
+
30
+ Likewise, the `columns` parameter refers to the amount of columns you want to give your chart, though it isn't necessary (defaulted to one if not specified). The `data` parameter can either be a list or string, though only a list will have effect (any string will be IGNORED). As the name suggests, the `data` parameter will include the data visualized on your chart. If not inputted, it defaults to 0 for each column and row on your list. It also should be noted that the length of your list should reflect the size of the table (rows * columns). If it is less, default values of 0 will be added, and larger values will result in crashes.
31
+
32
+ The `xcolumn_names` and `ycolumn_names` parameters refer to the names of your columns (xcolumn) and rows (ycolumn). The default value for these parameters is "Unspecified". You can either input a list or string for each of them, though inputting a string will cause every row/column of your table to have that exact name. Lists are expected to be the exact length of either your columns or rows; wrong values can lead to unexpected behavior.
33
+
34
+ ## Modifying a table:
35
+ Tables have multiple methods and functions you can use to modify them. Here is a list of them:
36
+
37
+ ### methods:
38
+
39
+ 1. `table.addrow(rows, row_name, content)` Adds a row (or multiple rows) to your table. `rows` parameter specifies how many rows you want to add, while `row_name` parameter specifies what the names for the rows should be. The value given to this parameter will be used for each row added to the table through this function. `content` is used to specify the data given to the row. Unlike other methods/functions, `content` must strictly be a list for it to function.
40
+ 2. `table.changetitle(newtitle)` Pretty straightforward. You can change the visual title for your table using this function. The `newtitle` parameter specifies what your new title should be called. It must be a string.
41
+ 3. `table.destroy()` Destroys your entire table, and replaces it with a dummy table. Pretty straightforward; no parameters.
42
+ 4. `table.replace(lines, newval)` Replaces values at `lines` list/int with data from `newval` list. `lines` can be an int, though it will only replace data from one line.
43
+
44
+ ### functions
45
+
46
+ 1. `DanDB.prettyprint(table)` Prints the formatted contents of a `table` onto the terminal in an excel-like style.
47
+
48
+ # Outro
49
+ This README is a work in progress, and doesn't cover half of the things in this module. I would advise you to look into the `DanDB.py` file for more info on the functions and attributes of this module.
50
+
51
+ Good luck! -Dan.
dandb-0.0.2/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # DanDB
2
+ DanDB is a multi-purpose module built for statistics, analyitics, and some other uses (such as a limited selection of machine learning functions).
3
+
4
+ Current release is 0.0.1. It can:
5
+ -Create and manipulate some basic two-dimensional graphs
6
+ -Print out spreadsheets of those graphs
7
+ -Provide an amount of essential formulas for graphing, data science, and machine learning (currently W.I.P with ML formulas)
8
+
9
+ **IMPORTANT NOTICE:** This project is currently in pre-alpha. It currently isn't meant for any serious work; it is mostly a fun side project I am building.
10
+
11
+ # Guide
12
+ Guide to using the module's functions. Importing the module is what you do for any other module: `import DanDB`. That's it.
13
+
14
+ ## Creating a table:
15
+
16
+ To create a basic chart, use the `create_table()` function. The `create_table()` function has all the essential parameters for creating a basic table. It requires `name` and `rows` parameters to function; their usage is self explanatory.
17
+
18
+ The `name` parameter simply refers to the name you want to give the chart in both JSON and pretty print form, while the `rows` parameter refers to the amount of rows you want to give your chart.
19
+
20
+ Likewise, the `columns` parameter refers to the amount of columns you want to give your chart, though it isn't necessary (defaulted to one if not specified). The `data` parameter can either be a list or string, though only a list will have effect (any string will be IGNORED). As the name suggests, the `data` parameter will include the data visualized on your chart. If not inputted, it defaults to 0 for each column and row on your list. It also should be noted that the length of your list should reflect the size of the table (rows * columns). If it is less, default values of 0 will be added, and larger values will result in crashes.
21
+
22
+ The `xcolumn_names` and `ycolumn_names` parameters refer to the names of your columns (xcolumn) and rows (ycolumn). The default value for these parameters is "Unspecified". You can either input a list or string for each of them, though inputting a string will cause every row/column of your table to have that exact name. Lists are expected to be the exact length of either your columns or rows; wrong values can lead to unexpected behavior.
23
+
24
+ ## Modifying a table:
25
+ Tables have multiple methods and functions you can use to modify them. Here is a list of them:
26
+
27
+ ### methods:
28
+
29
+ 1. `table.addrow(rows, row_name, content)` Adds a row (or multiple rows) to your table. `rows` parameter specifies how many rows you want to add, while `row_name` parameter specifies what the names for the rows should be. The value given to this parameter will be used for each row added to the table through this function. `content` is used to specify the data given to the row. Unlike other methods/functions, `content` must strictly be a list for it to function.
30
+ 2. `table.changetitle(newtitle)` Pretty straightforward. You can change the visual title for your table using this function. The `newtitle` parameter specifies what your new title should be called. It must be a string.
31
+ 3. `table.destroy()` Destroys your entire table, and replaces it with a dummy table. Pretty straightforward; no parameters.
32
+ 4. `table.replace(lines, newval)` Replaces values at `lines` list/int with data from `newval` list. `lines` can be an int, though it will only replace data from one line.
33
+
34
+ ### functions
35
+
36
+ 1. `DanDB.prettyprint(table)` Prints the formatted contents of a `table` onto the terminal in an excel-like style.
37
+
38
+ # Outro
39
+ This README is a work in progress, and doesn't cover half of the things in this module. I would advise you to look into the `DanDB.py` file for more info on the functions and attributes of this module.
40
+
41
+ Good luck! -Dan.
@@ -0,0 +1,72 @@
1
+ [
2
+ "test",
3
+ [
4
+ [
5
+ [
6
+ [
7
+ 0,
8
+ "row",
9
+ 0,
10
+ "new value",
11
+ 0,
12
+ "newer value",
13
+ 0
14
+ ],
15
+ [
16
+ 1,
17
+ "row",
18
+ "newest value",
19
+ 0,
20
+ 0,
21
+ 0,
22
+ 0
23
+ ],
24
+ [
25
+ 2,
26
+ "row",
27
+ 0,
28
+ 0,
29
+ 0,
30
+ 0,
31
+ 0
32
+ ],
33
+ [
34
+ 3,
35
+ "other row",
36
+ 0,
37
+ 0,
38
+ 0,
39
+ 0,
40
+ 0
41
+ ],
42
+ [
43
+ 4,
44
+ "other row",
45
+ 0,
46
+ 0,
47
+ 0,
48
+ 0,
49
+ 0
50
+ ],
51
+ [
52
+ 5,
53
+ "other row",
54
+ 0,
55
+ 0,
56
+ 0,
57
+ 0,
58
+ 0
59
+ ]
60
+ ]
61
+ ],
62
+ [
63
+ [
64
+ "column",
65
+ "column",
66
+ "column",
67
+ "column",
68
+ "column"
69
+ ]
70
+ ]
71
+ ]
72
+ ]
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["hatchling >= 1.26"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "DanDB"
7
+ version = "0.0.2"
8
+ description = """
9
+ DanDB
10
+ An open-source statistics module created by Daniel Long.
11
+
12
+ Note: This module isn't ready for any heavy tasks yet. This is mostly a passion project
13
+ built for fun by Danny.
14
+ """
15
+
16
+ authors = [
17
+ { name = "Daniel Long", email = "dandevthetrue@gmail.com" }
18
+ ]
19
+
20
+ readme = "README.md"
21
+ license = "MIT"
22
+
23
+ requires-python = ">=3.8"
@@ -0,0 +1,356 @@
1
+ import json
2
+
3
+ #These are most of the basic functions inside of the DanDB module. :)
4
+
5
+ def about():
6
+ return("Welcome to DanDB! \nThis project was made for the Stardance hackathon, but I plan on using it for \ngeneral purpose. \nThis project is open-source, and readability friendly. \nFeel free to use for your own hacks! :D")
7
+
8
+ ### Statistic functions ###
9
+
10
+ def mean(array):
11
+ return sum(array)/len(array)
12
+
13
+ def median(array):
14
+ array.sort() #Sort our data, pretty self-explanatory.
15
+ if len(array)%2 == 0: #Checks if value is even
16
+ return mean([array[len(array)//2], array[len(array)//2-1]]) #Returns mean of middle, middle+1 values since there is no one middle value.
17
+
18
+ elif len(array)%2 == 1: #Checks if value is odd
19
+ return array[(len(array)-1)//2] #Returns the middle value. Pretty simple to understand.
20
+
21
+ def mse(act, pred):
22
+ #Error handling
23
+ if len(act)-len(pred) != 0:
24
+ raise ValueError("Actual and predicted values must be the same in length.")
25
+
26
+ #Actual function itself
27
+ squared_dif = []
28
+
29
+ for i, (a, p) in enumerate(zip(act, pred)):
30
+ squared_dif.append((a-p)**2) #Get difference squared for actual and predicted.
31
+
32
+ return mean(squared_dif) #Now we get the mean, which should be the output of the function.
33
+
34
+ def matrix_combine(*lists):
35
+ init_lists = [lst for lst in lists if lst]
36
+
37
+ if not init_lists:
38
+ return("Warning: matrix_combine function must have at least one argument")
39
+
40
+ return list(zip(init_lists))
41
+
42
+ ### Database functions ###
43
+
44
+ #Init database datatypes
45
+
46
+ class Table:
47
+
48
+ #Rate limiting
49
+
50
+ max_rows = 100000
51
+ max_data = 100000000
52
+ max_string = 1000
53
+
54
+ #Bundling function
55
+ def bundle_data_row(self, row, data):
56
+ output = []
57
+ chunk = []
58
+
59
+ for i in range(len(row)):
60
+ chunk = [i]
61
+ chunk.append(row[i])
62
+
63
+ for x in range(len(data)//len(row)):
64
+ chunk.append(data[i * (len(row)-1) + x])
65
+
66
+ output.append(chunk)
67
+
68
+ return(output)
69
+
70
+ def __init__(self, name: str, columns: int, rows=1, data=None, xcolumn_names=None, ycolumn_names=None):
71
+ if data == None:
72
+ data = []
73
+
74
+ if xcolumn_names == None:
75
+ xcolumn_names ='Unspecified'
76
+
77
+ if ycolumn_names == None:
78
+ ycolumn_names = 'Unspecified'
79
+
80
+ #Initialize params
81
+ self.name = name
82
+ self.columns = columns
83
+ self.rows = rows
84
+ self.dimensions = 3
85
+ self.data = data
86
+
87
+ #Error handling for wrong datatype
88
+ def column_check(self, column_val: int):
89
+ if not isinstance(column_val, int):
90
+ raise ValueError("Column datatype must be of int")
91
+
92
+ def dimen_check(self, dimen_val: int):
93
+ if not isinstance(dimen_val, int):
94
+ raise ValueError("Dimension datatype must be of int")
95
+
96
+
97
+ #Error handling for maximum thershold
98
+ def threshold_check(self, columns, rows):
99
+ if columns * rows > self.max_data:
100
+ raise ValueError("Total data value exceeds maximum threshold")
101
+
102
+ column_check(self, columns)
103
+
104
+ tableinit = []
105
+ xcolumns_init = []
106
+ ycolumns_init = []
107
+ mydata = []
108
+ tableinit.append(name)
109
+ fulldatasize = columns * rows
110
+
111
+ #Append data to table
112
+ if len(data) == 0 or isinstance(data, str):
113
+ if isinstance(data, str):
114
+ print("Warning: Inputting string values as data will not do anything, and instead call the default values of 0. If you want this, using [] as the input is \nthe best practice.")
115
+
116
+ for i in range(fulldatasize):
117
+ mydata.append(0)
118
+
119
+ elif fulldatasize != len(data) and isinstance(data, str) != True:
120
+ mydata = data
121
+ fixeddatasize = fulldatasize - len(data)
122
+
123
+ for i in range(fixeddatasize):
124
+ mydata.append(0)
125
+
126
+ else:
127
+ mydata = data
128
+
129
+ self.data = mydata
130
+
131
+ for i in range(columns):
132
+ if isinstance(xcolumn_names, str):
133
+ xcolumns_init.append(xcolumn_names)
134
+
135
+ else:
136
+ if len(xcolumn_names) == 1:
137
+ xcolumns_init.append(xcolumn_names[0])
138
+
139
+ else:
140
+ if i+1 <= len(xcolumn_names):
141
+ xcolumns_init.append(xcolumn_names[i])
142
+
143
+ else:
144
+ xcolumns_init.append("Unspecified")
145
+
146
+ self.columns = xcolumns_init
147
+
148
+ for i in range(rows):
149
+ if len(ycolumn_names) == 1:
150
+ ycolumns_init.append(ycolumn_names[0])
151
+
152
+ else:
153
+ if isinstance(ycolumn_names, str):
154
+ ycolumns_init.append(ycolumn_names)
155
+
156
+ else:
157
+ if i+1 <= len(ycolumn_names):
158
+ ycolumns_init.append(ycolumn_names[i])
159
+
160
+ else:
161
+ ycolumns_init.append("Unspecified")
162
+
163
+ self.ycolumns = ycolumns_init
164
+
165
+ bundledrows = self.bundle_data_row(self.ycolumns, mydata)
166
+
167
+ tableinit = matrix_combine(bundledrows, xcolumns_init)
168
+ self.table = [name, tableinit]
169
+
170
+ #Methods
171
+
172
+ def addrow(self, rows, row_name="undefined", content=None):
173
+ if content == None:
174
+ content = []
175
+
176
+ if rows <= 0:
177
+ raise ValueError("Row value must be at least one.")
178
+
179
+ if rows+len(self.ycolumns) > self.max_rows:
180
+ raise ValueError("Total row value exceeds maximum threshold")
181
+
182
+ for i in range(rows):
183
+ self.ycolumns.append(row_name)
184
+ for x in range(len(self.columns)):
185
+ if i+1 <= len(content):
186
+ self.data.append(content[i])
187
+ else:
188
+ self.data.append(0)
189
+
190
+ bundledrows = self.bundle_data_row(self.ycolumns, self.data)
191
+
192
+ tableinit = matrix_combine(bundledrows, self.columns)
193
+ self.table = [self.name, tableinit]
194
+
195
+ return self
196
+
197
+ def changetitle(self, newtitle):
198
+ self.table[0] = newtitle
199
+
200
+ def destroy(self):
201
+ self.table[0] = "Unnamed"
202
+ self.name = "Unnamed"
203
+ for i in range(len(self.data)):
204
+ self.data[i] = 0
205
+
206
+ for i in range(len(self.ycolumns)):
207
+ self.ycolumns[i] = "Unnamed"
208
+
209
+ for i in range(len(self.columns)):
210
+ self.columns[i] = "Unnamed"
211
+
212
+ bundledrows = self.bundle_data_row(self.ycolumns, self.data)
213
+
214
+ tableinit = matrix_combine(bundledrows, self.columns)
215
+ self.table = [self.name, tableinit]
216
+
217
+ def replace(self, lines, new_val):
218
+ if isinstance(lines, int):
219
+ self.data[lines] = new_val
220
+
221
+ elif isinstance(lines, list):
222
+ for i, x in enumerate(lines):
223
+ if isinstance(new_val, str):
224
+ self.data[x] = new_val
225
+ elif isinstance(new_val, list):
226
+ self.data[x] = new_val[i]
227
+
228
+ else:
229
+ raise ValueError("lines param must be either int or list datatype")
230
+
231
+ bundledrows = self.bundle_data_row(self.ycolumns, self.data)
232
+
233
+ tableinit = matrix_combine(bundledrows, self.columns)
234
+ self.table = [self.name, tableinit]
235
+
236
+ return self
237
+
238
+ #length organization methods
239
+
240
+ @staticmethod
241
+ def get_longest_item(inputlist):
242
+ if isinstance(inputlist, list):
243
+ longestitem = inputlist[0]
244
+ for i in inputlist:
245
+ if len(str(i)) > len(longestitem):
246
+ longestitem = str(i)
247
+ return(longestitem)
248
+
249
+ else:
250
+ raise ValueError("Input type must be list!")
251
+
252
+ @staticmethod
253
+ def get_shortest_item(inputlist):
254
+ if isinstance(inputlist, list):
255
+ longestitem = inputlist[0]
256
+ for i in inputlist:
257
+ if len(i) < len(longestitem):
258
+ longestitem = i
259
+ return(longestitem)
260
+
261
+ else:
262
+ raise ValueError("Input type must be list!")
263
+
264
+ def getlongestrow(self):
265
+ return(self.get_longest_item(self.ycolumns))
266
+
267
+ def getlongestcolumn(self):
268
+ return(self.get_longest_item(self.columns))
269
+
270
+ #padding methods
271
+
272
+ @staticmethod
273
+ def getrowpadding(currentrow, toprow):
274
+ return (f"{' ' * (toprow - len(str(currentrow)))}{currentrow}|")
275
+
276
+ def getjson(self):
277
+ return(json.dumps(self.table, separators=(',', ':')))
278
+
279
+ def getformattedjson(self):
280
+ return(json.dumps(self.table, indent=2))
281
+
282
+ #File saving
283
+ def writejson(self, filename):
284
+ with open(filename, "w") as f:
285
+ f.write(json.dumps(self.table, indent=2))
286
+
287
+
288
+
289
+ #Now, here are the functions :)
290
+
291
+ def create_table(name, rows, columns=1, data=None, column_names="Unspecified", row_names="Unspecified"):
292
+ if data == None:
293
+ data = []
294
+
295
+ new_table = Table(name, rows, columns, data, column_names, row_names)
296
+ return new_table
297
+
298
+ def table_addxy(table, y_rep):
299
+ pass
300
+
301
+ def return_raw(table_name):
302
+ return table_name.table
303
+
304
+ def pretty_print(table_name):
305
+ printinit = [] #This list defines our content, since we cannot return mroe than once.
306
+ toprowinit = []
307
+ longestrow = len(table_name.getlongestrow())
308
+ toppadding = ""
309
+ for i in range(round((longestrow-len(table_name.table[0]))/2)):
310
+ toppadding = toppadding+"="
311
+
312
+ for i in range((round(sum(map(len, table_name.columns))/2))):
313
+ toppadding = toppadding+"="
314
+
315
+ for i in range(len(table_name.columns)):
316
+ toppadding = toppadding+"="
317
+
318
+ printinit.append(f"{toppadding}{table_name.table[0]}{toppadding}")
319
+ spacing = ""
320
+
321
+ for i in range(longestrow):
322
+ spacing = spacing+" "
323
+ toprowinit.append(f"{spacing}| ")
324
+
325
+ for i in table_name.columns:
326
+ toprowinit.append(f"{i}| ")
327
+
328
+ toprowinitcontent = "".join(toprowinit)
329
+ printinit.append(toprowinitcontent)
330
+
331
+ for i, item1 in enumerate(table_name.ycolumns): #For every item in table
332
+ columninit = (f"{' ' * (longestrow - len(str(item1)))}{item1}|")
333
+
334
+ for x, item2 in enumerate(table_name.columns): #For for every column in table
335
+ dataindex = table_name.data[i * len(table_name.columns) + x] #Gets the current item by getting the current row (represented by i), multiplying it by the amount of columns to find where the row is on the list, and then adds x (the column pointer) to find which column it is located at. This results in the exact location of the data.
336
+ xindex = table_name.columns[i%len(table_name.columns)]
337
+
338
+ #Length conditions
339
+
340
+ if i-1 <=len(table_name.data):
341
+ if len(str(dataindex)) == len(xindex)+1:
342
+ columninit = columninit + (f"{dataindex}|") #Explain this later
343
+
344
+ elif len(str(dataindex)) < len(xindex)+1:
345
+ columninit = columninit + (f"{dataindex}{' '* ((len(xindex)+1) - len(str(dataindex)))}|") #Explain this later
346
+
347
+ else:
348
+ cleaneddata = ""
349
+ for y in range((len(xindex))+1):
350
+ cleaneddata += str(str(dataindex)[y])
351
+
352
+ columninit = columninit + (f"{(cleaneddata)}|") #Explain this later
353
+
354
+ printinit.append(columninit)
355
+
356
+ print(*printinit, sep="\n", end="") #This is our pretty print!
@@ -0,0 +1,12 @@
1
+ from .DanDB import *
2
+
3
+ """
4
+ DanDB
5
+ An open-source statistics module created by Daniel Long.
6
+
7
+ Run DanDB.about() for more info.
8
+
9
+ v0.0.1
10
+ """
11
+
12
+ __version__ = "0.0.1b"
@@ -0,0 +1,12 @@
1
+ # A basic demo for DanDB, showing how a table is sucessfully made.
2
+
3
+ import DanDB
4
+
5
+ table = DanDB.create_table("test", 5, 3, [], "column", "row") # Creating a basic table with unspecified data, column and row names of "column" and "row" respectively.
6
+
7
+ table.addrow(3, "other row") # Add three other rows with the names "other row"
8
+ table.replace([1, 3, 5], ['new value', 'newer value', 'newest value']) # Replaces data at list index 1, 3, and five with "ndw value", "newer value", and "newest value" respectively. (please note that indexes are added by one as per Python's default indexing guidelines. For example, first item in table is at index zero).
9
+
10
+ DanDB.pretty_print(table) # Pretty print our table. Pretty straightforward.
11
+
12
+ table.writejson("example.json") # Writes json of table to example.json file