Skip to content

Commit 7796292

Browse files
authored
Merge pull request #169 from axiomhq/remove-ndjson
2 parents f86ed19 + dfda17f commit 7796292

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencies = [
1111
"ujson>=5.10.0",
1212
"dacite>=1.8.1",
1313
"pyhumps>=3.8.0",
14-
"ndjson>=0.3.1",
1514
]
1615
license = { file = "LICENSE" }
1716
classifiers = [

src/axiom_py/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Client provides an easy-to use client library to connect to Axiom."""
22

3-
import ndjson
43
import atexit
54
import gzip
65
import ujson
@@ -254,8 +253,9 @@ def ingest_events(
254253
See https://axiom.co/docs/restapi/endpoints/ingestIntoDataset
255254
"""
256255
# encode request payload to NDJSON
257-
content = ndjson.dumps(
258-
events, default=handle_json_serialization
256+
content = "\n".join(
257+
ujson.dumps(event, default=handle_json_serialization)
258+
for event in events
259259
).encode("UTF-8")
260260
gzipped = gzip.compress(content)
261261

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def test_step005_apl_query_messages(self):
197197
self.assertEqual(len(qr.status.messages), 1)
198198
self.assertEqual(
199199
qr.status.messages[0].msg,
200-
"line: 1, col: 24: where clause always evaluates to TRUE, which will include all data",
200+
"where clause always evaluates to TRUE, which will include all data",
201201
)
202202
self.assertEqual(
203203
qr.status.messages[0].code,

0 commit comments

Comments
 (0)