PyStellarDB 0.13.0__tar.gz → 0.13.2__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.
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/PKG-INFO +14 -2
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/PyStellarDB.egg-info/PKG-INFO +14 -2
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/pystellardb/_version.py +3 -3
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/pystellardb/graph_types.py +25 -6
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/LICENSE +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/MANIFEST.in +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/PyStellarDB.egg-info/SOURCES.txt +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/PyStellarDB.egg-info/dependency_links.txt +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/PyStellarDB.egg-info/requires.txt +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/PyStellarDB.egg-info/top_level.txt +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/README.rst +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/pystellardb/__init__.py +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/pystellardb/stellar_hive.py +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/pystellardb/stellar_rdd.py +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/setup.cfg +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/setup.py +0 -0
- {PyStellarDB-0.13.0 → pystellardb-0.13.2}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyStellarDB
|
3
|
-
Version: 0.13.
|
3
|
+
Version: 0.13.2
|
4
4
|
Summary: Python interface to StellarDB
|
5
5
|
Home-page: https://github.com/WarpCloud/PyStellarDB
|
6
6
|
Author: Zhiping Wang
|
@@ -11,12 +11,24 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
12
12
|
Classifier: Topic :: Database :: Front-Ends
|
13
13
|
Requires-Python: >=2.7
|
14
|
+
License-File: LICENSE
|
15
|
+
Requires-Dist: future
|
16
|
+
Requires-Dist: python-dateutil
|
17
|
+
Requires-Dist: pyhive
|
18
|
+
Requires-Dist: sasl
|
19
|
+
Requires-Dist: thrift
|
20
|
+
Requires-Dist: thrift-sasl>=0.3.0
|
14
21
|
Provides-Extra: presto
|
22
|
+
Requires-Dist: requests>=1.0.0; extra == "presto"
|
15
23
|
Provides-Extra: hive
|
24
|
+
Requires-Dist: sasl>=0.2.1; extra == "hive"
|
25
|
+
Requires-Dist: thrift>=0.10.0; extra == "hive"
|
16
26
|
Provides-Extra: sqlalchemy
|
27
|
+
Requires-Dist: sqlalchemy>=1.3.0; extra == "sqlalchemy"
|
17
28
|
Provides-Extra: kerberos
|
29
|
+
Requires-Dist: requests_kerberos>=0.12.0; extra == "kerberos"
|
18
30
|
Provides-Extra: pyspark
|
19
|
-
|
31
|
+
Requires-Dist: pyspark>=2.4.0; extra == "pyspark"
|
20
32
|
|
21
33
|
PyStellarDB
|
22
34
|
===========
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyStellarDB
|
3
|
-
Version: 0.13.
|
3
|
+
Version: 0.13.2
|
4
4
|
Summary: Python interface to StellarDB
|
5
5
|
Home-page: https://github.com/WarpCloud/PyStellarDB
|
6
6
|
Author: Zhiping Wang
|
@@ -11,12 +11,24 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
12
12
|
Classifier: Topic :: Database :: Front-Ends
|
13
13
|
Requires-Python: >=2.7
|
14
|
+
License-File: LICENSE
|
15
|
+
Requires-Dist: future
|
16
|
+
Requires-Dist: python-dateutil
|
17
|
+
Requires-Dist: pyhive
|
18
|
+
Requires-Dist: sasl
|
19
|
+
Requires-Dist: thrift
|
20
|
+
Requires-Dist: thrift-sasl>=0.3.0
|
14
21
|
Provides-Extra: presto
|
22
|
+
Requires-Dist: requests>=1.0.0; extra == "presto"
|
15
23
|
Provides-Extra: hive
|
24
|
+
Requires-Dist: sasl>=0.2.1; extra == "hive"
|
25
|
+
Requires-Dist: thrift>=0.10.0; extra == "hive"
|
16
26
|
Provides-Extra: sqlalchemy
|
27
|
+
Requires-Dist: sqlalchemy>=1.3.0; extra == "sqlalchemy"
|
17
28
|
Provides-Extra: kerberos
|
29
|
+
Requires-Dist: requests_kerberos>=0.12.0; extra == "kerberos"
|
18
30
|
Provides-Extra: pyspark
|
19
|
-
|
31
|
+
Requires-Dist: pyspark>=2.4.0; extra == "pyspark"
|
20
32
|
|
21
33
|
PyStellarDB
|
22
34
|
===========
|
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "
|
11
|
+
"date": "2024-09-05T19:42:39+0800",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "0.13.
|
14
|
+
"full-revisionid": "9e31319f3dbef3dc053f379b94f099e358d589a5",
|
15
|
+
"version": "0.13.2"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
@@ -18,6 +18,7 @@ class GraphElement(with_metaclass(abc.ABCMeta, object)):
|
|
18
18
|
self._label = label
|
19
19
|
self._fields = {}
|
20
20
|
self._tags = []
|
21
|
+
self._rowKeyHexString = None
|
21
22
|
|
22
23
|
def getLabel(self):
|
23
24
|
return self._label
|
@@ -40,6 +41,12 @@ class GraphElement(with_metaclass(abc.ABCMeta, object)):
|
|
40
41
|
def setTags(self, newTags):
|
41
42
|
self._tags = newTags
|
42
43
|
|
44
|
+
def setRowKeyHexString(self, rowkey):
|
45
|
+
self._rowKeyHexString = rowkey
|
46
|
+
|
47
|
+
def getRowKeyHexString(self):
|
48
|
+
return self._rowKeyHexString
|
49
|
+
|
43
50
|
|
44
51
|
class Vertex(GraphElement):
|
45
52
|
"""
|
@@ -58,6 +65,7 @@ class Vertex(GraphElement):
|
|
58
65
|
'type': 'vertex',
|
59
66
|
'label': self._label,
|
60
67
|
'uid': self._uid,
|
68
|
+
'RowKeyHexString': self._rowKeyHexString,
|
61
69
|
}
|
62
70
|
|
63
71
|
if self._tags is not None and len(self._tags) > 0:
|
@@ -69,7 +77,7 @@ class Vertex(GraphElement):
|
|
69
77
|
return m
|
70
78
|
|
71
79
|
def __str__(self):
|
72
|
-
return json.dumps(self.toJSON())
|
80
|
+
return json.dumps(self.toJSON(), ensure_ascii=False)
|
73
81
|
|
74
82
|
@staticmethod
|
75
83
|
def parseVertexFromJson(json_str):
|
@@ -98,6 +106,9 @@ class Vertex(GraphElement):
|
|
98
106
|
if '__tags' in prop_dict:
|
99
107
|
vertex.setTags(prop_dict['__tags'])
|
100
108
|
|
109
|
+
rk = " ".join(map(lambda x: str(x), m['entityKey']))
|
110
|
+
vertex.setRowKeyHexString(rk)
|
111
|
+
|
101
112
|
return vertex
|
102
113
|
|
103
114
|
@staticmethod
|
@@ -176,6 +187,7 @@ class Edge(GraphElement):
|
|
176
187
|
'euid': self._uid,
|
177
188
|
'startNode': self._startNode.toJSON(),
|
178
189
|
'endNode': self._endNode.toJSON(),
|
190
|
+
'RowKeyHexString': self._rowKeyHexString,
|
179
191
|
}
|
180
192
|
|
181
193
|
if self._tags is not None and len(self._tags) > 0:
|
@@ -187,7 +199,7 @@ class Edge(GraphElement):
|
|
187
199
|
return m
|
188
200
|
|
189
201
|
def __str__(self):
|
190
|
-
return json.dumps(self.toJSON())
|
202
|
+
return json.dumps(self.toJSON(), ensure_ascii=False)
|
191
203
|
|
192
204
|
@staticmethod
|
193
205
|
def parseEdgeFromJson(schema, json_str):
|
@@ -204,6 +216,9 @@ class Edge(GraphElement):
|
|
204
216
|
|
205
217
|
edge = Edge(m['labels'][0])
|
206
218
|
|
219
|
+
rk = " ".join(map(lambda x: str(x), m['entityKey']))
|
220
|
+
edge.setRowKeyHexString(rk)
|
221
|
+
|
207
222
|
prop_dict = m['properties']
|
208
223
|
|
209
224
|
# parse start node
|
@@ -222,8 +237,10 @@ class Edge(GraphElement):
|
|
222
237
|
raise ValueError(
|
223
238
|
'Could not find start node label with label index `{}`'.format(
|
224
239
|
startLabelIdx))
|
225
|
-
|
226
|
-
|
240
|
+
|
241
|
+
start_node = Vertex(startUid, startLabel)
|
242
|
+
start_node.setRowKeyHexString(" ".join(map(lambda x: str(x), m['entityKey'][:8])))
|
243
|
+
edge.setStartNode(start_node)
|
227
244
|
|
228
245
|
# parse end node
|
229
246
|
if 'endKey' not in m:
|
@@ -242,7 +259,9 @@ class Edge(GraphElement):
|
|
242
259
|
'Could not find end node label with label index `{}`'.format(
|
243
260
|
endLabelIdx))
|
244
261
|
|
245
|
-
|
262
|
+
end_node = Vertex(endUid, endLabel)
|
263
|
+
end_node.setRowKeyHexString(" ".join(map(lambda x: str(x), m['entityKey'][8:16])))
|
264
|
+
edge.setEndNode(end_node)
|
246
265
|
|
247
266
|
# parse extra edge id
|
248
267
|
if '__uid' in prop_dict:
|
@@ -362,7 +381,7 @@ class GraphSchema(object):
|
|
362
381
|
return m
|
363
382
|
|
364
383
|
def __str__(self):
|
365
|
-
return json.dumps(self.toJSON())
|
384
|
+
return json.dumps(self.toJSON(), ensure_ascii=False)
|
366
385
|
|
367
386
|
@staticmethod
|
368
387
|
def parseSchemaFromJson(json_str):
|
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
|