destiny_sdk 0.2.2__py3-none-any.whl → 0.2.3__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.
- destiny_sdk/core.py +15 -1
- {destiny_sdk-0.2.2.dist-info → destiny_sdk-0.2.3.dist-info}/METADATA +1 -1
- {destiny_sdk-0.2.2.dist-info → destiny_sdk-0.2.3.dist-info}/RECORD +5 -5
- {destiny_sdk-0.2.2.dist-info → destiny_sdk-0.2.3.dist-info}/WHEEL +0 -0
- {destiny_sdk-0.2.2.dist-info → destiny_sdk-0.2.3.dist-info}/licenses/LICENSE +0 -0
destiny_sdk/core.py
CHANGED
|
@@ -4,6 +4,18 @@ from typing import Self
|
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel
|
|
6
6
|
|
|
7
|
+
# These are non-standard newline characters that are not escaped by model_dump_json().
|
|
8
|
+
# We want jsonl files to have empirical new lines so they can be streamed line by line.
|
|
9
|
+
# Hence we replace each occurrence with standard new lines.
|
|
10
|
+
_ESCAPED_NEW_LINE = "\\n"
|
|
11
|
+
_UNSUPPORTED_NEWLINE_TRANSLATION = str.maketrans(
|
|
12
|
+
{
|
|
13
|
+
"\u0085": _ESCAPED_NEW_LINE,
|
|
14
|
+
"\u2028": _ESCAPED_NEW_LINE,
|
|
15
|
+
"\u2029": _ESCAPED_NEW_LINE,
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
|
|
7
19
|
|
|
8
20
|
class _JsonlFileInputMixIn(BaseModel):
|
|
9
21
|
"""
|
|
@@ -20,7 +32,9 @@ class _JsonlFileInputMixIn(BaseModel):
|
|
|
20
32
|
:return: The JSONL string representation of the model.
|
|
21
33
|
:rtype: str
|
|
22
34
|
"""
|
|
23
|
-
return self.model_dump_json(exclude_none=True)
|
|
35
|
+
return self.model_dump_json(exclude_none=True).translate(
|
|
36
|
+
_UNSUPPORTED_NEWLINE_TRANSLATION
|
|
37
|
+
)
|
|
24
38
|
|
|
25
39
|
@classmethod
|
|
26
40
|
def from_jsonl(cls, jsonl: str) -> Self:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: destiny_sdk
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: A software development kit (sdk) to support interaction with the DESTINY repository
|
|
5
5
|
Author-email: Adam Hamilton <adam@futureevidence.org>, Andrew Harvey <andrew@futureevidence.org>, Daniel Breves <daniel@futureevidence.org>, Jack Walmisley <jack@futureevidence.org>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
destiny_sdk/__init__.py,sha256=gmmrceJX84T4msk_GSm_OjTQvCpHFZRjnlUK5_7IODE,356
|
|
2
2
|
destiny_sdk/auth.py,sha256=bY72ywZEcG_67YBd9PrwgWTXkCf58rhLvVEXrtXbWtA,6247
|
|
3
3
|
destiny_sdk/client.py,sha256=ADPJhVA0vGR-wSI7tRxyUKwgd7xSEVFLIY2pLB7d9sc,3788
|
|
4
|
-
destiny_sdk/core.py,sha256=
|
|
4
|
+
destiny_sdk/core.py,sha256=_FwDaczKTSaUSV_qfcnLhkBbZagh4ayFpN0qUwJ03-o,1448
|
|
5
5
|
destiny_sdk/enhancements.py,sha256=_S_anq194qdaEGklgycSG1qLEJeWzKe1u3oyXNxAg54,11800
|
|
6
6
|
destiny_sdk/identifiers.py,sha256=9CFEaPhZr2IHfL4RSAzOvidXhhzKLDPXiSKddBMWzwM,3606
|
|
7
7
|
destiny_sdk/imports.py,sha256=mfC1QXbAU27iD3hO9OFTRQes352F6DS1U4fSMw26-8w,8243
|
|
@@ -11,7 +11,7 @@ destiny_sdk/robots.py,sha256=CL8hRTyHhTp4PShLmCuX2Ck4UBScPkOF44ivT1XRbMs,12806
|
|
|
11
11
|
destiny_sdk/visibility.py,sha256=nDLqnWuSZSk0vG3ynzDpHAvaALsbk8cuEZujTsqf6no,684
|
|
12
12
|
destiny_sdk/parsers/__init__.py,sha256=d5gS--bXla_0I7e_9wTBnGWMXt2U8b-_ndeprTPe1hk,149
|
|
13
13
|
destiny_sdk/parsers/eppi_parser.py,sha256=aSTqmm8N2WK1gnkj38XvfWaEXsaf0y6je6h9qN0xvFA,5584
|
|
14
|
-
destiny_sdk-0.2.
|
|
15
|
-
destiny_sdk-0.2.
|
|
16
|
-
destiny_sdk-0.2.
|
|
17
|
-
destiny_sdk-0.2.
|
|
14
|
+
destiny_sdk-0.2.3.dist-info/METADATA,sha256=UV-AOwRoOoCJsHyL6kQgHb0qLQEepDFt0PYvKNfPVHo,2440
|
|
15
|
+
destiny_sdk-0.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
+
destiny_sdk-0.2.3.dist-info/licenses/LICENSE,sha256=6QURU4gvvTjVZ5rfp5amZ6FtFvcpPhAGUjxF5WSZAHI,9138
|
|
17
|
+
destiny_sdk-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|