dao-treasury 0.0.35__cp311-cp311-win_amd64.whl → 0.1.1__cp311-cp311-win_amd64.whl

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.

Potentially problematic release.


This version of dao-treasury might be problematic. Click here for more details.

Files changed (49) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +567 -0
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +569 -0
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -57
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +15 -27
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +286 -25
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +54 -71
  7. dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json +367 -0
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +172 -209
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +122 -142
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +941 -0
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +3931 -0
  12. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +89 -108
  13. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +9 -4
  14. dao_treasury/ENVIRONMENT_VARIABLES.py +12 -0
  15. dao_treasury/__init__.py +14 -4
  16. dao_treasury/_docker.cp311-win_amd64.pyd +0 -0
  17. dao_treasury/_docker.py +44 -23
  18. dao_treasury/_nicknames.cp311-win_amd64.pyd +0 -0
  19. dao_treasury/_nicknames.py +18 -2
  20. dao_treasury/_wallet.cp311-win_amd64.pyd +0 -0
  21. dao_treasury/constants.cp311-win_amd64.pyd +0 -0
  22. dao_treasury/constants.py +24 -0
  23. dao_treasury/db.py +409 -119
  24. dao_treasury/docker-compose.yaml +19 -3
  25. dao_treasury/main.py +44 -3
  26. dao_treasury/sorting/__init__.cp311-win_amd64.pyd +0 -0
  27. dao_treasury/sorting/__init__.py +38 -21
  28. dao_treasury/sorting/_matchers.cp311-win_amd64.pyd +0 -0
  29. dao_treasury/sorting/_rules.cp311-win_amd64.pyd +0 -0
  30. dao_treasury/sorting/factory.cp311-win_amd64.pyd +0 -0
  31. dao_treasury/sorting/rule.cp311-win_amd64.pyd +0 -0
  32. dao_treasury/sorting/rule.py +8 -10
  33. dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd +0 -0
  34. dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd +0 -0
  35. dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd +0 -0
  36. dao_treasury/streams/llamapay.py +14 -2
  37. dao_treasury/treasury.py +37 -16
  38. dao_treasury/types.cp311-win_amd64.pyd +0 -0
  39. {dao_treasury-0.0.35.dist-info → dao_treasury-0.1.1.dist-info}/METADATA +19 -3
  40. dao_treasury-0.1.1.dist-info/RECORD +53 -0
  41. dao_treasury-0.1.1.dist-info/top_level.txt +2 -0
  42. dao_treasury__mypyc.cp311-win_amd64.pyd +0 -0
  43. bf2b4fe1f86ad2ea158b__mypyc.cp311-win_amd64.pyd +0 -0
  44. dao_treasury/.grafana/provisioning/dashboards/treasury/Treasury.json +0 -2018
  45. dao_treasury/streams/__init__.cp311-win_amd64.pyd +0 -0
  46. dao_treasury/streams/llamapay.cp311-win_amd64.pyd +0 -0
  47. dao_treasury-0.0.35.dist-info/RECORD +0 -51
  48. dao_treasury-0.0.35.dist-info/top_level.txt +0 -2
  49. {dao_treasury-0.0.35.dist-info → dao_treasury-0.1.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,567 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": {
7
+ "type": "grafana",
8
+ "uid": "-- Grafana --"
9
+ },
10
+ "enable": true,
11
+ "hide": true,
12
+ "iconColor": "rgba(0, 211, 255, 1)",
13
+ "name": "Annotations & Alerts",
14
+ "type": "dashboard"
15
+ }
16
+ ]
17
+ },
18
+ "description": "Provides a detailed breakdown of DAO expenses over time, including totals and averages by period and transaction group. Intended for monitoring spending trends, identifying cost drivers, and supporting financial reporting. Use the 'Top Level' and 'Tx Group' filters to view specific expense categories. Data Links in panels allow quick navigation to filtered transaction details.",
19
+ "editable": true,
20
+ "fiscalYearStartMonth": 0,
21
+ "graphTooltip": 1,
22
+ "id": 1,
23
+ "links": [],
24
+ "panels": [
25
+ {
26
+ "datasource": "PostgreSQL",
27
+ "description": "Displays the total expenses for the selected period, aggregated across all expense transaction groups. Useful for understanding overall spending.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
28
+ "fieldConfig": {
29
+ "defaults": {
30
+ "color": {
31
+ "fixedColor": "dark-red",
32
+ "mode": "fixed"
33
+ },
34
+ "mappings": [],
35
+ "thresholds": {
36
+ "mode": "absolute",
37
+ "steps": [
38
+ {
39
+ "color": "green",
40
+ "value": 0
41
+ },
42
+ {
43
+ "color": "red",
44
+ "value": 80
45
+ }
46
+ ]
47
+ },
48
+ "unit": "currencyUSD"
49
+ },
50
+ "overrides": [
51
+ {
52
+ "matcher": {
53
+ "id": "byName",
54
+ "options": "total_revenue"
55
+ },
56
+ "properties": [
57
+ {
58
+ "id": "links",
59
+ "value": [
60
+ {
61
+ "targetBlank": true,
62
+ "title": "View Expense Transactions For This Period",
63
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ "gridPos": {
72
+ "h": 4,
73
+ "w": 6,
74
+ "x": 0,
75
+ "y": 0
76
+ },
77
+ "id": 1,
78
+ "options": {
79
+ "colorMode": "background",
80
+ "graphMode": "area",
81
+ "justifyMode": "auto",
82
+ "orientation": "auto",
83
+ "percentChangeColorMode": "standard",
84
+ "reduceOptions": {
85
+ "calcs": ["lastNotNull"],
86
+ "fields": "",
87
+ "values": false
88
+ },
89
+ "showPercentChange": false,
90
+ "textMode": "auto",
91
+ "wideLayout": true
92
+ },
93
+ "pluginVersion": "12.2.1",
94
+ "targets": [
95
+ {
96
+ "datasource": "PostgreSQL",
97
+ "format": "table",
98
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
99
+ "refId": "A",
100
+ "timeColumns": ["time", "ts"]
101
+ }
102
+ ],
103
+ "title": "Expenses",
104
+ "type": "stat"
105
+ },
106
+ {
107
+ "datasource": "PostgreSQL",
108
+ "description": "Shows the average expenses per month for the selected period. Useful for tracking monthly spending trends.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
109
+ "fieldConfig": {
110
+ "defaults": {
111
+ "color": {
112
+ "fixedColor": "dark-red",
113
+ "mode": "fixed"
114
+ },
115
+ "mappings": [],
116
+ "thresholds": {
117
+ "mode": "absolute",
118
+ "steps": [
119
+ {
120
+ "color": "green",
121
+ "value": 0
122
+ },
123
+ {
124
+ "color": "red",
125
+ "value": 80
126
+ }
127
+ ]
128
+ },
129
+ "unit": "currencyUSD"
130
+ },
131
+ "overrides": [
132
+ {
133
+ "matcher": {
134
+ "id": "byName",
135
+ "options": "total_revenue"
136
+ },
137
+ "properties": [
138
+ {
139
+ "id": "links",
140
+ "value": [
141
+ {
142
+ "targetBlank": true,
143
+ "title": "View Expense Transactions For This Period",
144
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
145
+ }
146
+ ]
147
+ }
148
+ ]
149
+ }
150
+ ]
151
+ },
152
+ "gridPos": {
153
+ "h": 4,
154
+ "w": 6,
155
+ "x": 6,
156
+ "y": 0
157
+ },
158
+ "id": 4,
159
+ "options": {
160
+ "colorMode": "background",
161
+ "graphMode": "area",
162
+ "justifyMode": "auto",
163
+ "orientation": "auto",
164
+ "percentChangeColorMode": "standard",
165
+ "reduceOptions": {
166
+ "calcs": ["lastNotNull"],
167
+ "fields": "",
168
+ "values": false
169
+ },
170
+ "showPercentChange": false,
171
+ "textMode": "auto",
172
+ "wideLayout": true
173
+ },
174
+ "pluginVersion": "12.2.1",
175
+ "targets": [
176
+ {
177
+ "datasource": "PostgreSQL",
178
+ "format": "table",
179
+ "rawSql": "SELECT SUM(value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
180
+ "refId": "A",
181
+ "timeColumns": ["time", "ts"]
182
+ }
183
+ ],
184
+ "title": "Monthly Expenses",
185
+ "type": "stat"
186
+ },
187
+ {
188
+ "datasource": "PostgreSQL",
189
+ "description": "Shows the average expenses per week for the selected period. Useful for monitoring short-term spending changes.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
190
+ "fieldConfig": {
191
+ "defaults": {
192
+ "color": {
193
+ "fixedColor": "dark-red",
194
+ "mode": "fixed"
195
+ },
196
+ "mappings": [],
197
+ "thresholds": {
198
+ "mode": "absolute",
199
+ "steps": [
200
+ {
201
+ "color": "green",
202
+ "value": 0
203
+ },
204
+ {
205
+ "color": "red",
206
+ "value": 80
207
+ }
208
+ ]
209
+ },
210
+ "unit": "currencyUSD"
211
+ },
212
+ "overrides": [
213
+ {
214
+ "matcher": {
215
+ "id": "byName",
216
+ "options": "total_revenue"
217
+ },
218
+ "properties": [
219
+ {
220
+ "id": "links",
221
+ "value": [
222
+ {
223
+ "targetBlank": true,
224
+ "title": "View Expense Transactions For This Period",
225
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
226
+ }
227
+ ]
228
+ }
229
+ ]
230
+ }
231
+ ]
232
+ },
233
+ "gridPos": {
234
+ "h": 4,
235
+ "w": 6,
236
+ "x": 12,
237
+ "y": 0
238
+ },
239
+ "id": 2,
240
+ "options": {
241
+ "colorMode": "background",
242
+ "graphMode": "area",
243
+ "justifyMode": "auto",
244
+ "orientation": "auto",
245
+ "percentChangeColorMode": "standard",
246
+ "reduceOptions": {
247
+ "calcs": ["lastNotNull"],
248
+ "fields": "",
249
+ "values": false
250
+ },
251
+ "showPercentChange": false,
252
+ "textMode": "auto",
253
+ "wideLayout": true
254
+ },
255
+ "pluginVersion": "12.2.1",
256
+ "targets": [
257
+ {
258
+ "datasource": "PostgreSQL",
259
+ "format": "table",
260
+ "rawSql": "SELECT SUM(value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
261
+ "refId": "A",
262
+ "timeColumns": ["time", "ts"]
263
+ }
264
+ ],
265
+ "title": "Weekly Expenses",
266
+ "type": "stat"
267
+ },
268
+ {
269
+ "datasource": "PostgreSQL",
270
+ "description": "Shows the average expenses per day for the selected period. Useful for fine-grained monitoring of spending.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
271
+ "fieldConfig": {
272
+ "defaults": {
273
+ "color": {
274
+ "fixedColor": "dark-red",
275
+ "mode": "fixed"
276
+ },
277
+ "mappings": [],
278
+ "thresholds": {
279
+ "mode": "absolute",
280
+ "steps": [
281
+ {
282
+ "color": "green",
283
+ "value": 0
284
+ },
285
+ {
286
+ "color": "red",
287
+ "value": 80
288
+ }
289
+ ]
290
+ },
291
+ "unit": "currencyUSD"
292
+ },
293
+ "overrides": [
294
+ {
295
+ "matcher": {
296
+ "id": "byName",
297
+ "options": "total_revenue"
298
+ },
299
+ "properties": [
300
+ {
301
+ "id": "links",
302
+ "value": [
303
+ {
304
+ "targetBlank": true,
305
+ "title": "View Expense Transactions For This Period",
306
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
307
+ }
308
+ ]
309
+ }
310
+ ]
311
+ }
312
+ ]
313
+ },
314
+ "gridPos": {
315
+ "h": 4,
316
+ "w": 6,
317
+ "x": 18,
318
+ "y": 0
319
+ },
320
+ "id": 3,
321
+ "options": {
322
+ "colorMode": "background",
323
+ "graphMode": "area",
324
+ "justifyMode": "auto",
325
+ "orientation": "auto",
326
+ "percentChangeColorMode": "standard",
327
+ "reduceOptions": {
328
+ "calcs": ["lastNotNull"],
329
+ "fields": "",
330
+ "values": false
331
+ },
332
+ "showPercentChange": false,
333
+ "textMode": "auto",
334
+ "wideLayout": true
335
+ },
336
+ "pluginVersion": "12.2.1",
337
+ "targets": [
338
+ {
339
+ "datasource": "PostgreSQL",
340
+ "format": "table",
341
+ "rawSql": "SELECT SUM(value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
342
+ "refId": "A",
343
+ "timeColumns": ["time", "ts"]
344
+ }
345
+ ],
346
+ "title": "Daily Expenses",
347
+ "type": "stat"
348
+ },
349
+ {
350
+ "datasource": "PostgreSQL",
351
+ "description": "Time series chart of expenses by transaction group, aggregated weekly for the selected period. Useful for visualizing spending trends and identifying cost drivers.\n\nData Link: Clicking a group name opens a filtered transactions dashboard for that group and period.",
352
+ "fieldConfig": {
353
+ "defaults": {
354
+ "color": {
355
+ "fixedColor": "dark-red",
356
+ "mode": "continuous-YlRd",
357
+ "seriesBy": "max"
358
+ },
359
+ "custom": {
360
+ "axisBorderShow": false,
361
+ "axisCenteredZero": false,
362
+ "axisColorMode": "text",
363
+ "axisLabel": "",
364
+ "axisPlacement": "auto",
365
+ "barAlignment": 0,
366
+ "barWidthFactor": 0.6,
367
+ "drawStyle": "bars",
368
+ "fillOpacity": 70,
369
+ "gradientMode": "none",
370
+ "hideFrom": {
371
+ "legend": false,
372
+ "tooltip": false,
373
+ "viz": false
374
+ },
375
+ "insertNulls": false,
376
+ "lineInterpolation": "linear",
377
+ "lineWidth": 1,
378
+ "pointSize": 5,
379
+ "scaleDistribution": {
380
+ "type": "linear"
381
+ },
382
+ "showPoints": "auto",
383
+ "showValues": false,
384
+ "spanNulls": false,
385
+ "stacking": {
386
+ "group": "A",
387
+ "mode": "normal"
388
+ },
389
+ "thresholdsStyle": {
390
+ "mode": "off"
391
+ }
392
+ },
393
+ "mappings": [],
394
+ "thresholds": {
395
+ "mode": "absolute",
396
+ "steps": [
397
+ {
398
+ "color": "green",
399
+ "value": 0
400
+ }
401
+ ]
402
+ },
403
+ "unit": "currencyUSD"
404
+ },
405
+ "overrides": [
406
+ {
407
+ "matcher": {
408
+ "id": "byName",
409
+ "options": "Expenses (sum)"
410
+ },
411
+ "properties": [
412
+ {
413
+ "id": "links",
414
+ "value": [
415
+ {
416
+ "targetBlank": true,
417
+ "title": "View ${__series.name} Transactions",
418
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=${__series.name}&from=$__from&to=$__to"
419
+ }
420
+ ]
421
+ }
422
+ ]
423
+ }
424
+ ]
425
+ },
426
+ "gridPos": {
427
+ "h": 12,
428
+ "w": 24,
429
+ "x": 0,
430
+ "y": 4
431
+ },
432
+ "id": 11,
433
+ "options": {
434
+ "legend": {
435
+ "calcs": ["sum"],
436
+ "displayMode": "list",
437
+ "placement": "bottom",
438
+ "showLegend": true
439
+ },
440
+ "tooltip": {
441
+ "hideZeros": false,
442
+ "mode": "multi",
443
+ "sort": "none"
444
+ }
445
+ },
446
+ "pluginVersion": "12.2.1",
447
+ "targets": [
448
+ {
449
+ "datasource": "PostgreSQL",
450
+ "format": "table",
451
+ "rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\", txgroup_name AS \"TxGroup\", SUM(value_usd) AS \"Expenses\" FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring}) GROUP BY timestamp, txgroup_name ORDER BY timestamp;",
452
+ "refId": "A",
453
+ "timeColumns": ["timestamp"]
454
+ }
455
+ ],
456
+ "title": "Weekly Cashflow",
457
+ "transformations": [
458
+ {
459
+ "id": "formatTime",
460
+ "options": {
461
+ "outputFormat": "YYYY-WW",
462
+ "timeField": "timestamp",
463
+ "timezone": "browser",
464
+ "useTimezone": true
465
+ }
466
+ },
467
+ {
468
+ "id": "convertFieldType",
469
+ "options": {
470
+ "conversions": [
471
+ {
472
+ "dateFormat": "YYYY-WW",
473
+ "destinationType": "time",
474
+ "targetField": "timestamp"
475
+ }
476
+ ],
477
+ "fields": {}
478
+ }
479
+ },
480
+ {
481
+ "id": "groupBy",
482
+ "options": {
483
+ "fields": {
484
+ "Expenses": {
485
+ "aggregations": ["sum"],
486
+ "operation": "aggregate"
487
+ },
488
+ "TxGroup": {
489
+ "aggregations": [],
490
+ "operation": "groupby"
491
+ },
492
+ "timestamp": {
493
+ "aggregations": [],
494
+ "operation": "groupby"
495
+ }
496
+ }
497
+ }
498
+ },
499
+ {
500
+ "id": "partitionByValues",
501
+ "options": {
502
+ "fields": ["TxGroup"],
503
+ "keepFields": false,
504
+ "naming": {
505
+ "asLabels": false
506
+ }
507
+ }
508
+ }
509
+ ],
510
+ "type": "timeseries"
511
+ }
512
+ ],
513
+ "preload": false,
514
+ "refresh": "",
515
+ "schemaVersion": 42,
516
+ "tags": ["breakdown", "expenses"],
517
+ "templating": {
518
+ "list": [
519
+ {
520
+ "name": "TopLevel",
521
+ "label": "Top Level",
522
+ "type": "query",
523
+ "query": "SELECT DISTINCT top_category FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
524
+ "definition": "SELECT DISTINCT top_category FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
525
+ "description": "Filter the dashboard by top-level expense category.",
526
+ "includeAll": true,
527
+ "multi": true,
528
+ "current": {
529
+ "text": "All",
530
+ "value": "$__all"
531
+ },
532
+ "options": [],
533
+ "refresh": 2,
534
+ "regex": "",
535
+ "sort": 5
536
+ },
537
+ {
538
+ "allowCustomValue": true,
539
+ "current": {
540
+ "text": "All",
541
+ "value": "$__all"
542
+ },
543
+ "definition": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_expenses WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
544
+ "description": "Filter the dashboard by transaction group within the selected top-level categories.",
545
+ "includeAll": true,
546
+ "multi": true,
547
+ "label": "Tx Group",
548
+ "name": "Txgroup",
549
+ "options": [],
550
+ "query": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_expenses WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
551
+ "refresh": 2,
552
+ "regex": "",
553
+ "sort": 5,
554
+ "type": "query"
555
+ }
556
+ ]
557
+ },
558
+ "time": {
559
+ "from": "now-6M",
560
+ "to": "now"
561
+ },
562
+ "timepicker": {},
563
+ "timezone": "",
564
+ "title": "Expenses Over Time",
565
+ "uid": "62bccd38-918c-4395-9180-8f7f911e9ddf",
566
+ "version": 22
567
+ }