mmar-mapi 1.0.14__py3-none-any.whl → 1.0.15__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.

Potentially problematic release.


This version of mmar-mapi might be problematic. Click here for more details.

mmar_mapi/file_storage.py CHANGED
@@ -6,7 +6,7 @@ from pathlib import Path
6
6
  from zipfile import ZipFile, is_zipfile
7
7
 
8
8
  ResourceId = str
9
- ASCII_DIGITS = set(string.ascii_lowercase + string.digits + '-')
9
+ ASCII_DIGITS_SPECIAL = set(string.ascii_lowercase + string.digits + '-')
10
10
  SUFFIX_DIR = ".dir"
11
11
  SUFFIX_METADATA = ".metadata"
12
12
 
@@ -18,7 +18,7 @@ def _validate_exist(files_dir):
18
18
 
19
19
 
20
20
  def _validate_dtype(dtype: str):
21
- if all(map(ASCII_DIGITS.__contains__, dtype)):
21
+ if all(map(ASCII_DIGITS_SPECIAL.__contains__, dtype)):
22
22
  return
23
23
  raise ValueError(f"Bad dtype: {dtype}")
24
24
 
@@ -61,6 +61,9 @@ class FileStorage:
61
61
 
62
62
  return str(fpath)
63
63
 
64
+ def get_metadata_path(self, resource_id: ResourceId) -> ResourceId:
65
+ return Path(resource_id).with_suffix(SUFFIX_METADATA).as_posix()
66
+
64
67
  async def upload_async(self, content: bytes | str, fname: str) -> ResourceId:
65
68
  return self.upload(content, fname)
66
69
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmar-mapi
3
- Version: 1.0.14
3
+ Version: 1.0.15
4
4
  Summary: Common pure/IO utilities for multi-modal architectures team
5
5
  Keywords:
6
6
  Author: Eugene Tagin
@@ -1,6 +1,6 @@
1
1
  mmar_mapi/__init__.py,sha256=Q2WFyNje0mDzP3eK7k-900W4Uty82BlulKv9-FmkcZs,1177
2
2
  mmar_mapi/api.py,sha256=C9Sr8dISvf51xfEznPjccI_odaG4coQE3HI_0jVpjMQ,1677
3
- mmar_mapi/file_storage.py,sha256=oxo2Phlnf5SGm-ErmRMMNkhI7DLP6ymwEmvOOBBTcqE,4415
3
+ mmar_mapi/file_storage.py,sha256=J3l3wZxfcvbxW02AqHsmEqo_frDAn8u3gQeAjfcJEE0,4577
4
4
  mmar_mapi/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  mmar_mapi/models/base.py,sha256=mKtXV2x51XVj7W-et9tjGcPMDUUUMelW-BywMgFc2p0,411
6
6
  mmar_mapi/models/chat.py,sha256=_M1Uy4QNyPkPLvu0vvufa9fs-3oqT59CtjEqWaOgNAM,13765
@@ -12,7 +12,7 @@ mmar_mapi/type_union.py,sha256=diwmzcnbqkpGFckPHNw9o8zyQ955mOGNvhTlcBJ0RMI,1905
12
12
  mmar_mapi/utils.py,sha256=y4rLTdao9pr4lRLbMAVD4uDDPdxrDrDrhoAFDp1TkWk,500
13
13
  mmar_mapi/utils_import.py,sha256=GRCkiH0pIrl-xWo4rdxngcfuPzjfTIXA1rvDVxEZ3lI,1683
14
14
  mmar_mapi/xml_parser.py,sha256=VvLIX_XCZao9i0qqpTVx8nx0vbFXSe8pEbdJdXnj97g,568
15
- mmar_mapi-1.0.14.dist-info/licenses/LICENSE,sha256=2A90w8WjhOgQXnFuUijKJYazaqZ4_NTokYb9Po4y-9k,1061
16
- mmar_mapi-1.0.14.dist-info/WHEEL,sha256=-neZj6nU9KAMg2CnCY6T3w8J53nx1kFGw_9HfoSzM60,79
17
- mmar_mapi-1.0.14.dist-info/METADATA,sha256=dieMEsBeG7j9G66hC337sJ3VItDl-P3w5tAPkjREWKM,944
18
- mmar_mapi-1.0.14.dist-info/RECORD,,
15
+ mmar_mapi-1.0.15.dist-info/licenses/LICENSE,sha256=2A90w8WjhOgQXnFuUijKJYazaqZ4_NTokYb9Po4y-9k,1061
16
+ mmar_mapi-1.0.15.dist-info/WHEEL,sha256=-neZj6nU9KAMg2CnCY6T3w8J53nx1kFGw_9HfoSzM60,79
17
+ mmar_mapi-1.0.15.dist-info/METADATA,sha256=B9lfiOcJAr-g4evKTotChDydMpFDVjRd3wXsyW0qo9Q,944
18
+ mmar_mapi-1.0.15.dist-info/RECORD,,