documente_shared 0.1.91__py3-none-any.whl → 0.1.93__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 documente_shared might be problematic. Click here for more details.

@@ -58,15 +58,6 @@ class ProcessingCase(object):
58
58
  def deleted(self):
59
59
  self.status = ProcessingStatus.DELETED
60
60
 
61
-
62
- def procesable_items(self) -> List[ProcessingCaseItem]:
63
- return [
64
- item for item in self.items
65
- if item.status in [
66
- ProcessingStatus.PENDING,
67
- ProcessingStatus.ENQUEUED,
68
- ]
69
- ]
70
61
 
71
62
  def __eq__(self, other: 'ProcessingCase') -> bool:
72
63
  if not other:
@@ -112,6 +103,20 @@ class ProcessingCase(object):
112
103
  ]
113
104
  return persist_data
114
105
 
106
+ @property
107
+ def procesable_items(self) -> List[ProcessingCaseItem]:
108
+ return [
109
+ item for item in self.items
110
+ if item.status in [
111
+ ProcessingStatus.PENDING,
112
+ ProcessingStatus.ENQUEUED,
113
+ ]
114
+ ]
115
+
116
+ @property
117
+ def has_procesable_items(self) -> bool:
118
+ return len(self.procesable_items) > 0
119
+
115
120
  @classmethod
116
121
  def from_dict(cls, data: dict) -> 'ProcessingCase':
117
122
  return cls(
@@ -31,6 +31,14 @@ class ProcessingEvent(object):
31
31
  def is_document(self) -> bool:
32
32
  return self.processing_type == ProcessingType.DOCUMENT
33
33
 
34
+ @property
35
+ def uuid(self) -> Optional[str]:
36
+ if self.is_document:
37
+ return self.instance.digest
38
+ elif self.is_processing_case:
39
+ return self.instance.uuid
40
+ return None
41
+
34
42
  @property
35
43
  def to_dict(self) -> dict:
36
44
  return {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: documente_shared
3
- Version: 0.1.91
3
+ Version: 0.1.93
4
4
  Summary: Shared utilities for Documente AI projects
5
5
  License: MIT
6
6
  Author: Tech
@@ -15,11 +15,11 @@ documente_shared/domain/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
15
15
  documente_shared/domain/entities/document.py,sha256=AthTUyA-QZE3WAT7lMoKVr_Z8mO_3qERuCnZge0DTLQ,12595
16
16
  documente_shared/domain/entities/document_metadata.py,sha256=ygyFIC5qwxlm8DUM5kvVFny9zJfPQS8vNLM2br5XsQ8,2353
17
17
  documente_shared/domain/entities/in_memory_result.py,sha256=0sLNUrovKFQx4M-E9e4DrAiVgch2i4AKA-9BQBRaeI8,1482
18
- documente_shared/domain/entities/processing_case.py,sha256=GHMKKelwGofsjrd40CG8Vkyp8RCc0Fsx57QXBYHZYh4,5230
18
+ documente_shared/domain/entities/processing_case.py,sha256=3zq70K9bMhhWDX-r2sGDDzcSj8dkfE0Vp_2G9YLKTBE,5349
19
19
  documente_shared/domain/entities/processing_case_filters.py,sha256=harKyu7QEuL1bI_Z8_UxkVCMo5r9vHeNHyi_Ja07vjs,1953
20
20
  documente_shared/domain/entities/processing_case_item.py,sha256=U_g99AJdlRRJpJ0NPfmXzlr2x04l5hc53oNLxx_Q7XQ,9734
21
21
  documente_shared/domain/entities/processing_case_item_filters.py,sha256=R_AvDCB496Lww1qn2OwtltqULKE3IpcJB0ejnmRkg7Q,2009
22
- documente_shared/domain/entities/processing_event.py,sha256=AMkW4dJjW6ss-uvDeWzVMBIJtax8JNWy-zPo1R-TiWY,1963
22
+ documente_shared/domain/entities/processing_event.py,sha256=izdBXEz0TMNjxxZVjcM3YclzOv250JOV-amSpqmtQ9c,2180
23
23
  documente_shared/domain/entities/scaling.py,sha256=Me1z3X-5NjzPMX-TBQ4xHwE_44tIJegi1QSCHQRNtx4,745
24
24
  documente_shared/domain/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  documente_shared/domain/enums/common.py,sha256=wJWYhh98sdCGL_1WodhYLpoT_IYTzkTDOexclpaIM-0,2827
@@ -48,6 +48,6 @@ documente_shared/infrastructure/services/http_scaling.py,sha256=cIo-61nfIwbtO86E
48
48
  documente_shared/infrastructure/sqs_queue.py,sha256=KZWeHZ9zmXmrxoNpOQX7GEdDhZ1knbPXgwSwFwJblGg,1504
49
49
  documente_shared/presentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  documente_shared/presentation/presenters.py,sha256=GGAEwefmjCIVepsUA2oZOVLxXbhhiISPM0Jgt6dT6O0,423
51
- documente_shared-0.1.91.dist-info/METADATA,sha256=uQLe_KK-thOLz0Ni0oeNhijUNuUwSNg8j17dWAUUIXA,920
52
- documente_shared-0.1.91.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
- documente_shared-0.1.91.dist-info/RECORD,,
51
+ documente_shared-0.1.93.dist-info/METADATA,sha256=YSvwdn6kKI2_1xOaKGIhUcY4X60uPnJrt0odePZrQvU,920
52
+ documente_shared-0.1.93.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
+ documente_shared-0.1.93.dist-info/RECORD,,