fred-oss 0.27.0__tar.gz → 0.28.0__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.
- {fred_oss-0.27.0/src/main/fred_oss.egg-info → fred_oss-0.28.0}/PKG-INFO +1 -1
- fred_oss-0.28.0/src/main/fred/version +1 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/interface.py +16 -3
- {fred_oss-0.27.0 → fred_oss-0.28.0/src/main/fred_oss.egg-info}/PKG-INFO +1 -1
- fred_oss-0.27.0/src/main/fred/version +0 -1
- {fred_oss-0.27.0 → fred_oss-0.28.0}/MANIFEST.in +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/NOTICE.txt +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/README.md +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/requirements.txt +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/setup.cfg +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/setup.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/cli/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/cli/__main__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/cli/interface.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/cli/main.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/comp/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/comp/_keyval.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/comp/_queue.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/comp/catalog.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/comp/interface.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/service/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/service/_redis.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/service/_stdlib.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/service/catalog.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/service/interface.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/dao/service/utils.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/callback/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/callback/_function.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/callback/catalog.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/callback/interface.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/impl.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/result.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/settings.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/future/utils.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/cli_ext.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/runtime.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/runtimes/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/runtimes/scanner.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/runtimes/sync.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/wrappers/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/wrappers/dbutils.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/runpod/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/runpod/cli_ext.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/runpod/helper.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/maturity.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/monad/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/monad/_either.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/monad/catalog.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/monad/interface.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/settings.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/utils/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/utils/dateops.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/utils/runtime.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/version.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/client.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/handler.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/info.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/plugins/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/plugins/_local.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/plugins/catalog.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/plugins/interface.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/rest/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/rest/cli_ext.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/rest/routers/__init__.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/rest/routers/_runner.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/rest/routers/catalog.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/rest/routers/interface.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/rest/server.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/worker/runner/utils.py +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred_oss.egg-info/SOURCES.txt +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred_oss.egg-info/dependency_links.txt +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred_oss.egg-info/entry_points.txt +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred_oss.egg-info/requires.txt +0 -0
- {fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred_oss.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.28.0
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import time
|
|
2
|
-
from typing import Callable, Optional
|
|
2
|
+
from typing import overload, Callable, Optional
|
|
3
3
|
from dataclasses import dataclass, field
|
|
4
4
|
|
|
5
|
+
from fred.future.impl import Future # Should we make this import lazy?
|
|
5
6
|
from fred.utils.dateops import datetime_utcnow
|
|
6
7
|
from fred.settings import (
|
|
7
8
|
get_environ_variable,
|
|
@@ -137,15 +138,27 @@ class HandlerInterface:
|
|
|
137
138
|
metadata_serialized = json.dumps(self.metadata, default=str)
|
|
138
139
|
return json.loads(metadata_serialized)
|
|
139
140
|
|
|
140
|
-
|
|
141
|
+
@overload
|
|
142
|
+
def run(self, event: dict, as_future: bool = True) -> Future[dict]:
|
|
143
|
+
...
|
|
144
|
+
|
|
145
|
+
@overload
|
|
146
|
+
def run(self, event: dict, as_future: bool = False) -> dict:
|
|
147
|
+
...
|
|
148
|
+
|
|
149
|
+
def run(self, event: dict, as_future: bool = False) -> dict | Future[dict]:
|
|
141
150
|
"""Process an incoming event and return a structured response.
|
|
142
151
|
The event is expected to be a dictionary with at least an 'id' and 'input' keys.
|
|
143
152
|
The 'input' key should contain the payload to be processed.
|
|
144
153
|
Args:
|
|
145
154
|
event (dict): The incoming event containing 'id' and 'input'.
|
|
155
|
+
as_future (bool): If True, the processing will be done in a Future; otherwise, it will be synchronous.
|
|
146
156
|
Returns:
|
|
147
|
-
dict: A structured response containing the result of processing the event.
|
|
157
|
+
dict | Future[dict]: A structured response containing the result of processing the event.
|
|
158
|
+
If requested as a Future, returns a Future that will resolve to the response dictionary.
|
|
148
159
|
"""
|
|
160
|
+
if as_future:
|
|
161
|
+
return Future(function=lambda: self.run(event=event, as_future=False))
|
|
149
162
|
# Extract payload and event ID
|
|
150
163
|
payload = event.get("input", {})
|
|
151
164
|
job_event_identifier = event.get("id")
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.27.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/runtimes/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/runtimes/scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/wrappers/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.27.0 → fred_oss-0.28.0}/src/main/fred/integrations/databricks/wrappers/dbutils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|