fred-oss 0.50.0__tar.gz → 0.51.1__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.50.0/src/main/fred_oss.egg-info → fred_oss-0.51.1}/PKG-INFO +1 -1
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/comp/_keyval.py +3 -0
- fred_oss-0.51.1/src/main/fred/utils/imout/_minio.py +33 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/imout/catalog.py +3 -1
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/imout/interface.py +4 -4
- fred_oss-0.51.1/src/main/fred/version +1 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1/src/main/fred_oss.egg-info}/PKG-INFO +1 -1
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred_oss.egg-info/SOURCES.txt +1 -0
- fred_oss-0.50.0/src/main/fred/version +0 -1
- {fred_oss-0.50.0 → fred_oss-0.51.1}/MANIFEST.in +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/NOTICE.txt +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/README.md +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/requirements.txt +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/setup.cfg +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/setup.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/cli/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/cli/__main__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/cli/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/cli/main.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/comp/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/comp/_pubsub.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/comp/_queue.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/comp/catalog.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/comp/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/service/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/service/_minio.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/service/_redis.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/service/_stdlib.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/service/catalog.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/service/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/dao/service/utils.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/callback/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/callback/_function.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/callback/catalog.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/callback/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/impl.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/result.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/settings.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/future/utils.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/cli_ext.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/runtime.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/runtimes/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/runtimes/scanner.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/runtimes/sync.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/wrappers/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/wrappers/dbutils.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/runpod/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/runpod/cli_ext.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/runpod/helper.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/maturity.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/monad/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/monad/_either.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/monad/catalog.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/monad/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/settings.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/dateops.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/imops.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/imout/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/imout/_filesystem.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/imout/_string.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/utils/runtime.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/version.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/backend.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/client.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/handler.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/model/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/model/_handler.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/model/_item.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/model/_request.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/model/_runner_spec.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/model/catalog.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/model/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/plugins/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/plugins/_local.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/plugins/_runpod.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/plugins/catalog.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/plugins/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/auth.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/cli_ext.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/routers/__init__.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/routers/_runner.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/routers/catalog.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/routers/interface.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/server.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/rest/settings.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/settings.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/signal.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/status.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/runner/utils.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/worker/settings.py +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred_oss.egg-info/dependency_links.txt +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred_oss.egg-info/entry_points.txt +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred_oss.egg-info/requires.txt +0 -0
- {fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred_oss.egg-info/top_level.txt +0 -0
|
@@ -76,6 +76,9 @@ class FredKeyVal(ComponentInterface):
|
|
|
76
76
|
logger.warning("Expiration not implemented for MINIO service.")
|
|
77
77
|
# Prepare the value as a byte stream
|
|
78
78
|
value_bytes = value.encode("utf-8")
|
|
79
|
+
if kwargs.get("b64", False):
|
|
80
|
+
import base64
|
|
81
|
+
value_bytes = base64.b64decode(value)
|
|
79
82
|
value_stream = io.BytesIO(value_bytes)
|
|
80
83
|
value_stream.seek(0) # Ensure the stream is at the beginning
|
|
81
84
|
# Put the object into the bucket
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import posixpath
|
|
2
|
+
|
|
3
|
+
from fred.utils.imout.interface import ImageOutputInterface
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class OutputMinio(ImageOutputInterface):
|
|
7
|
+
"""MinIO image output handling."""
|
|
8
|
+
|
|
9
|
+
@classmethod
|
|
10
|
+
def auto(cls, **kwargs) -> "OutputMinio":
|
|
11
|
+
from fred.dao.service.catalog import ServiceCatalog
|
|
12
|
+
from fred.dao.comp.catalog import CompCatalog
|
|
13
|
+
|
|
14
|
+
minio = ServiceCatalog.MINIO.auto(**kwargs)
|
|
15
|
+
if "minio_endpoint" in minio.metadata:
|
|
16
|
+
cls.metadata["minio_endpoint"] = minio.metadata["minio_endpoint"]
|
|
17
|
+
cls.client = CompCatalog.KEYVAL.mount(minio)
|
|
18
|
+
return cls(**kwargs)
|
|
19
|
+
|
|
20
|
+
def out(self, bucket: str, filename: str, presigned: bool = False, **kwargs) -> str:
|
|
21
|
+
from fred.utils.imops import image_to_b64
|
|
22
|
+
|
|
23
|
+
image_key = posixpath.join(bucket, filename)
|
|
24
|
+
image_string = image_to_b64(self.image)
|
|
25
|
+
self.client(key=image_key).set(image_string, b64=True, **kwargs)
|
|
26
|
+
if not presigned:
|
|
27
|
+
return posixpath.join(
|
|
28
|
+
self.metadata.get("minio_endpoint", ""),
|
|
29
|
+
image_key,
|
|
30
|
+
)
|
|
31
|
+
# TODO: Implement the generation of a pre-signed URL
|
|
32
|
+
# https://github.com/minio/minio-py/blob/master/docs/API.md#get_presigned_url
|
|
33
|
+
raise NotImplementedError("Presigned URL generation is not yet implemented.")
|
|
@@ -5,12 +5,14 @@ from PIL.Image import Image
|
|
|
5
5
|
from fred.utils.imout.interface import ImageOutputInterface
|
|
6
6
|
from fred.utils.imout._filesystem import OutputFilesystem
|
|
7
7
|
from fred.utils.imout._string import OutputString
|
|
8
|
+
from fred.utils.imout._minio import OutputMinio
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class ImageOutputCatalog(enum.Enum):
|
|
11
12
|
B64 = OutputString
|
|
12
13
|
STRING = OutputString
|
|
13
|
-
FILESYSTEM = OutputFilesystem
|
|
14
|
+
FILESYSTEM = OutputFilesystem
|
|
15
|
+
MINIO = OutputMinio
|
|
14
16
|
|
|
15
17
|
def __call__(self, image: Image, **kwargs) -> ImageOutputInterface:
|
|
16
18
|
if getattr(self.value, "auto", None):
|
|
@@ -8,16 +8,16 @@ class ImageOutputBackendInterface:
|
|
|
8
8
|
metadata: dict = {}
|
|
9
9
|
client: Optional[Any] = None # Placeholder for clients like MinIO, S3, etc.
|
|
10
10
|
|
|
11
|
-
@classmethod
|
|
12
|
-
def set_shared_client(cls, client: Any) -> None:
|
|
13
|
-
cls.client = client
|
|
14
|
-
|
|
15
11
|
|
|
16
12
|
@dataclass(frozen=True, slots=True)
|
|
17
13
|
class ImageOutputInterface(ImageOutputBackendInterface):
|
|
18
14
|
"""Interface for image output handling."""
|
|
19
15
|
image: Image
|
|
20
16
|
|
|
17
|
+
@classmethod
|
|
18
|
+
def auto(cls, **kwargs) -> 'ImageOutputInterface':
|
|
19
|
+
return cls(**kwargs)
|
|
20
|
+
|
|
21
21
|
@classmethod
|
|
22
22
|
def from_path(cls, path: str) -> "ImageOutputInterface":
|
|
23
23
|
from fred.utils.imops import get_image_from_path
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.51.1
|
|
@@ -55,6 +55,7 @@ src/main/fred/utils/imops.py
|
|
|
55
55
|
src/main/fred/utils/runtime.py
|
|
56
56
|
src/main/fred/utils/imout/__init__.py
|
|
57
57
|
src/main/fred/utils/imout/_filesystem.py
|
|
58
|
+
src/main/fred/utils/imout/_minio.py
|
|
58
59
|
src/main/fred/utils/imout/_string.py
|
|
59
60
|
src/main/fred/utils/imout/catalog.py
|
|
60
61
|
src/main/fred/utils/imout/interface.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.50.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
|
|
File without changes
|
{fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/runtimes/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/runtimes/scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{fred_oss-0.50.0 → fred_oss-0.51.1}/src/main/fred/integrations/databricks/wrappers/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.50.0 → fred_oss-0.51.1}/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
|
|
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
|