ds-caselaw-marklogic-api-client 37.1.0__py3-none-any.whl → 37.3.0__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.
Potentially problematic release.
This version of ds-caselaw-marklogic-api-client might be problematic. Click here for more details.
- caselawclient/factories.py +20 -18
- caselawclient/search_parameters.py +2 -0
- {ds_caselaw_marklogic_api_client-37.1.0.dist-info → ds_caselaw_marklogic_api_client-37.3.0.dist-info}/METADATA +1 -1
- {ds_caselaw_marklogic_api_client-37.1.0.dist-info → ds_caselaw_marklogic_api_client-37.3.0.dist-info}/RECORD +6 -6
- {ds_caselaw_marklogic_api_client-37.1.0.dist-info → ds_caselaw_marklogic_api_client-37.3.0.dist-info}/LICENSE.md +0 -0
- {ds_caselaw_marklogic_api_client-37.1.0.dist-info → ds_caselaw_marklogic_api_client-37.3.0.dist-info}/WHEEL +0 -0
caselawclient/factories.py
CHANGED
|
@@ -11,6 +11,7 @@ from caselawclient.models.documents import Document
|
|
|
11
11
|
from caselawclient.models.documents.body import DocumentBody
|
|
12
12
|
from caselawclient.models.identifiers import Identifier
|
|
13
13
|
from caselawclient.models.identifiers.fclid import FindCaseLawIdentifier
|
|
14
|
+
from caselawclient.models.identifiers.neutral_citation import NeutralCitationNumber
|
|
14
15
|
from caselawclient.models.judgments import Judgment
|
|
15
16
|
from caselawclient.models.press_summaries import PressSummary
|
|
16
17
|
from caselawclient.responses.search_result import SearchResult, SearchResultMetadata
|
|
@@ -143,24 +144,6 @@ class SearchResultMetadataFactory(SimpleFactory):
|
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
|
|
146
|
-
class SearchResultFactory(SimpleFactory):
|
|
147
|
-
target_class = SearchResult
|
|
148
|
-
|
|
149
|
-
PARAMS_MAP = {
|
|
150
|
-
"uri": "d-a1b2c3",
|
|
151
|
-
"name": "Judgment v Judgement",
|
|
152
|
-
"neutral_citation": "[2025] UKSC 123",
|
|
153
|
-
"court": "Court of Testing",
|
|
154
|
-
"date": datetime.datetime(2023, 2, 3),
|
|
155
|
-
"transformation_date": datetime.datetime(2023, 2, 3, 12, 34).isoformat(),
|
|
156
|
-
"metadata": SearchResultMetadataFactory.build(),
|
|
157
|
-
"is_failure": False,
|
|
158
|
-
"matches": None,
|
|
159
|
-
"slug": "uksc/2025/1",
|
|
160
|
-
"content_hash": "ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73",
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
147
|
class IdentifierResolutionFactory:
|
|
165
148
|
@classmethod
|
|
166
149
|
def build(
|
|
@@ -189,3 +172,22 @@ class IdentifierResolutionsFactory:
|
|
|
189
172
|
if resolutions is None:
|
|
190
173
|
resolutions = [IdentifierResolutionFactory.build()]
|
|
191
174
|
return IdentifierResolutions(resolutions)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class SearchResultFactory(SimpleFactory):
|
|
178
|
+
target_class = SearchResult
|
|
179
|
+
|
|
180
|
+
PARAMS_MAP = {
|
|
181
|
+
"uri": "d-a1b2c3",
|
|
182
|
+
"name": "Judgment v Judgement",
|
|
183
|
+
"neutral_citation": "[2025] UKSC 123",
|
|
184
|
+
"court": "Court of Testing",
|
|
185
|
+
"date": datetime.datetime(2023, 2, 3),
|
|
186
|
+
"transformation_date": str(datetime.datetime(2023, 2, 3, 12, 34)),
|
|
187
|
+
"metadata": SearchResultMetadataFactory.build(),
|
|
188
|
+
"is_failure": False,
|
|
189
|
+
"matches": None,
|
|
190
|
+
"slug": "uksc/2025/1",
|
|
191
|
+
"content_hash": "ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73",
|
|
192
|
+
"identifiers": {"id-1": NeutralCitationNumber("[2025] UKSC 123", "id-1")},
|
|
193
|
+
}
|
|
@@ -23,6 +23,7 @@ class SearchParameters:
|
|
|
23
23
|
page_size: int = RESULTS_PER_PAGE
|
|
24
24
|
show_unpublished: bool = False
|
|
25
25
|
only_unpublished: bool = False
|
|
26
|
+
only_with_html_representation: bool = False
|
|
26
27
|
collections: Optional[List[str]] = None
|
|
27
28
|
|
|
28
29
|
def as_marklogic_payload(self) -> Dict[str, Any]:
|
|
@@ -44,6 +45,7 @@ class SearchParameters:
|
|
|
44
45
|
"to": str(self.date_to or ""),
|
|
45
46
|
"show_unpublished": str(self.show_unpublished).lower(),
|
|
46
47
|
"only_unpublished": str(self.only_unpublished).lower(),
|
|
48
|
+
"only_with_html_representation": str(self.only_with_html_representation).lower(),
|
|
47
49
|
"collections": self._marklogic_collections,
|
|
48
50
|
"quoted_phrases": self._quoted_phrases,
|
|
49
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ds-caselaw-marklogic-api-client
|
|
3
|
-
Version: 37.
|
|
3
|
+
Version: 37.3.0
|
|
4
4
|
Summary: An API client for interacting with the underlying data in Find Caselaw.
|
|
5
5
|
Home-page: https://github.com/nationalarchives/ds-caselaw-custom-api-client
|
|
6
6
|
Keywords: national archives,caselaw
|
|
@@ -4,7 +4,7 @@ caselawclient/client_helpers/__init__.py,sha256=eucyUXwUqI72TPw-C5zLcHlMu4GtFY50
|
|
|
4
4
|
caselawclient/client_helpers/search_helpers.py,sha256=R99HyRLeYHgsw2L3DOidEqlKLLvs6Tga5rKTuWQViig,1525
|
|
5
5
|
caselawclient/content_hash.py,sha256=0cPC4OoABq0SC2wYFX9-24DodNigeOqksDxgxQH_hUA,2221
|
|
6
6
|
caselawclient/errors.py,sha256=JC16fEGq_MRJX-_KFzfINCV2Cqx8o6OWOt3C16rQd84,3142
|
|
7
|
-
caselawclient/factories.py,sha256=
|
|
7
|
+
caselawclient/factories.py,sha256=XgrnG61hAJ-ty61DLv2qNEAo9ITuDZowZ4MRmPrf2Bg,7109
|
|
8
8
|
caselawclient/identifier_resolution.py,sha256=B5I1sD7o7YjzsXMECjbKjgiGLDda5bGhejsJ-lYpTIg,2429
|
|
9
9
|
caselawclient/models/__init__.py,sha256=kd23EUpvaC7aLHdgk8farqKAQEx3lf7RvNT2jEatvlg,68
|
|
10
10
|
caselawclient/models/documents/__init__.py,sha256=4o6-8Iy5ZA8KEaqOt8xkpbqc7vwOzm8IoHvI8897mPk,19460
|
|
@@ -32,7 +32,7 @@ caselawclient/responses/__init__.py,sha256=2-5NJn_PXPTje_W4dHeHYaNRN6vXK4UcB9eLL
|
|
|
32
32
|
caselawclient/responses/search_response.py,sha256=Z76Zj4VvM-EV_vdiehv2-Jfkr9HZD3SvCTlRrUB_cyE,1951
|
|
33
33
|
caselawclient/responses/search_result.py,sha256=sGVIJMLXuN2A2MFPPDoOkXu3SE4wO5IcelLZj4yfWuY,9385
|
|
34
34
|
caselawclient/responses/xsl/search_match.xsl,sha256=4Sv--MrwBd7J48E9aI7jlFSXGlNi4dBqgzJ3bdMJ_ZU,1018
|
|
35
|
-
caselawclient/search_parameters.py,sha256=
|
|
35
|
+
caselawclient/search_parameters.py,sha256=A-9icXdyFYLDACjUaRQF8mrnaVRlFJ9XCPtu5uZ-_Lo,3484
|
|
36
36
|
caselawclient/types.py,sha256=0PsEsQzJOInpuwZ-Ydw0UpGns6jbHzlJhc-Ms28sqCU,2064
|
|
37
37
|
caselawclient/xml_helpers.py,sha256=xCboRhhzezqh-VyoKBQwal5lwxv96vTMJyVFWJNN-ok,639
|
|
38
38
|
caselawclient/xquery/break_judgment_checkout.xqy,sha256=rISzoBKxQKrP5ZRdCSoRqOXW8T_NDBSZRFjOXo_H3ns,220
|
|
@@ -83,7 +83,7 @@ caselawclient/xquery/validate_document.xqy,sha256=PgaDcnqCRJPIVqfmWsNlXmCLNKd21q
|
|
|
83
83
|
caselawclient/xquery/xslt.xqy,sha256=w57wNijH3dkwHkpKeAxqjlghVflQwo8cq6jS_sm-erM,199
|
|
84
84
|
caselawclient/xquery/xslt_transform.xqy,sha256=cccaFiGkCcvSfDv007UriZ3I4ak2nTLP1trRZdbOoS8,2462
|
|
85
85
|
caselawclient/xquery_type_dicts.py,sha256=zuyDGTkcN6voOXCm3APXItZ-Ey6tZ2hdZummZWzjl50,6489
|
|
86
|
-
ds_caselaw_marklogic_api_client-37.
|
|
87
|
-
ds_caselaw_marklogic_api_client-37.
|
|
88
|
-
ds_caselaw_marklogic_api_client-37.
|
|
89
|
-
ds_caselaw_marklogic_api_client-37.
|
|
86
|
+
ds_caselaw_marklogic_api_client-37.3.0.dist-info/LICENSE.md,sha256=fGMzyyLuQW-IAXUeDSCrRdsYW536aEWThdbpCjo6ZKg,1108
|
|
87
|
+
ds_caselaw_marklogic_api_client-37.3.0.dist-info/METADATA,sha256=SBFGKzyXMVM2TbhCofHTIMGJ5O9MLDHjfh-3V4aupk4,4206
|
|
88
|
+
ds_caselaw_marklogic_api_client-37.3.0.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
|
89
|
+
ds_caselaw_marklogic_api_client-37.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|