dao-treasury 0.0.62__cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.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 (54) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +526 -0
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +526 -0
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +84 -0
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +225 -0
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +108 -0
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +360 -0
  7. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +876 -0
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +645 -0
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +593 -0
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2999 -0
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +513 -0
  12. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +17 -0
  13. dao_treasury/ENVIRONMENT_VARIABLES.py +20 -0
  14. dao_treasury/__init__.py +62 -0
  15. dao_treasury/_docker.cpython-312-i386-linux-gnu.so +0 -0
  16. dao_treasury/_docker.py +193 -0
  17. dao_treasury/_nicknames.cpython-312-i386-linux-gnu.so +0 -0
  18. dao_treasury/_nicknames.py +32 -0
  19. dao_treasury/_wallet.cpython-312-i386-linux-gnu.so +0 -0
  20. dao_treasury/_wallet.py +250 -0
  21. dao_treasury/constants.cpython-312-i386-linux-gnu.so +0 -0
  22. dao_treasury/constants.py +39 -0
  23. dao_treasury/db.py +1450 -0
  24. dao_treasury/docker-compose.yaml +41 -0
  25. dao_treasury/main.py +253 -0
  26. dao_treasury/py.typed +0 -0
  27. dao_treasury/sorting/__init__.cpython-312-i386-linux-gnu.so +0 -0
  28. dao_treasury/sorting/__init__.py +295 -0
  29. dao_treasury/sorting/_matchers.cpython-312-i386-linux-gnu.so +0 -0
  30. dao_treasury/sorting/_matchers.py +387 -0
  31. dao_treasury/sorting/_rules.cpython-312-i386-linux-gnu.so +0 -0
  32. dao_treasury/sorting/_rules.py +235 -0
  33. dao_treasury/sorting/factory.cpython-312-i386-linux-gnu.so +0 -0
  34. dao_treasury/sorting/factory.py +299 -0
  35. dao_treasury/sorting/rule.cpython-312-i386-linux-gnu.so +0 -0
  36. dao_treasury/sorting/rule.py +344 -0
  37. dao_treasury/sorting/rules/__init__.cpython-312-i386-linux-gnu.so +0 -0
  38. dao_treasury/sorting/rules/__init__.py +1 -0
  39. dao_treasury/sorting/rules/ignore/__init__.cpython-312-i386-linux-gnu.so +0 -0
  40. dao_treasury/sorting/rules/ignore/__init__.py +1 -0
  41. dao_treasury/sorting/rules/ignore/llamapay.cpython-312-i386-linux-gnu.so +0 -0
  42. dao_treasury/sorting/rules/ignore/llamapay.py +20 -0
  43. dao_treasury/streams/__init__.cpython-312-i386-linux-gnu.so +0 -0
  44. dao_treasury/streams/__init__.py +0 -0
  45. dao_treasury/streams/llamapay.cpython-312-i386-linux-gnu.so +0 -0
  46. dao_treasury/streams/llamapay.py +388 -0
  47. dao_treasury/treasury.py +191 -0
  48. dao_treasury/types.cpython-312-i386-linux-gnu.so +0 -0
  49. dao_treasury/types.py +133 -0
  50. dao_treasury-0.0.62.dist-info/METADATA +120 -0
  51. dao_treasury-0.0.62.dist-info/RECORD +54 -0
  52. dao_treasury-0.0.62.dist-info/WHEEL +7 -0
  53. dao_treasury-0.0.62.dist-info/top_level.txt +2 -0
  54. dao_treasury__mypyc.cpython-312-i386-linux-gnu.so +0 -0
@@ -0,0 +1,513 @@
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
+ "editable": true,
19
+ "fiscalYearStartMonth": 0,
20
+ "graphTooltip": 1,
21
+ "id": 6,
22
+ "links": [],
23
+ "panels": [
24
+ {
25
+ "datasource": "SQLite",
26
+ "fieldConfig": {
27
+ "unit": "currencyUSD",
28
+ "defaults": {
29
+ "color": {
30
+ "mode": "thresholds"
31
+ },
32
+ "mappings": [],
33
+ "thresholds": {
34
+ "mode": "absolute",
35
+ "steps": [
36
+ {
37
+ "color": "green",
38
+ "value": 0
39
+ },
40
+ {
41
+ "color": "red",
42
+ "value": 80
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "overrides": []
48
+ },
49
+ "gridPos": {
50
+ "h": 4,
51
+ "w": 6,
52
+ "x": 0,
53
+ "y": 0
54
+ },
55
+ "id": 1,
56
+ "options": {
57
+ "colorMode": "value",
58
+ "graphMode": "area",
59
+ "justifyMode": "auto",
60
+ "orientation": "auto",
61
+ "percentChangeColorMode": "standard",
62
+ "reduceOptions": {
63
+ "calcs": [
64
+ "lastNotNull"
65
+ ],
66
+ "fields": "",
67
+ "values": false
68
+ },
69
+ "showPercentChange": false,
70
+ "textMode": "auto",
71
+ "wideLayout": true
72
+ },
73
+ "pluginVersion": "12.1.1",
74
+ "targets": [
75
+ {
76
+ "datasource": "SQLite",
77
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
78
+ "queryType": "table",
79
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
80
+ "refId": "A",
81
+ "timeColumns": [
82
+ "time",
83
+ "ts"
84
+ ]
85
+ }
86
+ ],
87
+ "title": "Revenue",
88
+ "type": "stat"
89
+ },
90
+ {
91
+ "datasource": "SQLite",
92
+ "fieldConfig": {
93
+ "unit": "currencyUSD",
94
+ "defaults": {
95
+ "color": {
96
+ "mode": "thresholds"
97
+ },
98
+ "mappings": [],
99
+ "thresholds": {
100
+ "mode": "absolute",
101
+ "steps": [
102
+ {
103
+ "color": "green",
104
+ "value": 0
105
+ },
106
+ {
107
+ "color": "red",
108
+ "value": 80
109
+ }
110
+ ]
111
+ }
112
+ },
113
+ "overrides": []
114
+ },
115
+ "gridPos": {
116
+ "h": 4,
117
+ "w": 6,
118
+ "x": 6,
119
+ "y": 0
120
+ },
121
+ "id": 3,
122
+ "options": {
123
+ "colorMode": "value",
124
+ "graphMode": "area",
125
+ "justifyMode": "auto",
126
+ "orientation": "auto",
127
+ "percentChangeColorMode": "standard",
128
+ "reduceOptions": {
129
+ "calcs": [
130
+ "lastNotNull"
131
+ ],
132
+ "fields": "",
133
+ "values": false
134
+ },
135
+ "showPercentChange": false,
136
+ "textMode": "auto",
137
+ "wideLayout": true
138
+ },
139
+ "pluginVersion": "12.1.1",
140
+ "targets": [
141
+ {
142
+ "datasource": "SQLite",
143
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
144
+ "queryType": "table",
145
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
146
+ "refId": "A",
147
+ "timeColumns": [
148
+ "time",
149
+ "ts"
150
+ ]
151
+ }
152
+ ],
153
+ "title": "Cost of Revenue",
154
+ "type": "stat"
155
+ },
156
+ {
157
+ "datasource": "SQLite",
158
+ "fieldConfig": {
159
+ "unit": "currencyUSD",
160
+ "defaults": {
161
+ "color": {
162
+ "mode": "thresholds"
163
+ },
164
+ "mappings": [],
165
+ "thresholds": {
166
+ "mode": "absolute",
167
+ "steps": [
168
+ {
169
+ "color": "green",
170
+ "value": 0
171
+ },
172
+ {
173
+ "color": "red",
174
+ "value": 80
175
+ }
176
+ ]
177
+ }
178
+ },
179
+ "overrides": []
180
+ },
181
+ "gridPos": {
182
+ "h": 4,
183
+ "w": 6,
184
+ "x": 12,
185
+ "y": 0
186
+ },
187
+ "id": 2,
188
+ "options": {
189
+ "colorMode": "value",
190
+ "graphMode": "area",
191
+ "justifyMode": "auto",
192
+ "orientation": "auto",
193
+ "percentChangeColorMode": "standard",
194
+ "reduceOptions": {
195
+ "calcs": [
196
+ "lastNotNull"
197
+ ],
198
+ "fields": "",
199
+ "values": false
200
+ },
201
+ "showPercentChange": false,
202
+ "textMode": "auto",
203
+ "wideLayout": true
204
+ },
205
+ "pluginVersion": "12.1.1",
206
+ "targets": [
207
+ {
208
+ "datasource": "SQLite",
209
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
210
+ "queryType": "table",
211
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
212
+ "refId": "A",
213
+ "timeColumns": [
214
+ "time",
215
+ "ts"
216
+ ]
217
+ }
218
+ ],
219
+ "title": "Expenses",
220
+ "type": "stat"
221
+ },
222
+ {
223
+ "datasource": "SQLite",
224
+ "description": "",
225
+ "fieldConfig": {
226
+ "unit": "currencyUSD",
227
+ "defaults": {
228
+ "color": {
229
+ "mode": "thresholds"
230
+ },
231
+ "mappings": [],
232
+ "thresholds": {
233
+ "mode": "absolute",
234
+ "steps": [
235
+ {
236
+ "color": "green",
237
+ "value": 0
238
+ },
239
+ {
240
+ "color": "red",
241
+ "value": 80
242
+ }
243
+ ]
244
+ }
245
+ },
246
+ "overrides": []
247
+ },
248
+ "gridPos": {
249
+ "h": 4,
250
+ "w": 6,
251
+ "x": 18,
252
+ "y": 0
253
+ },
254
+ "id": 10,
255
+ "options": {
256
+ "colorMode": "value",
257
+ "graphMode": "area",
258
+ "justifyMode": "auto",
259
+ "orientation": "auto",
260
+ "percentChangeColorMode": "standard",
261
+ "reduceOptions": {
262
+ "calcs": [
263
+ "lastNotNull"
264
+ ],
265
+ "fields": "",
266
+ "values": false
267
+ },
268
+ "showPercentChange": false,
269
+ "textMode": "auto",
270
+ "wideLayout": true
271
+ },
272
+ "pluginVersion": "12.1.1",
273
+ "targets": [
274
+ {
275
+ "datasource": "SQLite",
276
+ "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
277
+ "queryType": "table",
278
+ "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
279
+ "refId": "A",
280
+ "timeColumns": [
281
+ "time",
282
+ "ts"
283
+ ]
284
+ }
285
+ ],
286
+ "title": "Operating Total",
287
+ "type": "stat"
288
+ },
289
+ {
290
+ "datasource": "SQLite",
291
+ "description": "",
292
+ "fieldConfig": {
293
+ "unit": "currencyUSD",
294
+ "defaults": {
295
+ "color": {
296
+ "mode": "palette-classic"
297
+ },
298
+ "custom": {
299
+ "axisBorderShow": false,
300
+ "axisCenteredZero": false,
301
+ "axisColorMode": "text",
302
+ "axisLabel": "",
303
+ "axisPlacement": "auto",
304
+ "barAlignment": 0,
305
+ "barWidthFactor": 0.6,
306
+ "drawStyle": "bars",
307
+ "fillOpacity": 70,
308
+ "gradientMode": "none",
309
+ "hideFrom": {
310
+ "legend": false,
311
+ "tooltip": false,
312
+ "viz": false
313
+ },
314
+ "insertNulls": false,
315
+ "lineInterpolation": "linear",
316
+ "lineWidth": 1,
317
+ "pointSize": 5,
318
+ "scaleDistribution": {
319
+ "type": "linear"
320
+ },
321
+ "showPoints": "auto",
322
+ "spanNulls": false,
323
+ "stacking": {
324
+ "group": "A",
325
+ "mode": "normal"
326
+ },
327
+ "thresholdsStyle": {
328
+ "mode": "off"
329
+ }
330
+ },
331
+ "mappings": [],
332
+ "thresholds": {
333
+ "mode": "absolute",
334
+ "steps": [
335
+ {
336
+ "color": "green",
337
+ "value": 0
338
+ },
339
+ {
340
+ "color": "red",
341
+ "value": 80
342
+ }
343
+ ]
344
+ }
345
+ },
346
+ "overrides": [
347
+ {
348
+ "matcher": {
349
+ "id": "byName",
350
+ "options": "Net (sum)"
351
+ },
352
+ "properties": [
353
+ {
354
+ "id": "custom.drawStyle",
355
+ "value": "line"
356
+ },
357
+ {
358
+ "id": "custom.stacking",
359
+ "value": {
360
+ "group": "A",
361
+ "mode": "none"
362
+ }
363
+ },
364
+ {
365
+ "id": "custom.fillOpacity",
366
+ "value": 19
367
+ }
368
+ ]
369
+ }
370
+ ]
371
+ },
372
+ "gridPos": {
373
+ "h": 12,
374
+ "w": 24,
375
+ "x": 0,
376
+ "y": 4
377
+ },
378
+ "id": 11,
379
+ "options": {
380
+ "legend": {
381
+ "calcs": [],
382
+ "displayMode": "list",
383
+ "placement": "bottom",
384
+ "showLegend": true
385
+ },
386
+ "tooltip": {
387
+ "hideZeros": false,
388
+ "mode": "single",
389
+ "sort": "none"
390
+ }
391
+ },
392
+ "pluginVersion": "12.1.1",
393
+ "targets": [
394
+ {
395
+ "datasource": "SQLite",
396
+ "queryText": "SELECT t.timestamp,\r\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END) AS \"Total Revenue\",\r\n SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Expenses\",\r\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses') THEN t.value_usd ELSE 0 END) AS \"Net\"\r\nFROM general_ledger AS t\r\nJOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id\r\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000\r\nGROUP BY timestamp\r\nORDER BY timestamp;",
397
+ "queryType": "table",
398
+ "rawQueryText": "SELECT t.timestamp,\r\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END) AS \"Total Revenue\",\r\n SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Expenses\",\r\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses') THEN t.value_usd ELSE 0 END) AS \"Net\"\r\nFROM general_ledger AS t\r\nJOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id\r\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000\r\nGROUP BY timestamp\r\nORDER BY timestamp;",
399
+ "refId": "A",
400
+ "timeColumns": [
401
+ "timestamp"
402
+ ]
403
+ }
404
+ ],
405
+ "title": "Weekly Cashflow",
406
+ "transformations": [
407
+ {
408
+ "id": "formatTime",
409
+ "options": {
410
+ "outputFormat": "YYYY-WW",
411
+ "timeField": "timestamp",
412
+ "timezone": "browser",
413
+ "useTimezone": true
414
+ }
415
+ },
416
+ {
417
+ "id": "convertFieldType",
418
+ "options": {
419
+ "conversions": [
420
+ {
421
+ "dateFormat": "YYYY-WW",
422
+ "destinationType": "time",
423
+ "targetField": "timestamp"
424
+ }
425
+ ],
426
+ "fields": {}
427
+ }
428
+ },
429
+ {
430
+ "id": "groupBy",
431
+ "options": {
432
+ "fields": {
433
+ "Cost of Revenue": {
434
+ "aggregations": [
435
+ "sum"
436
+ ],
437
+ "operation": "aggregate"
438
+ },
439
+ "Expenses": {
440
+ "aggregations": [
441
+ "sum"
442
+ ],
443
+ "operation": "aggregate"
444
+ },
445
+ "Net": {
446
+ "aggregations": [
447
+ "sum"
448
+ ],
449
+ "operation": "aggregate"
450
+ },
451
+ "Other Expenses": {
452
+ "aggregations": [
453
+ "sum"
454
+ ],
455
+ "operation": "aggregate"
456
+ },
457
+ "Other Income": {
458
+ "aggregations": [
459
+ "sum"
460
+ ],
461
+ "operation": "aggregate"
462
+ },
463
+ "Revenue": {
464
+ "aggregations": [
465
+ "sum"
466
+ ],
467
+ "operation": "aggregate"
468
+ },
469
+ "Timestamp": {
470
+ "aggregations": [],
471
+ "operation": "groupby"
472
+ },
473
+ "Total Expenses": {
474
+ "aggregations": [
475
+ "sum"
476
+ ],
477
+ "operation": "aggregate"
478
+ },
479
+ "Total Revenue": {
480
+ "aggregations": [
481
+ "sum"
482
+ ],
483
+ "operation": "aggregate"
484
+ },
485
+ "timestamp": {
486
+ "aggregations": [],
487
+ "operation": "groupby"
488
+ }
489
+ }
490
+ }
491
+ }
492
+ ],
493
+ "type": "timeseries"
494
+ }
495
+ ],
496
+ "preload": false,
497
+ "refresh": "",
498
+ "schemaVersion": 41,
499
+ "tags": [],
500
+ "templating": {
501
+ "list": []
502
+ },
503
+ "time": {
504
+ "from": "now-6M",
505
+ "to": "now"
506
+ },
507
+ "timepicker": {},
508
+ "timezone": "",
509
+ "title": "Operating Cashflow Summary",
510
+ "description": "Provides a focused view of core operational cashflows, including only sorted transactions in Revenue, Cost of Revenue, and Expenses categories. Excludes unsorted transactions and non-operational activity, helping monitor specifically the DAO's operational financial flows.",
511
+ "uid": "fdf9969c-357a-4203-ae7b-12816e87bc7e",
512
+ "version": 5
513
+ }
@@ -0,0 +1,17 @@
1
+ apiVersion: 1
2
+
3
+ datasources:
4
+ - name: SQLite
5
+ type: frser-sqlite-datasource
6
+ isDefault: true
7
+ editable: false
8
+ jsonData:
9
+ path: /app/dao-treasury-data/dao-treasury.sqlite
10
+ secureJsonData: {}
11
+
12
+ - name: 'PROMETHEUS'
13
+ type: 'prometheus'
14
+ access: 'proxy'
15
+ url: 'http://victoria-metrics:8428'
16
+ version: 1
17
+ editable: false
@@ -0,0 +1,20 @@
1
+ """Environment variable configuration for DAO Treasury.
2
+
3
+ Defines and loads environment variables (with types and defaults) used for
4
+ system configuration, such as SQL debugging. Uses :mod:`typed_envs` for convenience and safety.
5
+
6
+ Key Responsibilities:
7
+ - Define and load environment variables for the system.
8
+ - Provide type-safe access to configuration options.
9
+
10
+ This is the single source of truth for environment-based settings.
11
+ """
12
+
13
+ from typing import Final
14
+
15
+ from typed_envs import EnvVarFactory
16
+
17
+
18
+ _factory = EnvVarFactory("DAO_TREASURY")
19
+
20
+ SQL_DEBUG: Final = _factory.create_env("SQL_DEBUG", bool, default=False, verbose=False)
@@ -0,0 +1,62 @@
1
+ """DAO Treasury package initializer.
2
+
3
+ Exposes the main public API for the library, including the Treasury class,
4
+ wallet management, sorting rules, and database models. Sets up address
5
+ nicknames and enables SQL debugging if configured.
6
+
7
+ Key Responsibilities:
8
+ - Import and expose core classes and functions.
9
+ - Initialize address nicknames in the database.
10
+ - Configure SQL debugging for development.
11
+
12
+ This is the main import point for users and integrations.
13
+ """
14
+
15
+ from dao_treasury import ENVIRONMENT_VARIABLES as ENVS
16
+ from dao_treasury._nicknames import setup_address_nicknames_in_db
17
+ from dao_treasury._wallet import TreasuryWallet
18
+ from dao_treasury.db import TreasuryTx
19
+ from dao_treasury.sorting import (
20
+ CostOfRevenueSortRule,
21
+ ExpenseSortRule,
22
+ IgnoreSortRule,
23
+ OtherExpenseSortRule,
24
+ OtherIncomeSortRule,
25
+ RevenueSortRule,
26
+ SortRuleFactory,
27
+ cost_of_revenue,
28
+ expense,
29
+ ignore,
30
+ other_expense,
31
+ other_income,
32
+ revenue,
33
+ )
34
+ from dao_treasury.treasury import Treasury
35
+
36
+
37
+ setup_address_nicknames_in_db()
38
+
39
+
40
+ if ENVS.SQL_DEBUG:
41
+ import pony.orm
42
+
43
+ pony.orm.sql_debug(True)
44
+
45
+ __all__ = [
46
+ "Treasury",
47
+ "TreasuryWallet",
48
+ "CostOfRevenueSortRule",
49
+ "ExpenseSortRule",
50
+ "IgnoreSortRule",
51
+ "OtherExpenseSortRule",
52
+ "OtherIncomeSortRule",
53
+ "RevenueSortRule",
54
+ "cost_of_revenue",
55
+ "expense",
56
+ "ignore",
57
+ "other_expense",
58
+ "other_income",
59
+ "revenue",
60
+ "TreasuryTx",
61
+ "SortRuleFactory",
62
+ ]