kodexa 7.4.412538129491__tar.gz → 7.4.412538433490__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/PKG-INFO +1 -1
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/platform/client.py +22 -7
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/pyproject.toml +1 -1
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/LICENSE +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/README.md +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/dataclasses/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/base.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/entities/check_response.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/entities/product_group.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/model.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/objects.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/persistence.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/utils.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/core.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/steps/common.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/training/__init__.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/training/train_utils.py +0 -0
- {kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/utils/__init__.py +0 -0
@@ -4783,7 +4783,8 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4783
4783
|
self.client.put(url, body=document_status.model_dump(by_alias=True))
|
4784
4784
|
|
4785
4785
|
def add_document(
|
4786
|
-
self, document: Document, content_object: Optional[ContentObject] = None
|
4786
|
+
self, document: Document, content_object: Optional[ContentObject] = None,
|
4787
|
+
taxonomies: Optional[List[Taxonomy]] = None, data_store: Optional[Store] = None
|
4787
4788
|
):
|
4788
4789
|
"""
|
4789
4790
|
Add a document to the document family.
|
@@ -4791,22 +4792,36 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4791
4792
|
Args:
|
4792
4793
|
document (Document): The document to add.
|
4793
4794
|
content_object (Optional[ContentObject]): The content object. Defaults to None.
|
4795
|
+
taxonomies (Optional[List[Taxonomy]]): List of taxonomies to use. Defaults to None.
|
4796
|
+
data_store (Optional[Store]): Data store to add document to. Defaults to None.
|
4794
4797
|
"""
|
4795
4798
|
url = (
|
4796
4799
|
f'/api/stores/{self.store_ref.replace(":", "/")}/families/{self.id}/objects'
|
4797
4800
|
)
|
4798
4801
|
if content_object is None:
|
4799
4802
|
content_object = self.content_objects[-1]
|
4803
|
+
|
4804
|
+
params = {
|
4805
|
+
"sourceContentObjectId": content_object.id,
|
4806
|
+
"transitionType": "DERIVED",
|
4807
|
+
"documentVersion": document.version
|
4808
|
+
}
|
4809
|
+
|
4810
|
+
# If we have a store but no taxonomies or the other way around then we need to throw an error
|
4811
|
+
if (data_store and not taxonomies) or (taxonomies and not data_store):
|
4812
|
+
raise Exception("If you provide a data store you must also provide taxonomies and vice-versa")
|
4813
|
+
|
4814
|
+
if taxonomies:
|
4815
|
+
params["taxonomyRefs"] = ",".join([taxonomy.ref for taxonomy in taxonomies])
|
4816
|
+
|
4817
|
+
if data_store:
|
4818
|
+
params["dataStoreRef"] = data_store.ref
|
4819
|
+
|
4800
4820
|
self.client.post(
|
4801
4821
|
url,
|
4802
|
-
params=
|
4803
|
-
"sourceContentObjectId": content_object.id,
|
4804
|
-
"transitionType": "DERIVED",
|
4805
|
-
"documentVersion": document.version,
|
4806
|
-
},
|
4822
|
+
params=params,
|
4807
4823
|
files={"file": document.to_kddb()},
|
4808
4824
|
)
|
4809
|
-
|
4810
4825
|
def export_as_zip(self) -> bytes:
|
4811
4826
|
"""
|
4812
4827
|
Export the document family as bytes.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.4.
|
3
|
+
version = "7.4.412538433490"
|
4
4
|
description = "Python SDK for the Kodexa Platform"
|
5
5
|
authors = ["Austin Redenbaugh <austin@kodexa.com>", "Philip Dodds <philip@kodexa.com>", "Romar Cablao <rcablao@kodexa.com>", "Amadea Paula Dodds <amadeapaula@kodexa.com>"]
|
6
6
|
readme = "README.md"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/dataclasses/templates/llm_data_class.j2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.412538129491 → kodexa-7.4.412538433490}/kodexa/model/entities/product_subscription.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
|
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
|
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
|