streamlit-octostar-utils 0.2.0__py3-none-any.whl → 0.2.2__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.
- streamlit_octostar_utils/api_crafter/nifi.py +20 -1
- streamlit_octostar_utils/octostar/client.py +2 -2
- {streamlit_octostar_utils-0.2.0.dist-info → streamlit_octostar_utils-0.2.2.dist-info}/METADATA +1 -1
- {streamlit_octostar_utils-0.2.0.dist-info → streamlit_octostar_utils-0.2.2.dist-info}/RECORD +6 -6
- {streamlit_octostar_utils-0.2.0.dist-info → streamlit_octostar_utils-0.2.2.dist-info}/LICENSE +0 -0
- {streamlit_octostar_utils-0.2.0.dist-info → streamlit_octostar_utils-0.2.2.dist-info}/WHEEL +0 -0
@@ -81,6 +81,7 @@ class NifiEntityModel(BaseModel):
|
|
81
81
|
sync_params: dict = Field(default_factory=dict)
|
82
82
|
nifi_attributes: dict = Field(default_factory=dict)
|
83
83
|
config: dict = Field(default_factory=dict)
|
84
|
+
metrics: dict = Field(default_factory=dict)
|
84
85
|
contents_pointer: Optional[ContentsPointerModel] = None
|
85
86
|
is_temporary: bool = False
|
86
87
|
exception: dict = Field(default_factory=dict)
|
@@ -843,9 +844,26 @@ class NifiEntity(object):
|
|
843
844
|
entity_type == type or type in self.request["ontology_info"]["parents"]
|
844
845
|
)
|
845
846
|
|
846
|
-
def is_fragmented(self):
|
847
|
+
def is_fragmented(self) -> bool:
|
847
848
|
return bool(self.request["config"].get("fragment", {}).get("fragments_stack"))
|
848
849
|
|
850
|
+
def is_root_fragment(self, entity) -> bool:
|
851
|
+
def _is_sub_fragment_recursive(fragment: dict) -> bool:
|
852
|
+
if not isinstance(fragment, dict):
|
853
|
+
return False
|
854
|
+
if all(k in fragment for k in ["index", "count", "identifier"]):
|
855
|
+
return fragment.get("index", 0) != 0
|
856
|
+
for value in fragment.values():
|
857
|
+
if isinstance(value, dict):
|
858
|
+
if _is_sub_fragment_recursive(value):
|
859
|
+
return True
|
860
|
+
return False
|
861
|
+
|
862
|
+
if not self.is_fragmented():
|
863
|
+
return True
|
864
|
+
fragment = entity.request.get("config", {}).get("fragment", {})
|
865
|
+
return not _is_sub_fragment_recursive(fragment)
|
866
|
+
|
849
867
|
def to_json(self):
|
850
868
|
def _safe_encode(contents):
|
851
869
|
return base64.b64encode(contents) if contents else None
|
@@ -913,6 +931,7 @@ class NifiEntity(object):
|
|
913
931
|
},
|
914
932
|
"sync_params": {},
|
915
933
|
"nifi_attributes": {},
|
934
|
+
"metrics": {},
|
916
935
|
"config": deepcopy(self.request["config"]),
|
917
936
|
"fallback_os_workspace": self.request["fallback_os_workspace"],
|
918
937
|
"is_temporary": True,
|
@@ -42,9 +42,9 @@ def as_running_user(force_refresh=False):
|
|
42
42
|
else st.stop()
|
43
43
|
)
|
44
44
|
|
45
|
-
user_hash = int(hashlib.md5(running_user
|
45
|
+
user_hash = int(hashlib.md5(running_user.os_jwt.encode("utf-8")).hexdigest(), 16)
|
46
46
|
if "prev_user" not in session or hash(session["prev_user"]) != user_hash:
|
47
|
-
client = make_client(fixed_jwt=running_user
|
47
|
+
client = make_client(fixed_jwt=running_user.os_jwt)
|
48
48
|
user = User(client)
|
49
49
|
session["prev_user"] = user
|
50
50
|
session["token_expiry"] = user.jwt_expires_at
|
{streamlit_octostar_utils-0.2.0.dist-info → streamlit_octostar_utils-0.2.2.dist-info}/RECORD
RENAMED
@@ -2,7 +2,7 @@ streamlit_octostar_utils/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-Y
|
|
2
2
|
streamlit_octostar_utils/api_crafter/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
3
|
streamlit_octostar_utils/api_crafter/celery.py,sha256=bQq8P95j0XDWqx6Hdnm96PJL8kcp9ZcSKjveZUCQTVk,29874
|
4
4
|
streamlit_octostar_utils/api_crafter/fastapi.py,sha256=2bktT5Mwjs9XixWcOqUKMoLM_cgKl-cqZDUa2Imf4xA,14357
|
5
|
-
streamlit_octostar_utils/api_crafter/nifi.py,sha256=
|
5
|
+
streamlit_octostar_utils/api_crafter/nifi.py,sha256=DjF58brQal48Z1cmdOZwvhAPUSTUdku6zCXgi6DXiPE,45186
|
6
6
|
streamlit_octostar_utils/api_crafter/parser/__init__.py,sha256=YeYWF6sdQiCFV_RKNW2t9Vs6KJExE2pbXxWTe_DOayY,107
|
7
7
|
streamlit_octostar_utils/api_crafter/parser/combine_fields.py,sha256=ddc44xkajw8MU0peAX_263DL7rPXbTKbHUjpOhRgvyU,8790
|
8
8
|
streamlit_octostar_utils/api_crafter/parser/entities_parser.py,sha256=zOQoN-p1Gz6ZzxvoX4M1b4Fi3mfmQr5zaNUcp_8gCjw,30016
|
@@ -23,7 +23,7 @@ streamlit_octostar_utils/nlp/__init__.py,sha256=BtlYDZK_xaEbc7Ju_7MznXbCVPZcdLn2
|
|
23
23
|
streamlit_octostar_utils/nlp/language.py,sha256=13f6kAALYjC3EclBzcyKPd4GlIeIR1mWPu3S6d-z814,549
|
24
24
|
streamlit_octostar_utils/nlp/ner.py,sha256=EAx4WNCH3jO9KQlK47hG3RMjnNpFadGl7CKfCQmSM7c,13326
|
25
25
|
streamlit_octostar_utils/octostar/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
26
|
-
streamlit_octostar_utils/octostar/client.py,sha256=
|
26
|
+
streamlit_octostar_utils/octostar/client.py,sha256=NUvHe9asd65g4-hJ4CuUvUns-9dNWes1XZRJlO9eAAc,1690
|
27
27
|
streamlit_octostar_utils/octostar/context.py,sha256=TpucK48EbeVy4vDqKd9UULEtr1JOY-_4nBs-rXZzESw,212
|
28
28
|
streamlit_octostar_utils/octostar/permissions.py,sha256=G5nZQLR-k-5_Xeto4nDTb32828Ga-SHm1mvSB9tz-t4,1565
|
29
29
|
streamlit_octostar_utils/ontology/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
@@ -36,7 +36,7 @@ streamlit_octostar_utils/threading/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzp
|
|
36
36
|
streamlit_octostar_utils/threading/async_task_manager.py,sha256=q7N6YZwUvIYMzkSHmsJNheNVCv93c03H6Hyg9uH8pvk,4747
|
37
37
|
streamlit_octostar_utils/threading/session_callback_manager.py,sha256=LvZVP4g6tvKtYmI13f2j1sX_7hm61Groqp5xJine9_k,3973
|
38
38
|
streamlit_octostar_utils/threading/session_state_hot_swapper.py,sha256=6eeCQI6A42hp4DmW2NQw2rbeR-k9N8DhfBKQdN_fbLU,811
|
39
|
-
streamlit_octostar_utils-0.2.
|
40
|
-
streamlit_octostar_utils-0.2.
|
41
|
-
streamlit_octostar_utils-0.2.
|
42
|
-
streamlit_octostar_utils-0.2.
|
39
|
+
streamlit_octostar_utils-0.2.2.dist-info/LICENSE,sha256=dkwVPyV03fPHHtERnF6RnvRXcll__tud9gWca1RcgnQ,1073
|
40
|
+
streamlit_octostar_utils-0.2.2.dist-info/METADATA,sha256=dvOLTIIdkTcRAK9iA8kIH4pmBw3DE6MZy8x_-VMjVQ4,2256
|
41
|
+
streamlit_octostar_utils-0.2.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
42
|
+
streamlit_octostar_utils-0.2.2.dist-info/RECORD,,
|
{streamlit_octostar_utils-0.2.0.dist-info → streamlit_octostar_utils-0.2.2.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|