garf-core 0.0.10__py3-none-any.whl → 0.0.11__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.
- garf_core/__init__.py +1 -1
- garf_core/report.py +11 -2
- {garf_core-0.0.10.dist-info → garf_core-0.0.11.dist-info}/METADATA +1 -1
- {garf_core-0.0.10.dist-info → garf_core-0.0.11.dist-info}/RECORD +7 -7
- {garf_core-0.0.10.dist-info → garf_core-0.0.11.dist-info}/WHEEL +0 -0
- {garf_core-0.0.10.dist-info → garf_core-0.0.11.dist-info}/entry_points.txt +0 -0
- {garf_core-0.0.10.dist-info → garf_core-0.0.11.dist-info}/top_level.txt +0 -0
garf_core/__init__.py
CHANGED
garf_core/report.py
CHANGED
@@ -213,13 +213,22 @@ class GarfReport:
|
|
213
213
|
) from e
|
214
214
|
return pd.DataFrame(data=self.results, columns=self.column_names)
|
215
215
|
|
216
|
-
def
|
216
|
+
def to_jsonl(self) -> str:
|
217
|
+
"""Converts report to JSON Lines."""
|
218
|
+
return self.to_json(output='jsonl')
|
219
|
+
|
220
|
+
def to_json(self, output: Literal['json', 'jsonl'] = 'json') -> str:
|
217
221
|
"""Converts report to JSON.
|
218
222
|
|
223
|
+
Args:
|
224
|
+
output: Format of json file (json or jsonl).
|
225
|
+
|
219
226
|
Returns:
|
220
227
|
JSON from report results and column_names.
|
221
228
|
"""
|
222
|
-
|
229
|
+
if output == 'json':
|
230
|
+
return json.dumps(self.to_list(row_type='dict'))
|
231
|
+
return '\n'.join(json.dumps(row) for row in self.to_list(row_type='dict'))
|
223
232
|
|
224
233
|
def get_value(
|
225
234
|
self, column_index: int = 0, row_index: int = 0
|
@@ -1,13 +1,13 @@
|
|
1
|
-
garf_core/__init__.py,sha256=
|
1
|
+
garf_core/__init__.py,sha256=yZsVFJAqd5GWGzVYTAL99fSC0wOE6wdiWLQQmnzjw58,599
|
2
2
|
garf_core/api_clients.py,sha256=S7Ldmgf0H9Vew2BdfG3Yh6imkhdnr8ix_YHKJmGln-U,2280
|
3
3
|
garf_core/base_query.py,sha256=ZDAw2ojmismXRO0HXEvKDukpS7OAc7390LnM8kvCSCY,1201
|
4
4
|
garf_core/exceptions.py,sha256=Gzvkl2M-rA_XQRAMd3CC62KHeFQE_b6uby0fD0pouw4,1269
|
5
5
|
garf_core/parsers.py,sha256=Uj7aT7roYUofivrBKVKWfcSeG37oYGGLIJ-op2C3hZc,3238
|
6
6
|
garf_core/query_editor.py,sha256=MVfrZdNlJ0EBDPc2ux7XxSArRyOo1QoXvrnKYn6aHTs,16381
|
7
|
-
garf_core/report.py,sha256=
|
7
|
+
garf_core/report.py,sha256=2z4tUR5mg29CkwodGaFIXs8Vpo2DCyyzwJWXhBrT0R4,19910
|
8
8
|
garf_core/report_fetcher.py,sha256=1PtJ8iQwlEcUeW6k1lVZiXh-3hop5x2YHQe-EaKYGNs,4405
|
9
|
-
garf_core-0.0.
|
10
|
-
garf_core-0.0.
|
11
|
-
garf_core-0.0.
|
12
|
-
garf_core-0.0.
|
13
|
-
garf_core-0.0.
|
9
|
+
garf_core-0.0.11.dist-info/METADATA,sha256=MtxuWeqHxia8dJB76s_ZgO6rIXBt7XGN6ZzGzj7brTk,2425
|
10
|
+
garf_core-0.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
11
|
+
garf_core-0.0.11.dist-info/entry_points.txt,sha256=ODxSZXwWEIXQAjRwBQsBJ6GYw8oPK6DYTo0oDVkKCpo,39
|
12
|
+
garf_core-0.0.11.dist-info/top_level.txt,sha256=Gj-Zp7fM2turGut5vTJuo5xEcKfow7cTLX3y3WFfNgA,10
|
13
|
+
garf_core-0.0.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|