moose-lib 0.6.10__tar.gz → 0.6.12__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.

Potentially problematic release.


This version of moose-lib might be problematic. Click here for more details.

Files changed (43) hide show
  1. {moose_lib-0.6.10 → moose_lib-0.6.12}/PKG-INFO +1 -1
  2. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/data_models.py +17 -0
  3. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/__init__.py +12 -0
  4. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/consumption.py +8 -0
  5. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/registry.py +9 -1
  6. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/main.py +5 -0
  7. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib.egg-info/PKG-INFO +1 -1
  8. {moose_lib-0.6.10 → moose_lib-0.6.12}/README.md +0 -0
  9. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/__init__.py +0 -0
  10. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/blocks.py +0 -0
  11. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/clients/__init__.py +0 -0
  12. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/clients/redis_client.py +0 -0
  13. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/commons.py +0 -0
  14. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/config/__init__.py +0 -0
  15. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/config/config_file.py +0 -0
  16. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/config/runtime.py +0 -0
  17. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/_registry.py +0 -0
  18. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/ingest_api.py +0 -0
  19. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/ingest_pipeline.py +0 -0
  20. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/life_cycle.py +0 -0
  21. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/materialized_view.py +0 -0
  22. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/olap_table.py +0 -0
  23. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/sql_resource.py +0 -0
  24. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/stream.py +0 -0
  25. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/types.py +0 -0
  26. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/view.py +0 -0
  27. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2/workflow.py +0 -0
  28. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/dmv2-serializer.py +0 -0
  29. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/internal.py +0 -0
  30. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/query_param.py +0 -0
  31. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/streaming/__init__.py +0 -0
  32. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/streaming/streaming_function_runner.py +0 -0
  33. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib/tasks.py +0 -0
  34. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib.egg-info/SOURCES.txt +0 -0
  35. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib.egg-info/dependency_links.txt +0 -0
  36. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib.egg-info/requires.txt +0 -0
  37. {moose_lib-0.6.10 → moose_lib-0.6.12}/moose_lib.egg-info/top_level.txt +0 -0
  38. {moose_lib-0.6.10 → moose_lib-0.6.12}/setup.cfg +0 -0
  39. {moose_lib-0.6.10 → moose_lib-0.6.12}/setup.py +0 -0
  40. {moose_lib-0.6.10 → moose_lib-0.6.12}/tests/__init__.py +0 -0
  41. {moose_lib-0.6.10 → moose_lib-0.6.12}/tests/conftest.py +0 -0
  42. {moose_lib-0.6.10 → moose_lib-0.6.12}/tests/test_moose.py +0 -0
  43. {moose_lib-0.6.10 → moose_lib-0.6.12}/tests/test_redis_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moose_lib
3
- Version: 0.6.10
3
+ Version: 0.6.12
4
4
  Home-page: https://www.fiveonefour.com/moose
5
5
  Author: Fiveonefour Labs Inc.
6
6
  Author-email: support@fiveonefour.com
@@ -26,6 +26,15 @@ class ClickhouseSize:
26
26
  size: int
27
27
 
28
28
 
29
+ @dataclasses.dataclass
30
+ class ClickhouseDefault:
31
+ expression: str
32
+
33
+
34
+ def clickhouse_default(expression: str) -> ClickhouseDefault:
35
+ return ClickhouseDefault(expression=expression)
36
+
37
+
29
38
  def clickhouse_decimal(precision: int, scale: int) -> Type[Decimal]:
30
39
  return Annotated[Decimal, Field(max_digits=precision, decimal_places=scale)]
31
40
 
@@ -135,6 +144,7 @@ class Column(BaseModel):
135
144
  required: bool
136
145
  unique: Literal[False]
137
146
  primary_key: bool
147
+ default: str | None = None
138
148
  annotations: list[Tuple[str, Any]] = []
139
149
 
140
150
 
@@ -255,6 +265,12 @@ def _to_columns(model: type[BaseModel]) -> list[Column]:
255
265
 
256
266
  column_name = field_name if field_info.alias is None else field_info.alias
257
267
 
268
+ # Extract default expression from metadata, if provided
269
+ default_expr = next(
270
+ (md.expression for md in mds if isinstance(md, ClickhouseDefault)),
271
+ None,
272
+ )
273
+
258
274
  columns.append(
259
275
  Column(
260
276
  name=column_name,
@@ -262,6 +278,7 @@ def _to_columns(model: type[BaseModel]) -> list[Column]:
262
278
  required=not optional,
263
279
  unique=False,
264
280
  primary_key=primary_key,
281
+ default=default_expr,
265
282
  annotations=annotations,
266
283
  )
267
284
  )
@@ -46,6 +46,9 @@ from .consumption import (
46
46
  Api,
47
47
  get_moose_base_url,
48
48
  set_moose_base_url,
49
+ # Backward compatibility aliases
50
+ ConsumptionApi,
51
+ EgressConfig,
49
52
  )
50
53
 
51
54
  from .sql_resource import (
@@ -85,6 +88,9 @@ from .registry import (
85
88
  get_sql_resource,
86
89
  get_workflows,
87
90
  get_workflow,
91
+ # Backward compatibility aliases
92
+ get_consumption_apis,
93
+ get_consumption_api,
88
94
  )
89
95
 
90
96
  __all__ = [
@@ -123,6 +129,9 @@ __all__ = [
123
129
  'Api',
124
130
  'get_moose_base_url',
125
131
  'set_moose_base_url',
132
+ # Backward compatibility aliases (deprecated)
133
+ 'ConsumptionApi',
134
+ 'EgressConfig',
126
135
 
127
136
  # SQL
128
137
  'SqlResource',
@@ -152,4 +161,7 @@ __all__ = [
152
161
  'get_sql_resource',
153
162
  'get_workflows',
154
163
  'get_workflow',
164
+ # Backward compatibility aliases (deprecated)
165
+ 'get_consumption_apis',
166
+ 'get_consumption_api',
155
167
  ]
@@ -228,3 +228,11 @@ class Api(BaseTypedResource, Generic[U]):
228
228
  # Parse JSON response and return as the expected type
229
229
  response_data = response.json()
230
230
  return self._u.model_validate(response_data)
231
+
232
+
233
+ # Backward compatibility aliases (deprecated)
234
+ ConsumptionApi = Api
235
+ """@deprecated: Use Api instead of ConsumptionApi"""
236
+
237
+ EgressConfig = ApiConfig
238
+ """@deprecated: Use ApiConfig instead of EgressConfig"""
@@ -70,4 +70,12 @@ def get_workflows() -> Dict[str, Workflow]:
70
70
 
71
71
  def get_workflow(name: str) -> Optional[Workflow]:
72
72
  """Get a registered workflow by name."""
73
- return _workflows.get(name)
73
+ return _workflows.get(name)
74
+
75
+
76
+ # Backward compatibility aliases (deprecated)
77
+ get_consumption_apis = get_apis
78
+ """@deprecated: Use get_apis instead of get_consumption_apis"""
79
+
80
+ get_consumption_api = get_api
81
+ """@deprecated: Use get_api instead of get_consumption_api"""
@@ -147,6 +147,11 @@ class ApiResult:
147
147
  body: Any
148
148
 
149
149
 
150
+ # Backward compatibility alias (deprecated)
151
+ ConsumptionApiResult = ApiResult
152
+ """@deprecated: Use ApiResult instead of ConsumptionApiResult"""
153
+
154
+
150
155
  class QueryClient:
151
156
  """Client for executing queries, typically against ClickHouse.
152
157
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moose_lib
3
- Version: 0.6.10
3
+ Version: 0.6.12
4
4
  Home-page: https://www.fiveonefour.com/moose
5
5
  Author: Fiveonefour Labs Inc.
6
6
  Author-email: support@fiveonefour.com
File without changes
File without changes
File without changes
File without changes
File without changes