streamlit-octostar-utils 0.4.2.dev23__tar.gz → 0.4.2.dev24__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.
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/PKG-INFO +1 -1
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/pyproject.toml +1 -1
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/nifi.py +10 -1
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/LICENSE +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/README.md +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/celery.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/contents.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parallelism.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/core/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/core/dict.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/core/filetypes.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/core/timestamp.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/nlp/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/nlp/custom_recognizers.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/nlp/language.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/nlp/ner.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/octostar/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/octostar/client.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/octostar/context.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/octostar/permissions.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/ontology/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/ontology/relationships.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/ontology/validation.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/style/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/style/common.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev23 → streamlit_octostar_utils-0.4.2.dev24}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
|
@@ -25,7 +25,7 @@ from ..core.dict import recursive_update_dict, travel_dict, jsondict_hash
|
|
|
25
25
|
from ..core.timestamp import now, string_to_datetime
|
|
26
26
|
from .fastapi import DefaultErrorRoute, Route
|
|
27
27
|
from ..ontology.inheritance import is_child_concept as is_child_concept_fn, get_label, get_label_keys
|
|
28
|
-
from .contents import Contents, WorkspaceAttachmentContents, TemporaryAttachmentContents
|
|
28
|
+
from .contents import Contents, WorkspaceAttachmentContents, TemporaryAttachmentContents, MemoryContents
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class RelationshipName(BaseModel):
|
|
@@ -49,6 +49,8 @@ OS_RESERVED_FIELDS = [
|
|
|
49
49
|
"entity_label", "os_created_at", "os_created_by",
|
|
50
50
|
"os_last_updated_at", "os_last_updated_by",
|
|
51
51
|
]
|
|
52
|
+
MAX_IN_MEMORY_SIZE_BYTES = 5_242_880
|
|
53
|
+
|
|
52
54
|
|
|
53
55
|
class NifiProxyEntityModel(BaseModel):
|
|
54
56
|
entity_id: str
|
|
@@ -957,6 +959,12 @@ class NifiEntity(object):
|
|
|
957
959
|
)
|
|
958
960
|
if isinstance(file, Contents):
|
|
959
961
|
child_entity._contents = file
|
|
962
|
+
elif len(file) <= MAX_IN_MEMORY_SIZE_BYTES:
|
|
963
|
+
child_entity._contents = MemoryContents(
|
|
964
|
+
entity_type=os_entity_type,
|
|
965
|
+
filetype=filetype,
|
|
966
|
+
initial_data=file,
|
|
967
|
+
)
|
|
960
968
|
else:
|
|
961
969
|
temp_filename = f"tmp_{child_entity.record['os_entity_uid']}"
|
|
962
970
|
temp_contents = TemporaryAttachmentContents(
|
|
@@ -965,6 +973,7 @@ class NifiEntity(object):
|
|
|
965
973
|
filename=temp_filename,
|
|
966
974
|
client=self.context.client,
|
|
967
975
|
)
|
|
976
|
+
temp_contents.truncate(0)
|
|
968
977
|
temp_contents.write(file)
|
|
969
978
|
temp_contents.flush()
|
|
970
979
|
child_entity._contents = temp_contents
|
|
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
|
|
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
|