documente_shared 0.1.107__tar.gz → 0.1.109__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.107 → documente_shared-0.1.109}/PKG-INFO +1 -1
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/processing_case_item.py +1 -1
- documente_shared-0.1.107/documente_shared/infrastructure/repositories/http_document_processing.py → documente_shared-0.1.109/documente_shared/infrastructure/repositories/http_document.py +11 -8
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/http_processing_case.py +2 -1
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/http_processing_case_item.py +2 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/pyproject.toml +1 -1
- {documente_shared-0.1.107 → documente_shared-0.1.109}/README.md +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/dates.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/files.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/json.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/numbers.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/payloads.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/query_params.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/document.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/in_memory_document.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/processing_case.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/processing_case_filters.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/processing_case_item_filters.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/processing_documents.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/processing_event.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/scaling.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/enums/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/enums/common.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/enums/document.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/enums/processing_case.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/exceptions.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/interfaces/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/interfaces/scaling.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/repositories/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/repositories/document.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/repositories/processing_case.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/repositories/processing_case_item.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/documente_client.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/lambdas.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/dynamo_document.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/dynamo_processing_case.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/mem_document.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/mem_processing_case.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/repositories/mem_processing_case_item.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/services/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/services/http_scaling.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/sqs_queue.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/presentation/__init__.py +0 -0
- {documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/presentation/presenters.py +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
from loguru import logger
|
|
3
5
|
from requests import Response
|
|
4
6
|
|
|
5
7
|
from documente_shared.application.payloads import camel_to_snake
|
|
6
8
|
from documente_shared.domain.entities.document import DocumentProcessing
|
|
7
|
-
from documente_shared.domain.enums.document import DocumentProcessingStatus
|
|
9
|
+
from documente_shared.domain.enums.document import DocumentProcessingStatus
|
|
8
10
|
from documente_shared.domain.repositories.document import DocumentProcessingRepository
|
|
9
11
|
from documente_shared.infrastructure.documente_client import DocumenteClientMixin
|
|
10
12
|
|
|
@@ -15,25 +17,26 @@ class HttpDocumentProcessingRepository(
|
|
|
15
17
|
DocumentProcessingRepository,
|
|
16
18
|
):
|
|
17
19
|
def find(self, digest: str) -> Optional[DocumentProcessing]:
|
|
18
|
-
response = self.session.get(f"{self.api_url}/documents/{digest}/")
|
|
20
|
+
response = self.session.get(f"{self.api_url}/v1/documents/{digest}/")
|
|
19
21
|
if response.status_code == 200:
|
|
20
|
-
return self.
|
|
22
|
+
return self._build_document_processing(response)
|
|
21
23
|
return None
|
|
22
24
|
|
|
23
25
|
def persist(self, instance: DocumentProcessing) -> DocumentProcessing:
|
|
26
|
+
logger.info(f"PERSISTING_DOCUMENT: data={instance.to_simple_dict}")
|
|
24
27
|
response = self.session.put(
|
|
25
|
-
url=f"{self.api_url}/documents/{instance.digest}/",
|
|
28
|
+
url=f"{self.api_url}/v1/documents/{instance.digest}/",
|
|
26
29
|
json=instance.to_simple_dict,
|
|
27
30
|
)
|
|
28
31
|
if response.status_code in [200, 201]:
|
|
29
32
|
raise Exception(f'Error persisting document processing: {response.text}')
|
|
30
|
-
return self.
|
|
33
|
+
return self._build_document_processing(response)
|
|
31
34
|
|
|
32
35
|
def remove(self, instance: DocumentProcessing):
|
|
33
|
-
self.session.delete(f"{self.api_url}/documents/{instance.digest}/")
|
|
36
|
+
self.session.delete(f"{self.api_url}/v1/documents/{instance.digest}/")
|
|
34
37
|
|
|
35
38
|
def filter(self, statuses: List[DocumentProcessingStatus]) -> List[DocumentProcessing]:
|
|
36
|
-
response = self.session.get(f"{self.api_url}/documents/?statuses={statuses}")
|
|
39
|
+
response = self.session.get(f"{self.api_url}/v1/documents/?statuses={statuses}")
|
|
37
40
|
if response.status_code == 200:
|
|
38
41
|
raw_response = response.json()
|
|
39
42
|
return [
|
|
@@ -43,7 +46,7 @@ class HttpDocumentProcessingRepository(
|
|
|
43
46
|
return []
|
|
44
47
|
|
|
45
48
|
@classmethod
|
|
46
|
-
def
|
|
49
|
+
def _build_document_processing(cls, response: Response) -> DocumentProcessing:
|
|
47
50
|
response_json = response.json()
|
|
48
51
|
instance_data = response_json.get('data', {})
|
|
49
52
|
return DocumentProcessing.from_dict(camel_to_snake(instance_data))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from typing import List, Optional
|
|
3
3
|
|
|
4
|
+
from loguru import logger
|
|
4
5
|
from requests import Response
|
|
5
6
|
|
|
6
7
|
from documente_shared.application.payloads import camel_to_snake
|
|
@@ -22,13 +23,13 @@ class HttpProcessingCaseRepository(
|
|
|
22
23
|
return None
|
|
23
24
|
|
|
24
25
|
def persist(self, instance: ProcessingCase) -> ProcessingCase:
|
|
26
|
+
logger.info(f"PERSISTING_PROCESSING_CASE: data={instance.to_dict}")
|
|
25
27
|
response = self.session.put(
|
|
26
28
|
url=f"{self.api_url}/v1/processing-cases/{instance.uuid}/",
|
|
27
29
|
json=instance.to_dict,
|
|
28
30
|
)
|
|
29
31
|
if response.status_code not in [200, 201]:
|
|
30
32
|
raise Exception(f'Error persisting processing case: {response.text}')
|
|
31
|
-
|
|
32
33
|
return self._build_processing_case(response)
|
|
33
34
|
|
|
34
35
|
def remove(self, instance: ProcessingCase):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from typing import List, Optional
|
|
3
3
|
|
|
4
|
+
from loguru import logger
|
|
4
5
|
from requests import Response
|
|
5
6
|
|
|
6
7
|
from documente_shared.application.payloads import camel_to_snake
|
|
@@ -28,6 +29,7 @@ class HttpProcessingCaseItemRepository(
|
|
|
28
29
|
return None
|
|
29
30
|
|
|
30
31
|
def persist(self, instance: ProcessingCaseItem) -> ProcessingCaseItem:
|
|
32
|
+
logger.info(f"PERSISTING_PROCESSING_CASE_ITEM: data={instance.to_simple_dict}")
|
|
31
33
|
response: Response = self.session.put(
|
|
32
34
|
url=f"{self.api_url}/v1/processing-case-items/{instance.uuid}/",
|
|
33
35
|
json=instance.to_persist_dict,
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/digest.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/numbers.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/payloads.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/query_params.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/document.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
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/entities/scaling.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/enums/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/enums/common.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/enums/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/domain/interfaces/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/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.107 → documente_shared-0.1.109}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/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
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/presentation/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.107 → documente_shared-0.1.109}/documente_shared/presentation/presenters.py
RENAMED
|
File without changes
|