digitalkin 0.2.17__py3-none-any.whl → 0.2.18__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.
- digitalkin/__version__.py +1 -1
- digitalkin/services/filesystem/default_filesystem.py +7 -6
- digitalkin/services/filesystem/filesystem_strategy.py +2 -1
- digitalkin/services/filesystem/grpc_filesystem.py +2 -1
- {digitalkin-0.2.17.dist-info → digitalkin-0.2.18.dist-info}/METADATA +2 -2
- {digitalkin-0.2.17.dist-info → digitalkin-0.2.18.dist-info}/RECORD +9 -9
- {digitalkin-0.2.17.dist-info → digitalkin-0.2.18.dist-info}/WHEEL +0 -0
- {digitalkin-0.2.17.dist-info → digitalkin-0.2.18.dist-info}/licenses/LICENSE +0 -0
- {digitalkin-0.2.17.dist-info → digitalkin-0.2.18.dist-info}/top_level.txt +0 -0
digitalkin/__version__.py
CHANGED
|
@@ -126,7 +126,7 @@ class DefaultFilesystem(FilesystemStrategy):
|
|
|
126
126
|
raise FilesystemServiceError(msg) # noqa: TRY301
|
|
127
127
|
|
|
128
128
|
Path(file_path).write_bytes(file.content)
|
|
129
|
-
|
|
129
|
+
storage_uri = str(Path(file_path).resolve())
|
|
130
130
|
file_data = FilesystemRecord(
|
|
131
131
|
id=str(uuid.uuid4()),
|
|
132
132
|
context=self.mission_id,
|
|
@@ -136,7 +136,8 @@ class DefaultFilesystem(FilesystemStrategy):
|
|
|
136
136
|
size_bytes=len(file.content),
|
|
137
137
|
checksum=self._calculate_checksum(file.content),
|
|
138
138
|
metadata=file.metadata,
|
|
139
|
-
|
|
139
|
+
storage_uri=storage_uri,
|
|
140
|
+
file_url=storage_uri,
|
|
140
141
|
status=file.status if hasattr(file, "status") and file.status else "ACTIVE",
|
|
141
142
|
)
|
|
142
143
|
|
|
@@ -200,7 +201,7 @@ class DefaultFilesystem(FilesystemStrategy):
|
|
|
200
201
|
|
|
201
202
|
if include_content:
|
|
202
203
|
for file in paginated_files:
|
|
203
|
-
file.content = Path(file.
|
|
204
|
+
file.content = Path(file.storage_uri).read_bytes()
|
|
204
205
|
|
|
205
206
|
except Exception as e:
|
|
206
207
|
msg = f"Error listing files: {e!s}"
|
|
@@ -243,7 +244,7 @@ class DefaultFilesystem(FilesystemStrategy):
|
|
|
243
244
|
raise FilesystemServiceError(msg) # noqa: TRY301
|
|
244
245
|
|
|
245
246
|
if include_content:
|
|
246
|
-
file_path = file_data.
|
|
247
|
+
file_path = file_data.storage_uri
|
|
247
248
|
if os.path.exists(file_path):
|
|
248
249
|
content = Path(file_path).read_bytes()
|
|
249
250
|
file_data.content = content
|
|
@@ -330,7 +331,7 @@ class DefaultFilesystem(FilesystemStrategy):
|
|
|
330
331
|
new_path = os.path.join(context_dir, new_name)
|
|
331
332
|
os.rename(file_path, new_path)
|
|
332
333
|
existing_file.name = new_name
|
|
333
|
-
existing_file.
|
|
334
|
+
existing_file.storage_uri = str(Path(new_path).resolve())
|
|
334
335
|
|
|
335
336
|
self.db[file_id] = existing_file
|
|
336
337
|
|
|
@@ -388,7 +389,7 @@ class DefaultFilesystem(FilesystemStrategy):
|
|
|
388
389
|
continue
|
|
389
390
|
|
|
390
391
|
try:
|
|
391
|
-
file_path = file_data.
|
|
392
|
+
file_path = file_data.storage_uri
|
|
392
393
|
if os.path.exists(file_path):
|
|
393
394
|
if permanent:
|
|
394
395
|
os.remove(file_path)
|
|
@@ -24,7 +24,8 @@ class FilesystemRecord(BaseModel):
|
|
|
24
24
|
size_bytes: int = Field(default=0, description="Size of the file in bytes")
|
|
25
25
|
checksum: str = Field(default="", description="SHA-256 checksum of the file content")
|
|
26
26
|
metadata: dict[str, Any] | None = Field(default=None, description="Additional metadata for the file")
|
|
27
|
-
|
|
27
|
+
storage_uri: str = Field(description="Internal URI for accessing the file content")
|
|
28
|
+
file_url: str = Field(description="Public URL for accessing the file content")
|
|
28
29
|
status: str = Field(default="UNSPECIFIED", description="Current status of the file")
|
|
29
30
|
content: bytes | None = Field(default=None, description="The content of the file")
|
|
30
31
|
|
|
@@ -121,7 +121,8 @@ class GrpcFilesystem(FilesystemStrategy, GrpcClientWrapper):
|
|
|
121
121
|
size_bytes=file.size_bytes,
|
|
122
122
|
checksum=file.checksum,
|
|
123
123
|
metadata=MessageToDict(file.metadata),
|
|
124
|
-
|
|
124
|
+
storage_uri=file.storage_uri,
|
|
125
|
+
file_url=file.file_url,
|
|
125
126
|
status=filesystem_pb2.FileStatus.Name(file.status),
|
|
126
127
|
content=file.content,
|
|
127
128
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: digitalkin
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.18
|
|
4
4
|
Summary: SDK to build kin used in DigitalKin
|
|
5
5
|
Author-email: "DigitalKin.ai" <contact@digitalkin.ai>
|
|
6
6
|
License: Attribution-NonCommercial-ShareAlike 4.0 International
|
|
@@ -452,7 +452,7 @@ Classifier: License :: Other/Proprietary License
|
|
|
452
452
|
Requires-Python: >=3.10
|
|
453
453
|
Description-Content-Type: text/markdown
|
|
454
454
|
License-File: LICENSE
|
|
455
|
-
Requires-Dist: digitalkin-proto>=0.1.
|
|
455
|
+
Requires-Dist: digitalkin-proto>=0.1.16
|
|
456
456
|
Requires-Dist: grpcio-health-checking>=1.71.0
|
|
457
457
|
Requires-Dist: grpcio-reflection>=1.71.0
|
|
458
458
|
Requires-Dist: grpcio-status>=1.71.0
|
|
@@ -7,7 +7,7 @@ base_server/mock/__init__.py,sha256=YZFT-F1l_TpvJYuIPX-7kTeE1CfOjhx9YmNRXVoi-jQ,
|
|
|
7
7
|
base_server/mock/mock_pb2.py,sha256=sETakcS3PAAm4E-hTCV1jIVaQTPEAIoVVHupB8Z_k7Y,1843
|
|
8
8
|
base_server/mock/mock_pb2_grpc.py,sha256=BbOT70H6q3laKgkHfOx1QdfmCS_HxCY4wCOX84YAdG4,3180
|
|
9
9
|
digitalkin/__init__.py,sha256=7LLBAba0th-3SGqcpqFO-lopWdUkVLKzLZiMtB-mW3M,162
|
|
10
|
-
digitalkin/__version__.py,sha256=
|
|
10
|
+
digitalkin/__version__.py,sha256=Xmsz_szPPAmeYnVobFHJO8pKINhzpB446tyRoVs8I2Y,191
|
|
11
11
|
digitalkin/logger.py,sha256=cFbIAZHOFx3nddOssRNYLXyqUPzR4CgDR_c-5wmB-og,1685
|
|
12
12
|
digitalkin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
digitalkin/grpc_servers/__init__.py,sha256=0cJBlwipSmFdXkyH3T0i6OJ1WpAtNsZgYX7JaSnkbtg,804
|
|
@@ -51,9 +51,9 @@ digitalkin/services/cost/cost_strategy.py,sha256=VhHeqi9WnE1yoDBBVp5qmqwIt5tTZHU
|
|
|
51
51
|
digitalkin/services/cost/default_cost.py,sha256=mEd0VL_tMcGU41q0f9MFeBYeKZBenv0mIHuwgXlQ7uQ,3869
|
|
52
52
|
digitalkin/services/cost/grpc_cost.py,sha256=p_5mG72N7e4bxwBOD9DNokvLtinBILiqCfllmkqpmhw,6253
|
|
53
53
|
digitalkin/services/filesystem/__init__.py,sha256=BhwMl_BUvM0d65fmglkp0SVwn3RfYiUOKJgIMnOCaGM,381
|
|
54
|
-
digitalkin/services/filesystem/default_filesystem.py,sha256=
|
|
55
|
-
digitalkin/services/filesystem/filesystem_strategy.py,sha256
|
|
56
|
-
digitalkin/services/filesystem/grpc_filesystem.py,sha256=
|
|
54
|
+
digitalkin/services/filesystem/default_filesystem.py,sha256=pQI7Sc9WNJrxxwd21iIviWcrKKuxuj3BdoAT-rghYGk,15023
|
|
55
|
+
digitalkin/services/filesystem/filesystem_strategy.py,sha256=MlSgEDjjCy1GjtpdO_rKiF2NtfP4DpSU_VF2UtwQ7Ug,9130
|
|
56
|
+
digitalkin/services/filesystem/grpc_filesystem.py,sha256=W-TYe76Zbf2KS0Z4NMVUjRdP6m2IzU7-VXiBdecOjpk,12489
|
|
57
57
|
digitalkin/services/identity/__init__.py,sha256=InkeyLgFYYwItx8mePA8HpfacOMWZwwuc0G4pWtKq9s,270
|
|
58
58
|
digitalkin/services/identity/default_identity.py,sha256=Y2auZHrGSZTIN5D8HyjLvLcNbYFM1CNUE23x7p5VIGw,386
|
|
59
59
|
digitalkin/services/identity/identity_strategy.py,sha256=skappBbds1_qa0Gr24FGrNX1N0_OYhYT1Lh7dUaAirE,429
|
|
@@ -76,14 +76,14 @@ digitalkin/utils/arg_parser.py,sha256=nvjI1pKDY1HfS0oGcMQPtdTQcggXLtpxXMbnMxNEKR
|
|
|
76
76
|
digitalkin/utils/development_mode_action.py,sha256=TqRuAF_A7bDD4twRB4PnZcRoNeaiAnEdxM5kvy4aoaA,1511
|
|
77
77
|
digitalkin/utils/llm_ready_schema.py,sha256=JjMug_lrQllqFoanaC091VgOqwAd-_YzcpqFlS7p778,2375
|
|
78
78
|
digitalkin/utils/package_discover.py,sha256=aASTSloPVTp6MAaj5T7ToIeC6NHKajPDjWa1LoGjj3g,13473
|
|
79
|
-
digitalkin-0.2.
|
|
79
|
+
digitalkin-0.2.18.dist-info/licenses/LICENSE,sha256=Ies4HFv2r2hzDRakJYxk3Y60uDFLiG-orIgeTpstnIo,20327
|
|
80
80
|
modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
81
|
modules/cpu_intensive_module.py,sha256=ejB9XPnFfA0uCuFUQbM3fy5UYfqqAlF36rv_P5Ri8ho,8363
|
|
82
82
|
modules/minimal_llm_module.py,sha256=Ijld__ZnhzfLwpXD1XVkLZ7jyKZKyOFZczOpiPttJZc,11216
|
|
83
83
|
modules/text_transform_module.py,sha256=bwPSnEUthZQyfLwcTLo52iAxItAoknkLh8Y3m5aywaY,7251
|
|
84
84
|
services/filesystem_module.py,sha256=71Mcja8jCQqiqFHPdsIXplFIHTvgkxRhp0TRXuCfgkk,7430
|
|
85
85
|
services/storage_module.py,sha256=ybTMqmvGaTrR8PqJ4FU0cwxaDjT36TskVrGoetTGmno,6955
|
|
86
|
-
digitalkin-0.2.
|
|
87
|
-
digitalkin-0.2.
|
|
88
|
-
digitalkin-0.2.
|
|
89
|
-
digitalkin-0.2.
|
|
86
|
+
digitalkin-0.2.18.dist-info/METADATA,sha256=C29QQiRskIqGJUn4NjC_237SGkhAC1j0wEYUdaLzXEY,30580
|
|
87
|
+
digitalkin-0.2.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
88
|
+
digitalkin-0.2.18.dist-info/top_level.txt,sha256=gcjqlyrZuLjIyxrOIavCQM_olpr6ND5kPKkZd2j0xGo,40
|
|
89
|
+
digitalkin-0.2.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|