documente_shared 0.1.70__tar.gz → 0.1.71__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.70 → documente_shared-0.1.71}/PKG-INFO +4 -3
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/document.py +4 -5
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/processing_case.py +12 -12
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/processing_case_item.py +4 -5
- documente_shared-0.1.70/documente_shared/domain/repositories.py → documente_shared-0.1.71/documente_shared/domain/repositories/document.py +3 -4
- documente_shared-0.1.71/documente_shared/domain/repositories/processing_case.py +24 -0
- documente_shared-0.1.71/documente_shared/domain/repositories/processing_case_item.py +29 -0
- documente_shared-0.1.71/documente_shared/infrastructure/__init__.py +0 -0
- documente_shared-0.1.71/documente_shared/infrastructure/repositories/__init__.py +0 -0
- documente_shared-0.1.70/documente_shared/infrastructure/dynamo_repositories.py → documente_shared-0.1.71/documente_shared/infrastructure/repositories/dynamo_document.py +3 -3
- documente_shared-0.1.71/documente_shared/infrastructure/repositories/dynamo_processing_case.py +43 -0
- documente_shared-0.1.71/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py +54 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/infrastructure/sqs_queue.py +1 -1
- {documente_shared-0.1.70 → documente_shared-0.1.71}/pyproject.toml +4 -3
- {documente_shared-0.1.70 → documente_shared-0.1.71}/README.md +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/files.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/in_memory_result.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/processing_event.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/enums/__init__.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/enums/common.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/enums/document.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/enums/processing_case.py +0 -0
- {documente_shared-0.1.70/documente_shared/infrastructure → documente_shared-0.1.71/documente_shared/domain/repositories}/__init__.py +0 -0
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/infrastructure/dynamo_table.py +3 -3
- {documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/infrastructure/s3_bucket.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: documente_shared
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.71
|
|
4
4
|
Summary: Shared utilities for Documente AI projects
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Tech
|
|
@@ -11,8 +11,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Dist: boto3 (>=1.
|
|
15
|
-
Requires-Dist: botocore (>=1.
|
|
14
|
+
Requires-Dist: boto3 (>=1.37.19,<2.0.0)
|
|
15
|
+
Requires-Dist: botocore (>=1.37.19,<2.0.0)
|
|
16
|
+
Requires-Dist: pytz (>=2025.2,<2026.0)
|
|
16
17
|
Requires-Dist: sentry-sdk (>=2.19.2,<3.0.0)
|
|
17
18
|
Description-Content-Type: text/markdown
|
|
18
19
|
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/document.py
RENAMED
|
@@ -4,19 +4,18 @@ from datetime import datetime, tzinfo
|
|
|
4
4
|
from decimal import Decimal
|
|
5
5
|
from typing import Optional, List
|
|
6
6
|
|
|
7
|
-
from documente_shared.application.files import remove_slash_from_path,
|
|
7
|
+
from documente_shared.application.files import remove_slash_from_path, get_filename_from_path
|
|
8
8
|
from documente_shared.application.time_utils import get_datetime_from_data
|
|
9
9
|
from documente_shared.domain.constants import la_paz_tz
|
|
10
10
|
from documente_shared.domain.entities.document_metadata import DocumentProcessingMetadata
|
|
11
|
-
from documente_shared.domain.enums import (
|
|
11
|
+
from documente_shared.domain.enums.document import (
|
|
12
12
|
DocumentProcessingStatus,
|
|
13
|
+
DocumentProcessingCategory,
|
|
13
14
|
DocumentProcessingSubCategory,
|
|
14
|
-
|
|
15
|
+
DocumentProcessingSource,
|
|
15
16
|
)
|
|
16
17
|
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
19
|
@dataclass
|
|
21
20
|
class DocumentProcessing(object):
|
|
22
21
|
digest: str
|
|
@@ -11,7 +11,7 @@ from documente_shared.domain.enums.processing_case import ProcessingCaseCategory
|
|
|
11
11
|
|
|
12
12
|
@dataclass
|
|
13
13
|
class ProcessingCase(object):
|
|
14
|
-
|
|
14
|
+
case_id: str
|
|
15
15
|
status: ProcessingStatus
|
|
16
16
|
category: Optional[ProcessingCaseCategory] = None
|
|
17
17
|
enqueued_at: Optional[datetime] = None
|
|
@@ -61,21 +61,21 @@ class ProcessingCase(object):
|
|
|
61
61
|
return False
|
|
62
62
|
|
|
63
63
|
return (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
self.case_id == other.case_id
|
|
65
|
+
and self.status == other.status
|
|
66
|
+
and self.category == other.category
|
|
67
|
+
and self.enqueued_at == other.enqueued_at
|
|
68
|
+
and self.started_at == other.started_at
|
|
69
|
+
and self.failed_at == other.failed_at
|
|
70
|
+
and self.feedback == other.feedback
|
|
71
|
+
and self.completed_at == other.completed_at
|
|
72
|
+
and self.metadata == other.metadata
|
|
73
73
|
)
|
|
74
74
|
|
|
75
75
|
@property
|
|
76
76
|
def to_dict(self) -> dict:
|
|
77
77
|
return {
|
|
78
|
-
'
|
|
78
|
+
'case_id': self.case_id,
|
|
79
79
|
'status': str(self.status),
|
|
80
80
|
'category': (
|
|
81
81
|
str(self.category)
|
|
@@ -120,7 +120,7 @@ class ProcessingCase(object):
|
|
|
120
120
|
@classmethod
|
|
121
121
|
def from_dict(cls, data: dict) -> 'ProcessingCase':
|
|
122
122
|
return cls(
|
|
123
|
-
|
|
123
|
+
case_id=data.get('case_id'),
|
|
124
124
|
status=ProcessingStatus.from_value(data.get('status')),
|
|
125
125
|
category=(
|
|
126
126
|
ProcessingCaseCategory.from_value(data.get('category'))
|
|
@@ -12,7 +12,7 @@ from documente_shared.domain.enums.processing_case import ProcessingDocumentType
|
|
|
12
12
|
|
|
13
13
|
@dataclass
|
|
14
14
|
class ProcessingCaseItem(object):
|
|
15
|
-
|
|
15
|
+
item_id: str
|
|
16
16
|
case_id: str
|
|
17
17
|
digest: str
|
|
18
18
|
status: ProcessingStatus
|
|
@@ -99,12 +99,12 @@ class ProcessingCaseItem(object):
|
|
|
99
99
|
@property
|
|
100
100
|
def to_dict(self) -> dict:
|
|
101
101
|
return {
|
|
102
|
-
'
|
|
102
|
+
'item_id': self.item_id,
|
|
103
103
|
'case_id': self.case_id,
|
|
104
104
|
'digest': self.digest,
|
|
105
105
|
'status': str(self.status),
|
|
106
106
|
'document': self.document.to_dict,
|
|
107
|
-
'document_type': self.document_type,
|
|
107
|
+
'document_type': str(self.document_type),
|
|
108
108
|
'uploaded_from': (
|
|
109
109
|
str(self.uploaded_from)
|
|
110
110
|
if self.uploaded_from else None
|
|
@@ -139,7 +139,6 @@ class ProcessingCaseItem(object):
|
|
|
139
139
|
@property
|
|
140
140
|
def to_simple_dict(self) -> dict:
|
|
141
141
|
simple_dict = self.to_dict.copy()
|
|
142
|
-
simple_dict.pop('metadata_items')
|
|
143
142
|
return simple_dict
|
|
144
143
|
|
|
145
144
|
def overload(
|
|
@@ -173,7 +172,7 @@ class ProcessingCaseItem(object):
|
|
|
173
172
|
@classmethod
|
|
174
173
|
def from_dict(cls, data: dict) -> 'ProcessingCaseItem':
|
|
175
174
|
return cls(
|
|
176
|
-
|
|
175
|
+
item_id=data.get('item_id'),
|
|
177
176
|
case_id=data.get('case_id'),
|
|
178
177
|
digest=data.get('digest'),
|
|
179
178
|
status=ProcessingStatus.from_value(data.get('status')),
|
|
@@ -2,13 +2,13 @@ from abc import ABC, abstractmethod
|
|
|
2
2
|
from typing import Optional, List
|
|
3
3
|
|
|
4
4
|
from documente_shared.domain.entities.document import DocumentProcessing
|
|
5
|
-
from documente_shared.domain.enums import DocumentProcessingStatus
|
|
5
|
+
from documente_shared.domain.enums.document import DocumentProcessingStatus
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class DocumentProcessingRepository(ABC):
|
|
9
9
|
|
|
10
10
|
@abstractmethod
|
|
11
|
-
def find(self, digest: str) ->Optional[DocumentProcessing]:
|
|
11
|
+
def find(self, digest: str) -> Optional[DocumentProcessing]:
|
|
12
12
|
raise NotImplementedError
|
|
13
13
|
|
|
14
14
|
@abstractmethod
|
|
@@ -19,7 +19,6 @@ class DocumentProcessingRepository(ABC):
|
|
|
19
19
|
def remove(self, instance: DocumentProcessing):
|
|
20
20
|
raise NotImplementedError
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
@abstractmethod
|
|
24
23
|
def filter(self, statuses: List[DocumentProcessingStatus]) -> List[DocumentProcessing]:
|
|
25
|
-
raise NotImplementedError
|
|
24
|
+
raise NotImplementedError
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
from typing import Optional, List
|
|
3
|
+
|
|
4
|
+
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
5
|
+
from documente_shared.domain.enums.common import ProcessingStatus
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ProcessingCaseRepository(ABC):
|
|
9
|
+
|
|
10
|
+
@abstractmethod
|
|
11
|
+
def find(self, case_id: str) -> Optional[ProcessingCase]:
|
|
12
|
+
raise NotImplementedError
|
|
13
|
+
|
|
14
|
+
@abstractmethod
|
|
15
|
+
def persist(self, instance: ProcessingCase) -> ProcessingCase:
|
|
16
|
+
raise NotImplementedError
|
|
17
|
+
|
|
18
|
+
@abstractmethod
|
|
19
|
+
def remove(self, instance: ProcessingCase):
|
|
20
|
+
raise NotImplementedError
|
|
21
|
+
|
|
22
|
+
@abstractmethod
|
|
23
|
+
def filter(self, statuses: List[ProcessingStatus]) -> List[ProcessingCase]:
|
|
24
|
+
raise NotImplementedError
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
from typing import Optional, List
|
|
3
|
+
|
|
4
|
+
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
5
|
+
from documente_shared.domain.entities.processing_case_item import ProcessingCaseItem
|
|
6
|
+
from documente_shared.domain.enums.common import ProcessingStatus
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ProcessingCaseItemRepository(ABC):
|
|
10
|
+
|
|
11
|
+
@abstractmethod
|
|
12
|
+
def find(self, digest: str) -> Optional[ProcessingCaseItem]:
|
|
13
|
+
raise NotImplementedError
|
|
14
|
+
|
|
15
|
+
@abstractmethod
|
|
16
|
+
def persist(self, instance: ProcessingCaseItem) -> ProcessingCaseItem:
|
|
17
|
+
raise NotImplementedError
|
|
18
|
+
|
|
19
|
+
@abstractmethod
|
|
20
|
+
def remove(self, instance: ProcessingCaseItem):
|
|
21
|
+
raise NotImplementedError
|
|
22
|
+
|
|
23
|
+
@abstractmethod
|
|
24
|
+
def filter(self, statuses: List[ProcessingStatus]) -> List[ProcessingCase]:
|
|
25
|
+
raise NotImplementedError
|
|
26
|
+
|
|
27
|
+
@abstractmethod
|
|
28
|
+
def filter_by_case_id(self, case_id: str) -> List[ProcessingCase]:
|
|
29
|
+
raise NotImplementedError
|
|
File without changes
|
|
File without changes
|
|
@@ -3,10 +3,10 @@ from typing import Optional, List
|
|
|
3
3
|
from boto3.dynamodb.conditions import Key
|
|
4
4
|
|
|
5
5
|
from documente_shared.domain.entities.document import DocumentProcessing
|
|
6
|
-
from documente_shared.domain.enums import DocumentProcessingStatus
|
|
7
|
-
from documente_shared.domain.repositories import DocumentProcessingRepository
|
|
8
|
-
from documente_shared.infrastructure.dynamo_table import DynamoDBTable
|
|
6
|
+
from documente_shared.domain.enums.document import DocumentProcessingStatus
|
|
7
|
+
from documente_shared.domain.repositories.document import DocumentProcessingRepository
|
|
9
8
|
|
|
9
|
+
from documente_shared.infrastructure.dynamo_table import DynamoDBTable
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class DynamoDocumentProcessingRepository(
|
documente_shared-0.1.71/documente_shared/infrastructure/repositories/dynamo_processing_case.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from typing import Optional, List
|
|
2
|
+
|
|
3
|
+
from boto3.dynamodb.conditions import Key
|
|
4
|
+
|
|
5
|
+
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
6
|
+
from documente_shared.domain.enums.common import ProcessingStatus
|
|
7
|
+
from documente_shared.domain.repositories.processing_case import ProcessingCaseRepository
|
|
8
|
+
|
|
9
|
+
from documente_shared.infrastructure.dynamo_table import DynamoDBTable
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DynamoProcessingCaseRepository(
|
|
13
|
+
DynamoDBTable,
|
|
14
|
+
ProcessingCaseRepository,
|
|
15
|
+
):
|
|
16
|
+
def find(self, case_id: str) -> Optional[ProcessingCase]:
|
|
17
|
+
item = self.get(key={'case_id': case_id})
|
|
18
|
+
if item:
|
|
19
|
+
return ProcessingCase.from_dict(item)
|
|
20
|
+
return None
|
|
21
|
+
|
|
22
|
+
def persist(self, instance: ProcessingCase) -> ProcessingCase:
|
|
23
|
+
self.put(instance.to_persist_dict)
|
|
24
|
+
return instance
|
|
25
|
+
|
|
26
|
+
def remove(self, instance: ProcessingCase):
|
|
27
|
+
self.delete(key={'case_id': instance.case_id})
|
|
28
|
+
|
|
29
|
+
def filter(self, statuses: List[ProcessingStatus]) -> List[ProcessingCase]:
|
|
30
|
+
items = []
|
|
31
|
+
|
|
32
|
+
for status in statuses:
|
|
33
|
+
response = self._table.query(
|
|
34
|
+
IndexName='status',
|
|
35
|
+
KeyConditionExpression=Key('status').eq(status.value),
|
|
36
|
+
)
|
|
37
|
+
status_items = response.get('Items', [])
|
|
38
|
+
items.extend(status_items)
|
|
39
|
+
|
|
40
|
+
return [
|
|
41
|
+
ProcessingCase.from_dict(item)
|
|
42
|
+
for item in items
|
|
43
|
+
]
|
documente_shared-0.1.71/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from typing import Optional, List
|
|
2
|
+
|
|
3
|
+
from boto3.dynamodb.conditions import Key
|
|
4
|
+
|
|
5
|
+
from documente_shared.domain.entities.processing_case_item import ProcessingCaseItem
|
|
6
|
+
from documente_shared.domain.enums.common import ProcessingStatus
|
|
7
|
+
from documente_shared.domain.repositories.processing_case_item import ProcessingCaseItemRepository
|
|
8
|
+
|
|
9
|
+
from documente_shared.infrastructure.dynamo_table import DynamoDBTable
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DynamoProcessingCaseItemRepository(
|
|
13
|
+
DynamoDBTable,
|
|
14
|
+
ProcessingCaseItemRepository,
|
|
15
|
+
):
|
|
16
|
+
def find(self, digest: str) -> Optional[ProcessingCaseItem]:
|
|
17
|
+
item = self.get(key={'digest': digest})
|
|
18
|
+
if item:
|
|
19
|
+
return ProcessingCaseItem.from_dict(item)
|
|
20
|
+
return None
|
|
21
|
+
|
|
22
|
+
def persist(self, instance: ProcessingCaseItem) -> ProcessingCaseItem:
|
|
23
|
+
self.put(instance.to_simple_dict)
|
|
24
|
+
return instance
|
|
25
|
+
|
|
26
|
+
def remove(self, instance: ProcessingCaseItem):
|
|
27
|
+
self.delete(key={'case_id': instance.case_id})
|
|
28
|
+
|
|
29
|
+
def filter(self, statuses: List[ProcessingStatus]) -> List[ProcessingCaseItem]:
|
|
30
|
+
items = []
|
|
31
|
+
|
|
32
|
+
for status in statuses:
|
|
33
|
+
response = self._table.query(
|
|
34
|
+
IndexName='status',
|
|
35
|
+
KeyConditionExpression=Key('status').eq(status.value),
|
|
36
|
+
)
|
|
37
|
+
status_items = response.get('Items', [])
|
|
38
|
+
items.extend(status_items)
|
|
39
|
+
|
|
40
|
+
return [
|
|
41
|
+
ProcessingCaseItem.from_dict(item)
|
|
42
|
+
for item in items
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
def filter_by_case_id(self, case_id: str) -> List[ProcessingCaseItem]:
|
|
46
|
+
response = self._table.query(
|
|
47
|
+
IndexName='case_id',
|
|
48
|
+
KeyConditionExpression=Key('case_id').eq(case_id),
|
|
49
|
+
)
|
|
50
|
+
items = response.get('Items', [])
|
|
51
|
+
return [
|
|
52
|
+
ProcessingCaseItem.from_dict(item)
|
|
53
|
+
for item in items
|
|
54
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "documente_shared"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.71"
|
|
4
4
|
description = "Shared utilities for Documente AI projects"
|
|
5
5
|
authors = ["Tech <tech@llamitai.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -8,9 +8,10 @@ readme = "README.md"
|
|
|
8
8
|
|
|
9
9
|
[tool.poetry.dependencies]
|
|
10
10
|
python = ">=3.10,<3.13"
|
|
11
|
-
boto3 = "^1.
|
|
12
|
-
botocore = "^1.
|
|
11
|
+
boto3 = "^1.37.19"
|
|
12
|
+
botocore = "^1.37.19"
|
|
13
13
|
sentry-sdk = "^2.19.2"
|
|
14
|
+
pytz = "^2025.2"
|
|
14
15
|
|
|
15
16
|
[tool.poetry.dev-dependencies]
|
|
16
17
|
pytest = "^8.3.4"
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/enums/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/enums/document.py
RENAMED
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/domain/enums/processing_case.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/infrastructure/dynamo_table.py
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from dataclasses import dataclass
|
|
2
|
-
|
|
3
1
|
import boto3
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
4
|
from boto3.dynamodb.conditions import Key
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
RETURN_VALUES = 'UPDATED_NEW'
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
@dataclass
|
|
10
11
|
class DynamoDBTable(object):
|
|
11
12
|
table_name: str
|
|
@@ -50,7 +51,6 @@ class DynamoDBTable(object):
|
|
|
50
51
|
def count(self) -> int:
|
|
51
52
|
return self._table.item_count
|
|
52
53
|
|
|
53
|
-
|
|
54
54
|
@classmethod
|
|
55
55
|
def _update_expression(cls, attributes):
|
|
56
56
|
return 'SET {param}'.format(
|
{documente_shared-0.1.70 → documente_shared-0.1.71}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|