agi-med-common 4.0.4__py3-none-any.whl → 4.0.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.
@@ -1,4 +1,4 @@
1
- __version__ = "4.0.4"
1
+ __version__ = "4.0.6"
2
2
 
3
3
  from .logger import LogLevelEnum, logger_init
4
4
  from .models import (
@@ -30,6 +30,16 @@ class FileStorage:
30
30
  fpath = self.files_dir / fname
31
31
  return fpath
32
32
 
33
+ def upload_maybe(
34
+ self,
35
+ content: bytes | None,
36
+ dtype: str,
37
+ ) -> ResourceId | None:
38
+ if not content:
39
+ return None
40
+ resource_id = self.upload(content, dtype)
41
+ return resource_id
42
+
33
43
  def upload(self, content: bytes, dtype: str) -> ResourceId | None:
34
44
  _validate_dtype(dtype)
35
45
  fpath = self._generate_fname_path(content, dtype)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agi_med_common
3
- Version: 4.0.4
3
+ Version: 4.0.6
4
4
  Summary: Сommon for agi-med team
5
5
  Author: AGI-MED-TEAM
6
6
  Requires-Python: >=3.11
@@ -1,5 +1,5 @@
1
- agi_med_common/__init__.py,sha256=C6VIaY6nsqxW6emPJ3a3SVqBgCodS2GQ0KeZElHV4is,575
2
- agi_med_common/file_storage.py,sha256=y2kz617O_0zlwTrc5rqTfGFBA0asm5bYw-juYjuEoeM,1261
1
+ agi_med_common/__init__.py,sha256=ieERcHJV_y_jHN7e9DFg6VSz2TAszb423gDMusC7q24,575
2
+ agi_med_common/file_storage.py,sha256=uyZE3ePKrbVLNVcvxw9lbgumy1UPwDGIwQMs1Bd8HFI,1502
3
3
  agi_med_common/parallel_map.py,sha256=Qx6xe7DqlEUDpSucp5Hm8r9y9Iquwh9JvX7lOqHhnOw,921
4
4
  agi_med_common/utils.py,sha256=5iurKl5d1zZ_cN4yqtc0_FhrwuNBcDurbWilu28_saE,325
5
5
  agi_med_common/validators.py,sha256=R678gjPp-5XbnocRuEtdOQgJyCCOurxwaOe2nT04kSg,705
@@ -23,7 +23,7 @@ agi_med_common/models/enums/moderation_label_enum.py,sha256=lbGG4Pu7cQp57uEyQEpt
23
23
  agi_med_common/models/enums/mtrs_label_enum.py,sha256=6emBndt3SCsQVZZFKQYCV2_iyjjmZEhwejJKJu39ZAw,257
24
24
  agi_med_common/models/enums/mtrs_xml_tag_enum.py,sha256=6OxuRsrx4b2uBjfrBgm4Y789Ly337_mQXL9VPRCpLyg,273
25
25
  agi_med_common/models/enums/track_id_enum.py,sha256=N3KUd97a4xDet_NKZ5URm0qWAAv3ts1l_foOjdlGY4c,532
26
- agi_med_common-4.0.4.dist-info/METADATA,sha256=SdREicX9M1bmuHKPVKCytUQjLLwl30pVjRbmPOZ7K08,546
27
- agi_med_common-4.0.4.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
28
- agi_med_common-4.0.4.dist-info/top_level.txt,sha256=26o565jF_7wYQj7-YJfTedtT9yDxDcf8RNikOYuPq78,15
29
- agi_med_common-4.0.4.dist-info/RECORD,,
26
+ agi_med_common-4.0.6.dist-info/METADATA,sha256=RwjXqgPp2Pw0591Sjy0hUs73zkYEkgwCP69KCqV11wE,546
27
+ agi_med_common-4.0.6.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
28
+ agi_med_common-4.0.6.dist-info/top_level.txt,sha256=26o565jF_7wYQj7-YJfTedtT9yDxDcf8RNikOYuPq78,15
29
+ agi_med_common-4.0.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5