documente_shared 0.1.63__py3-none-any.whl → 0.1.64__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.

@@ -1,3 +1,4 @@
1
+ import json
1
2
  from dataclasses import dataclass
2
3
  from datetime import datetime, tzinfo
3
4
  from decimal import Decimal
@@ -123,6 +124,14 @@ class DocumentProcessing(object):
123
124
  filename_with_extension = self.extended_filename
124
125
  return filename_with_extension.split('.')[0]
125
126
 
127
+ @property
128
+ def processed_metadata_bytes(self) -> bytes:
129
+ metadata_items = [
130
+ metadata_item.to_dict
131
+ for metadata_item in self.metadata_items
132
+ ]
133
+ return json.dumps(metadata_items).encode('utf-8')
134
+
126
135
  @property
127
136
  def has_original_file(self) -> bool:
128
137
  return bool(self.file_path) and self.file_bytes
@@ -19,7 +19,6 @@ class DocumentProcessingMetadata(object):
19
19
  num_tokens: Optional[float] = None
20
20
  citcular_type: Optional[str] = None
21
21
 
22
-
23
22
  @property
24
23
  def to_dict(self):
25
24
  return {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: documente_shared
3
- Version: 0.1.63
3
+ Version: 0.1.64
4
4
  Summary: Shared utilities for Documente AI projects
5
5
  License: MIT
6
6
  Author: Tech
@@ -8,8 +8,8 @@ documente_shared/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
8
8
  documente_shared/domain/base_enum.py,sha256=DojAfn-zQdtjtImeHUpBzE6TBTm07XrbMOdW3h8RVd8,1449
9
9
  documente_shared/domain/constants.py,sha256=jOlMKFq12FgiYMJcQHku8IVwuOE5t-HEPuSV_zEeIFo,56
10
10
  documente_shared/domain/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- documente_shared/domain/entities/document.py,sha256=2B-XbBumM750_zdlfBGDAETAu0IyvC1-K8qYym0D9Vw,11987
12
- documente_shared/domain/entities/document_metadata.py,sha256=Oa-c0xJODXaGtFkNxt9k86rSWGxY2LHVDOgu9tQxCGY,2354
11
+ documente_shared/domain/entities/document.py,sha256=hyz0uoQYKgA4-qN-IDCmnfzDc1YdR8vZJUF7fhJVuC0,12245
12
+ documente_shared/domain/entities/document_metadata.py,sha256=ygyFIC5qwxlm8DUM5kvVFny9zJfPQS8vNLM2br5XsQ8,2353
13
13
  documente_shared/domain/enums.py,sha256=NltZA1YVgJ7dVfSQdJFIE0ZUGf9Y-nxNXsVQ6GiPLL4,1827
14
14
  documente_shared/domain/repositories.py,sha256=g3qLUy2kT8esmvU4VxxSVnDaXeySKKQ7mUvIvxOwh9A,757
15
15
  documente_shared/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -17,6 +17,6 @@ documente_shared/infrastructure/dynamo_repositories.py,sha256=SEad_HLppp2h_BKDSz
17
17
  documente_shared/infrastructure/dynamo_table.py,sha256=dK05KgFvIYCmOdMpq9-OV_OBrP6cCngiUikCJrxlwt4,2112
18
18
  documente_shared/infrastructure/s3_bucket.py,sha256=vT_yN42RFQXubtUn8ln-j13Os_-25UGClVtXg5Bkv6I,1932
19
19
  documente_shared/infrastructure/sqs_queue.py,sha256=PSiTAnjXvQ-W-9mzLpH2UjbQJTvYkMiaxNaMecF-cR4,1505
20
- documente_shared-0.1.63.dist-info/METADATA,sha256=DnJ41dmAYYLIoUaBF8buBnC5LbdMo2SLhQ6gkSh2IhA,800
21
- documente_shared-0.1.63.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
22
- documente_shared-0.1.63.dist-info/RECORD,,
20
+ documente_shared-0.1.64.dist-info/METADATA,sha256=_hWcVqi2nqEPl7FswATh4nWO3zKCNuIEzqSatXffzPQ,800
21
+ documente_shared-0.1.64.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
22
+ documente_shared-0.1.64.dist-info/RECORD,,