documente_shared 0.1.116__tar.gz → 0.1.118__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.
Potentially problematic release.
This version of documente_shared might be problematic. Click here for more details.
- {documente_shared-0.1.116 → documente_shared-0.1.118}/PKG-INFO +1 -1
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/document.py +5 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/in_memory_document.py +8 -2
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/processing_case_item.py +21 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/processing_event.py +6 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/pyproject.toml +1 -1
- {documente_shared-0.1.116 → documente_shared-0.1.118}/README.md +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/dates.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/files.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/json.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/numbers.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/payloads.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/query_params.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/processing_case.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/processing_case_filters.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/processing_case_item_filters.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/processing_documents.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/scaling.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/enums/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/enums/common.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/enums/document.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/enums/processing_case.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/exceptions.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/interfaces/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/interfaces/scaling.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/repositories/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/repositories/document.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/repositories/processing_case.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/repositories/processing_case_item.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/documente_client.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/lambdas.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/dynamo_document.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/dynamo_processing_case.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/http_document.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/http_processing_case.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/http_processing_case_item.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/mem_document.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/mem_processing_case.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/repositories/mem_processing_case_item.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/services/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/services/http_scaling.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/sqs_queue.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/presentation/__init__.py +0 -0
- {documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/presentation/presenters.py +0 -0
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/document.py
RENAMED
|
@@ -278,6 +278,11 @@ class DocumentProcessing(object):
|
|
|
278
278
|
simple_dict.pop('metadata_items')
|
|
279
279
|
return simple_dict
|
|
280
280
|
|
|
281
|
+
@property
|
|
282
|
+
def to_queue_dict(self) -> dict:
|
|
283
|
+
return self.to_dict
|
|
284
|
+
|
|
285
|
+
|
|
281
286
|
def overload(
|
|
282
287
|
self,
|
|
283
288
|
new_instance: 'DocumentProcessing',
|
|
@@ -2,7 +2,7 @@ import base64
|
|
|
2
2
|
from typing import Optional
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
|
-
from documente_shared.application.files import get_filename_from_path, remove_extension
|
|
5
|
+
from documente_shared.application.files import get_filename_from_path, remove_extension, remove_slash_from_path
|
|
6
6
|
from documente_shared.domain.exceptions import InMemoryDocumentContentError
|
|
7
7
|
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ class InMemoryDocument(object):
|
|
|
39
39
|
|
|
40
40
|
@property
|
|
41
41
|
def file_key(self) -> Optional[str]:
|
|
42
|
-
return self.
|
|
42
|
+
return remove_slash_from_path(self.file_path)
|
|
43
43
|
|
|
44
44
|
@property
|
|
45
45
|
def is_procesable(self) -> bool:
|
|
@@ -52,6 +52,12 @@ class InMemoryDocument(object):
|
|
|
52
52
|
"file_base64": self.file_base64,
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
@property
|
|
56
|
+
def to_queue_dict(self) -> dict:
|
|
57
|
+
return {
|
|
58
|
+
"file_path": self.file_path,
|
|
59
|
+
}
|
|
60
|
+
|
|
55
61
|
@classmethod
|
|
56
62
|
def from_dict(cls, data: dict):
|
|
57
63
|
file_bytes = data.get("file_bytes")
|
|
@@ -210,6 +210,27 @@ class ProcessingCaseItem(object):
|
|
|
210
210
|
simple_dict = self.to_dict.copy()
|
|
211
211
|
return simple_dict
|
|
212
212
|
|
|
213
|
+
@property
|
|
214
|
+
def to_queue_dict(self) -> dict:
|
|
215
|
+
queue_dict = self.to_dict.copy()
|
|
216
|
+
queue_dict["document"] = (
|
|
217
|
+
self.document.to_queue_dict
|
|
218
|
+
if self.document else None
|
|
219
|
+
)
|
|
220
|
+
queue_dict["processed_csv"] = (
|
|
221
|
+
self.processed_csv.to_queue_dict
|
|
222
|
+
if self.processed_csv else None
|
|
223
|
+
)
|
|
224
|
+
queue_dict["processed_xlsx"] = (
|
|
225
|
+
self.processed_xlsx.to_queue_dict
|
|
226
|
+
if self.processed_xlsx else None
|
|
227
|
+
)
|
|
228
|
+
queue_dict["processed_json"] = (
|
|
229
|
+
self.processed_json.to_queue_dict
|
|
230
|
+
if self.processed_json else None
|
|
231
|
+
)
|
|
232
|
+
return queue_dict
|
|
233
|
+
|
|
213
234
|
@property
|
|
214
235
|
def to_persist_dict(self) -> dict:
|
|
215
236
|
simple_dict = self.to_dict.copy()
|
|
@@ -47,6 +47,12 @@ class ProcessingEvent(object):
|
|
|
47
47
|
'timestamp': self.timestamp.isoformat() if self.timestamp else None,
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
@property
|
|
51
|
+
def to_queue_dict(self) -> dict:
|
|
52
|
+
dict_data = self.to_dict
|
|
53
|
+
dict_data['instance'] = self.instance.to_queue_dict
|
|
54
|
+
return dict_data
|
|
55
|
+
|
|
50
56
|
@classmethod
|
|
51
57
|
def from_dict(cls, data: dict) -> 'ProcessingEvent':
|
|
52
58
|
processing_type = ProcessingType.from_value(data.get('processing_type'))
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/digest.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/numbers.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/payloads.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/query_params.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/entities/scaling.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/enums/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/enums/common.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/enums/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/interfaces/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/domain/interfaces/scaling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/lambdas.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
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/presentation/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.116 → documente_shared-0.1.118}/documente_shared/presentation/presenters.py
RENAMED
|
File without changes
|