stormlibpp 0.5.2__tar.gz → 0.5.3__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.
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/PKG-INFO +1 -1
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/pyproject.toml +1 -1
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/__init__.py +1 -1
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/httpcore.py +5 -3
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp.egg-info/PKG-INFO +1 -1
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/LICENSE +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/README.md +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/setup.cfg +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/errors.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/hstorm.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/node.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/stormpkg.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/telepath.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/tmpcortex.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp/utils.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp.egg-info/SOURCES.txt +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp.egg-info/dependency_links.txt +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp.egg-info/requires.txt +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/src/stormlibpp.egg-info/top_level.txt +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/tests/test_httpcore.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/tests/test_node.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/tests/test_stormpkg.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/tests/test_telepath.py +0 -0
- {stormlibpp-0.5.2 → stormlibpp-0.5.3}/tests/test_utils.py +0 -0
|
@@ -46,7 +46,7 @@ that can be used for testing other tools. It creates a user (``test``) with pass
|
|
|
46
46
|
script will support custom Cortex configuration.
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
|
-
__version__ = "0.5.
|
|
49
|
+
__version__ = "0.5.3"
|
|
50
50
|
|
|
51
51
|
# TODO - Do we want to change this to only import submods, or do we even need that?
|
|
52
52
|
from . import errors
|
|
@@ -9,7 +9,7 @@ HTTP. For example, the ``hstorm`` CLI replaces a ``Cortex`` object with an
|
|
|
9
9
|
import aiohttp
|
|
10
10
|
import json
|
|
11
11
|
|
|
12
|
-
import synapse.
|
|
12
|
+
import synapse.lib.msgpack as s_msgpack
|
|
13
13
|
|
|
14
14
|
from .errors import (
|
|
15
15
|
HttpCortexError,
|
|
@@ -219,12 +219,14 @@ class HttpCortex:
|
|
|
219
219
|
opts : dict | None, optional
|
|
220
220
|
Storm options to use when executing this Storm code, by default None.
|
|
221
221
|
tuplify : bool, optional
|
|
222
|
-
Whether to pass streamed Storm messages to the ``synapse.
|
|
222
|
+
Whether to pass streamed Storm messages to the ``synapse.lib.msgpack.deepcopy``
|
|
223
223
|
function for conversion to the "packed tuple" format that most Cortex
|
|
224
224
|
methods use. This results in a slight performance hit but it plays nice
|
|
225
225
|
with all of the existing Synapse code, most importantly the CLI. Setting
|
|
226
226
|
this option to False, will remove the performance concerns but it may
|
|
227
227
|
break other tooling that are expecting "packed tuple" input values.
|
|
228
|
+
``synapse.common.tuplify`` was another candidate over ``deepcopy``, but
|
|
229
|
+
``deepcopy`` is faster.
|
|
228
230
|
By default True.
|
|
229
231
|
|
|
230
232
|
Yields
|
|
@@ -252,7 +254,7 @@ class HttpCortex:
|
|
|
252
254
|
|
|
253
255
|
data = json.loads(byts)
|
|
254
256
|
if tuplify:
|
|
255
|
-
yield
|
|
257
|
+
yield s_msgpack.deepcopy(data)
|
|
256
258
|
else:
|
|
257
259
|
yield data
|
|
258
260
|
|
|
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
|