kodexa 7.4.412416544440__py3-none-any.whl → 7.4.412448324201__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.
- kodexa/platform/client.py +7 -2
- {kodexa-7.4.412416544440.dist-info → kodexa-7.4.412448324201.dist-info}/METADATA +1 -1
- {kodexa-7.4.412416544440.dist-info → kodexa-7.4.412448324201.dist-info}/RECORD +5 -5
- {kodexa-7.4.412416544440.dist-info → kodexa-7.4.412448324201.dist-info}/LICENSE +0 -0
- {kodexa-7.4.412416544440.dist-info → kodexa-7.4.412448324201.dist-info}/WHEEL +0 -0
kodexa/platform/client.py
CHANGED
@@ -5428,6 +5428,7 @@ class DocumentStoreEndpoint(StoreEndpoint):
|
|
5428
5428
|
replace=False,
|
5429
5429
|
additional_metadata: Optional[dict] = None,
|
5430
5430
|
external_data: Optional[dict] = None,
|
5431
|
+
document: Optional[Document] = None,
|
5431
5432
|
):
|
5432
5433
|
"""
|
5433
5434
|
Upload a file to the store.
|
@@ -5438,6 +5439,7 @@ class DocumentStoreEndpoint(StoreEndpoint):
|
|
5438
5439
|
replace (bool): Replace the file if it already exists (Default False).
|
5439
5440
|
additional_metadata (Optional[dict]): Additional metadata to add to the file (Default None).
|
5440
5441
|
external_data (Optional[dict]): External data to add to the file (Default None).
|
5442
|
+
document (Optional[Document]): The document to add to the file (Default None).
|
5441
5443
|
"""
|
5442
5444
|
if Path(file_path).is_file():
|
5443
5445
|
logger.info(f"Uploading {file_path}")
|
@@ -5447,7 +5449,8 @@ class DocumentStoreEndpoint(StoreEndpoint):
|
|
5447
5449
|
content=path_content,
|
5448
5450
|
replace=replace,
|
5449
5451
|
additional_metadata=additional_metadata,
|
5450
|
-
external_data=external_data
|
5452
|
+
external_data=external_data,
|
5453
|
+
document=document,
|
5451
5454
|
)
|
5452
5455
|
else:
|
5453
5456
|
raise Exception(f"{file_path} is not a file")
|
@@ -5459,6 +5462,7 @@ class DocumentStoreEndpoint(StoreEndpoint):
|
|
5459
5462
|
replace=False,
|
5460
5463
|
additional_metadata: Optional[dict] = None,
|
5461
5464
|
external_data: Optional[dict] = None,
|
5465
|
+
document: Optional[Document] = None,
|
5462
5466
|
) -> DocumentFamilyEndpoint:
|
5463
5467
|
"""
|
5464
5468
|
Put the content into the store at the given path.
|
@@ -5469,11 +5473,12 @@ class DocumentStoreEndpoint(StoreEndpoint):
|
|
5469
5473
|
replace (bool): Replace the content if it exists.
|
5470
5474
|
additional_metadata (Optional[dict]): Additional metadata to store with the document (not it can't include 'path').
|
5471
5475
|
external_data (Optional[dict]): External data to store with the document.
|
5476
|
+
document (Optional[Document]): The document to store with the content.
|
5472
5477
|
|
5473
5478
|
Returns:
|
5474
5479
|
DocumentFamilyEndpoint: The document family that was created.
|
5475
5480
|
"""
|
5476
|
-
files = {"file": content}
|
5481
|
+
files = {"file": content, "document": document.to_kddb()} if document else {"file": content}
|
5477
5482
|
|
5478
5483
|
if additional_metadata is None:
|
5479
5484
|
additional_metadata = {}
|
@@ -18,7 +18,7 @@ kodexa/model/utils.py,sha256=6R-3rFiW9irBwj0Mq5yhp7EDXkNUFaeFhr3bWmnlW4g,2961
|
|
18
18
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
19
19
|
kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
|
20
20
|
kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
|
21
|
-
kodexa/platform/client.py,sha256=
|
21
|
+
kodexa/platform/client.py,sha256=V-LAiT6PmbZ_6oKhMGnxJc2lJlOGgVH12g_vUJxVsiY,226970
|
22
22
|
kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
|
23
23
|
kodexa/platform/kodexa.py,sha256=tPXHO500q3S75GhKGDcaxO51Viq2PNlHmAzpBZlahgo,34857
|
24
24
|
kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
|
@@ -43,7 +43,7 @@ kodexa/testing/test_utils.py,sha256=v44p__gE7ia67W7WeHN2HBFCWSCUrCZt7G4xBNCmwf8,
|
|
43
43
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
44
44
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
45
45
|
kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
|
46
|
-
kodexa-7.4.
|
47
|
-
kodexa-7.4.
|
48
|
-
kodexa-7.4.
|
49
|
-
kodexa-7.4.
|
46
|
+
kodexa-7.4.412448324201.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
47
|
+
kodexa-7.4.412448324201.dist-info/METADATA,sha256=jYHeL5L-NYuT7capncmLxjLvuGHuRZEkLg74NwpPSnM,3528
|
48
|
+
kodexa-7.4.412448324201.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
49
|
+
kodexa-7.4.412448324201.dist-info/RECORD,,
|
File without changes
|
File without changes
|