lumera 0.4.6__py3-none-any.whl → 0.9.6__py3-none-any.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.
- lumera/__init__.py +99 -4
- lumera/_utils.py +782 -0
- lumera/automations.py +904 -0
- lumera/exceptions.py +72 -0
- lumera/files.py +97 -0
- lumera/google.py +47 -270
- lumera/integrations/__init__.py +34 -0
- lumera/integrations/google.py +338 -0
- lumera/llm.py +481 -0
- lumera/locks.py +216 -0
- lumera/pb.py +679 -0
- lumera/sdk.py +927 -380
- lumera/storage.py +270 -0
- lumera/webhooks.py +304 -0
- lumera-0.9.6.dist-info/METADATA +37 -0
- lumera-0.9.6.dist-info/RECORD +18 -0
- {lumera-0.4.6.dist-info → lumera-0.9.6.dist-info}/WHEEL +1 -1
- lumera-0.4.6.dist-info/METADATA +0 -11
- lumera-0.4.6.dist-info/RECORD +0 -7
- {lumera-0.4.6.dist-info → lumera-0.9.6.dist-info}/top_level.txt +0 -0
lumera/__init__.py
CHANGED
|
@@ -1,17 +1,112 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Lumera Agent SDK
|
|
3
3
|
|
|
4
|
-
This SDK provides helpers for
|
|
4
|
+
This SDK provides helpers for automations running within the Lumera environment
|
|
5
5
|
to interact with the Lumera API and define dynamic user interfaces.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
__version__ = version("lumera")
|
|
12
|
+
except PackageNotFoundError:
|
|
13
|
+
__version__ = "unknown" # Not installed (e.g., running from source)
|
|
14
|
+
|
|
15
|
+
# Import new modules (as modules, not individual functions)
|
|
16
|
+
from . import automations, exceptions, integrations, llm, locks, pb, storage, webhooks
|
|
17
|
+
from ._utils import (
|
|
18
|
+
LumeraAPIError,
|
|
19
|
+
RecordNotUniqueError,
|
|
20
|
+
get_access_token,
|
|
21
|
+
get_google_access_token,
|
|
22
|
+
log_timed,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
# Import specific exceptions for convenience
|
|
26
|
+
from .exceptions import (
|
|
27
|
+
LockHeldError,
|
|
28
|
+
LumeraError,
|
|
29
|
+
RecordNotFoundError,
|
|
30
|
+
UniqueConstraintError,
|
|
31
|
+
ValidationError,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# Import file types for Pydantic automation inputs
|
|
35
|
+
from .files import LumeraFile, LumeraFiles
|
|
36
|
+
|
|
37
|
+
# Import key SDK helpers to expose them at the package root.
|
|
38
|
+
from .sdk import (
|
|
39
|
+
CollectionField,
|
|
40
|
+
HookReplayResult,
|
|
41
|
+
create_collection,
|
|
42
|
+
create_record,
|
|
43
|
+
delete_collection,
|
|
44
|
+
delete_record,
|
|
45
|
+
get_automation_run,
|
|
46
|
+
get_collection,
|
|
47
|
+
get_record,
|
|
48
|
+
get_record_by_external_id,
|
|
49
|
+
list_collections,
|
|
50
|
+
list_records,
|
|
51
|
+
query_sql,
|
|
52
|
+
replay_hook,
|
|
53
|
+
run_automation,
|
|
54
|
+
save_to_lumera,
|
|
55
|
+
update_automation_run,
|
|
56
|
+
update_collection,
|
|
57
|
+
update_record,
|
|
58
|
+
upload_lumera_file,
|
|
59
|
+
upsert_record,
|
|
60
|
+
)
|
|
10
61
|
|
|
11
62
|
# Define what `from lumera import *` imports.
|
|
12
63
|
__all__ = [
|
|
64
|
+
# Authentication & utilities
|
|
13
65
|
"get_access_token",
|
|
14
|
-
"save_to_lumera",
|
|
15
66
|
"get_google_access_token", # Kept for backwards compatibility
|
|
16
67
|
"log_timed",
|
|
68
|
+
# Collections (low-level API)
|
|
69
|
+
"list_collections",
|
|
70
|
+
"get_collection",
|
|
71
|
+
"create_collection",
|
|
72
|
+
"update_collection",
|
|
73
|
+
"delete_collection",
|
|
74
|
+
# Records (low-level API)
|
|
75
|
+
"list_records",
|
|
76
|
+
"get_record",
|
|
77
|
+
"get_record_by_external_id",
|
|
78
|
+
"create_record",
|
|
79
|
+
"update_record",
|
|
80
|
+
"upsert_record",
|
|
81
|
+
"delete_record",
|
|
82
|
+
# Other operations
|
|
83
|
+
"replay_hook",
|
|
84
|
+
"query_sql",
|
|
85
|
+
"run_automation",
|
|
86
|
+
"get_automation_run",
|
|
87
|
+
"update_automation_run",
|
|
88
|
+
"upload_lumera_file",
|
|
89
|
+
"save_to_lumera",
|
|
90
|
+
# Type definitions
|
|
91
|
+
"CollectionField",
|
|
92
|
+
"HookReplayResult",
|
|
93
|
+
"LumeraFile",
|
|
94
|
+
"LumeraFiles",
|
|
95
|
+
# Exceptions
|
|
96
|
+
"LumeraAPIError",
|
|
97
|
+
"RecordNotUniqueError",
|
|
98
|
+
"LumeraError",
|
|
99
|
+
"ValidationError",
|
|
100
|
+
"UniqueConstraintError",
|
|
101
|
+
"RecordNotFoundError",
|
|
102
|
+
"LockHeldError",
|
|
103
|
+
# New modules (use as lumera.pb, lumera.storage, etc.)
|
|
104
|
+
"automations",
|
|
105
|
+
"pb",
|
|
106
|
+
"storage",
|
|
107
|
+
"llm",
|
|
108
|
+
"locks",
|
|
109
|
+
"exceptions",
|
|
110
|
+
"webhooks",
|
|
111
|
+
"integrations",
|
|
17
112
|
]
|