casedev 0.3.0__py3-none-any.whl → 0.4.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.
- casedev/_client.py +275 -1
- casedev/_version.py +1 -1
- casedev/resources/__init__.py +98 -0
- casedev/resources/applications/__init__.py +33 -0
- casedev/resources/applications/applications.py +102 -0
- casedev/resources/applications/v1/__init__.py +61 -0
- casedev/resources/applications/v1/deployments.py +867 -0
- casedev/resources/applications/v1/projects.py +1377 -0
- casedev/resources/applications/v1/v1.py +166 -0
- casedev/resources/applications/v1/workflows.py +182 -0
- casedev/resources/compute/v1/__init__.py +28 -0
- casedev/resources/compute/v1/instance_types.py +145 -0
- casedev/resources/compute/v1/instances.py +448 -0
- casedev/resources/compute/v1/v1.py +64 -0
- casedev/resources/database/__init__.py +33 -0
- casedev/resources/database/database.py +102 -0
- casedev/resources/database/v1/__init__.py +33 -0
- casedev/resources/database/v1/projects.py +771 -0
- casedev/resources/database/v1/v1.py +175 -0
- casedev/resources/legal/__init__.py +33 -0
- casedev/resources/legal/legal.py +102 -0
- casedev/resources/legal/v1.py +924 -0
- casedev/resources/memory/__init__.py +33 -0
- casedev/resources/memory/memory.py +102 -0
- casedev/resources/memory/v1.py +1100 -0
- casedev/resources/privilege/__init__.py +33 -0
- casedev/resources/privilege/privilege.py +102 -0
- casedev/resources/privilege/v1.py +260 -0
- casedev/resources/superdoc/__init__.py +33 -0
- casedev/resources/superdoc/superdoc.py +102 -0
- casedev/resources/superdoc/v1.py +349 -0
- casedev/resources/translate/__init__.py +33 -0
- casedev/resources/translate/translate.py +102 -0
- casedev/resources/translate/v1.py +418 -0
- casedev/resources/vault/__init__.py +14 -0
- casedev/resources/vault/graphrag.py +91 -0
- casedev/resources/vault/multipart.py +549 -0
- casedev/resources/vault/objects.py +475 -5
- casedev/resources/vault/vault.py +262 -5
- casedev/types/__init__.py +4 -0
- casedev/types/applications/v1/__init__.py +20 -0
- casedev/types/applications/v1/deployment_cancel_params.py +14 -0
- casedev/types/applications/v1/deployment_create_params.py +20 -0
- casedev/types/applications/v1/deployment_get_logs_params.py +14 -0
- casedev/types/applications/v1/deployment_list_params.py +23 -0
- casedev/types/applications/v1/deployment_retrieve_params.py +17 -0
- casedev/types/applications/v1/deployment_stream_params.py +17 -0
- casedev/types/applications/v1/project_create_deployment_params.py +29 -0
- casedev/types/applications/v1/project_create_domain_params.py +17 -0
- casedev/types/applications/v1/project_create_env_params.py +27 -0
- casedev/types/applications/v1/project_create_params.py +53 -0
- casedev/types/applications/v1/project_delete_params.py +14 -0
- casedev/types/applications/v1/project_get_runtime_logs_params.py +12 -0
- casedev/types/applications/v1/project_list_deployments_params.py +18 -0
- casedev/types/applications/v1/project_list_env_params.py +12 -0
- casedev/types/applications/v1/project_list_response.py +45 -0
- casedev/types/applications/v1/workflow_get_status_params.py +14 -0
- casedev/types/compute/v1/__init__.py +6 -0
- casedev/types/compute/v1/instance_create_params.py +28 -0
- casedev/types/compute/v1/instance_create_response.py +35 -0
- casedev/types/compute/v1/instance_delete_response.py +23 -0
- casedev/types/compute/v1/instance_list_response.py +45 -0
- casedev/types/compute/v1/instance_retrieve_response.py +55 -0
- casedev/types/compute/v1/instance_type_list_response.py +46 -0
- casedev/types/database/__init__.py +5 -0
- casedev/types/database/v1/__init__.py +14 -0
- casedev/types/database/v1/project_create_branch_params.py +17 -0
- casedev/types/database/v1/project_create_branch_response.py +30 -0
- casedev/types/database/v1/project_create_params.py +27 -0
- casedev/types/database/v1/project_create_response.py +47 -0
- casedev/types/database/v1/project_delete_response.py +13 -0
- casedev/types/database/v1/project_get_connection_params.py +15 -0
- casedev/types/database/v1/project_get_connection_response.py +18 -0
- casedev/types/database/v1/project_list_branches_response.py +37 -0
- casedev/types/database/v1/project_list_response.py +64 -0
- casedev/types/database/v1/project_retrieve_response.py +100 -0
- casedev/types/database/v1_get_usage_response.py +116 -0
- casedev/types/legal/__init__.py +20 -0
- casedev/types/legal/v1_find_params.py +23 -0
- casedev/types/legal/v1_find_response.py +37 -0
- casedev/types/legal/v1_get_citations_from_url_params.py +12 -0
- casedev/types/legal/v1_get_citations_from_url_response.py +69 -0
- casedev/types/legal/v1_get_citations_params.py +16 -0
- casedev/types/legal/v1_get_citations_response.py +60 -0
- casedev/types/legal/v1_get_full_text_params.py +23 -0
- casedev/types/legal/v1_get_full_text_response.py +35 -0
- casedev/types/legal/v1_list_jurisdictions_params.py +12 -0
- casedev/types/legal/v1_list_jurisdictions_response.py +35 -0
- casedev/types/legal/v1_research_params.py +27 -0
- casedev/types/legal/v1_research_response.py +51 -0
- casedev/types/legal/v1_similar_params.py +25 -0
- casedev/types/legal/v1_similar_response.py +42 -0
- casedev/types/legal/v1_verify_params.py +16 -0
- casedev/types/legal/v1_verify_response.py +92 -0
- casedev/types/memory/__init__.py +14 -0
- casedev/types/memory/v1_create_params.py +69 -0
- casedev/types/memory/v1_create_response.py +23 -0
- casedev/types/memory/v1_delete_all_params.py +45 -0
- casedev/types/memory/v1_delete_all_response.py +12 -0
- casedev/types/memory/v1_delete_response.py +13 -0
- casedev/types/memory/v1_list_params.py +54 -0
- casedev/types/memory/v1_list_response.py +29 -0
- casedev/types/memory/v1_retrieve_response.py +23 -0
- casedev/types/memory/v1_search_params.py +54 -0
- casedev/types/memory/v1_search_response.py +61 -0
- casedev/types/privilege/__init__.py +6 -0
- casedev/types/privilege/v1_detect_params.py +34 -0
- casedev/types/privilege/v1_detect_response.py +41 -0
- casedev/types/superdoc/__init__.py +6 -0
- casedev/types/superdoc/v1_annotate_params.py +56 -0
- casedev/types/superdoc/v1_convert_params.py +23 -0
- casedev/types/translate/__init__.py +10 -0
- casedev/types/translate/v1_detect_params.py +18 -0
- casedev/types/translate/v1_detect_response.py +28 -0
- casedev/types/translate/v1_list_languages_params.py +18 -0
- casedev/types/translate/v1_list_languages_response.py +23 -0
- casedev/types/translate/v1_translate_params.py +30 -0
- casedev/types/translate/v1_translate_response.py +28 -0
- casedev/types/vault/__init__.py +14 -0
- casedev/types/vault/graphrag_process_object_response.py +45 -0
- casedev/types/vault/multipart_abort_params.py +15 -0
- casedev/types/vault/multipart_complete_params.py +26 -0
- casedev/types/vault/multipart_get_part_urls_params.py +24 -0
- casedev/types/vault/multipart_get_part_urls_response.py +19 -0
- casedev/types/vault/multipart_init_params.py +32 -0
- casedev/types/vault/multipart_init_response.py +23 -0
- casedev/types/vault/object_create_presigned_url_params.py +1 -1
- casedev/types/vault/object_delete_params.py +17 -0
- casedev/types/vault/object_delete_response.py +29 -0
- casedev/types/vault/object_get_ocr_words_params.py +28 -0
- casedev/types/vault/object_get_ocr_words_response.py +48 -0
- casedev/types/vault/object_get_summarize_job_response.py +40 -0
- casedev/types/vault/object_update_params.py +24 -0
- casedev/types/vault/object_update_response.py +39 -0
- casedev/types/vault_delete_params.py +17 -0
- casedev/types/vault_delete_response.py +30 -0
- casedev/types/vault_update_params.py +21 -0
- casedev/types/vault_update_response.py +60 -0
- casedev/types/vault_upload_params.py +1 -1
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/METADATA +1 -1
- casedev-0.4.0.dist-info/RECORD +275 -0
- casedev-0.3.0.dist-info/RECORD +0 -150
- /casedev/types/{webhooks → applications}/__init__.py +0 -0
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/WHEEL +0 -0
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from datetime import date
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ..._compat import cached_property
|
|
13
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ..._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ...types.legal import (
|
|
21
|
+
v1_find_params,
|
|
22
|
+
v1_verify_params,
|
|
23
|
+
v1_similar_params,
|
|
24
|
+
v1_research_params,
|
|
25
|
+
v1_get_citations_params,
|
|
26
|
+
v1_get_full_text_params,
|
|
27
|
+
v1_list_jurisdictions_params,
|
|
28
|
+
v1_get_citations_from_url_params,
|
|
29
|
+
)
|
|
30
|
+
from ..._base_client import make_request_options
|
|
31
|
+
from ...types.legal.v1_find_response import V1FindResponse
|
|
32
|
+
from ...types.legal.v1_verify_response import V1VerifyResponse
|
|
33
|
+
from ...types.legal.v1_similar_response import V1SimilarResponse
|
|
34
|
+
from ...types.legal.v1_research_response import V1ResearchResponse
|
|
35
|
+
from ...types.legal.v1_get_citations_response import V1GetCitationsResponse
|
|
36
|
+
from ...types.legal.v1_get_full_text_response import V1GetFullTextResponse
|
|
37
|
+
from ...types.legal.v1_list_jurisdictions_response import V1ListJurisdictionsResponse
|
|
38
|
+
from ...types.legal.v1_get_citations_from_url_response import V1GetCitationsFromURLResponse
|
|
39
|
+
|
|
40
|
+
__all__ = ["V1Resource", "AsyncV1Resource"]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class V1Resource(SyncAPIResource):
|
|
44
|
+
@cached_property
|
|
45
|
+
def with_raw_response(self) -> V1ResourceWithRawResponse:
|
|
46
|
+
"""
|
|
47
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
48
|
+
the raw response object instead of the parsed content.
|
|
49
|
+
|
|
50
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
51
|
+
"""
|
|
52
|
+
return V1ResourceWithRawResponse(self)
|
|
53
|
+
|
|
54
|
+
@cached_property
|
|
55
|
+
def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
|
|
56
|
+
"""
|
|
57
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
58
|
+
|
|
59
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
60
|
+
"""
|
|
61
|
+
return V1ResourceWithStreamingResponse(self)
|
|
62
|
+
|
|
63
|
+
def find(
|
|
64
|
+
self,
|
|
65
|
+
*,
|
|
66
|
+
query: str,
|
|
67
|
+
jurisdiction: str | Omit = omit,
|
|
68
|
+
num_results: int | Omit = omit,
|
|
69
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
70
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
71
|
+
extra_headers: Headers | None = None,
|
|
72
|
+
extra_query: Query | None = None,
|
|
73
|
+
extra_body: Body | None = None,
|
|
74
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
75
|
+
) -> V1FindResponse:
|
|
76
|
+
"""
|
|
77
|
+
Search for legal sources including cases, statutes, and regulations from
|
|
78
|
+
authoritative legal databases. Returns ranked candidates. Always verify with
|
|
79
|
+
legal.verify() before citing.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
query: Search query (e.g., "fair use copyright", "Miranda rights")
|
|
83
|
+
|
|
84
|
+
jurisdiction: Optional jurisdiction ID from resolveJurisdiction (e.g., "california",
|
|
85
|
+
"us-federal")
|
|
86
|
+
|
|
87
|
+
num_results: Number of results 1-25 (default: 10)
|
|
88
|
+
|
|
89
|
+
extra_headers: Send extra headers
|
|
90
|
+
|
|
91
|
+
extra_query: Add additional query parameters to the request
|
|
92
|
+
|
|
93
|
+
extra_body: Add additional JSON properties to the request
|
|
94
|
+
|
|
95
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
96
|
+
"""
|
|
97
|
+
return self._post(
|
|
98
|
+
"/legal/v1/find",
|
|
99
|
+
body=maybe_transform(
|
|
100
|
+
{
|
|
101
|
+
"query": query,
|
|
102
|
+
"jurisdiction": jurisdiction,
|
|
103
|
+
"num_results": num_results,
|
|
104
|
+
},
|
|
105
|
+
v1_find_params.V1FindParams,
|
|
106
|
+
),
|
|
107
|
+
options=make_request_options(
|
|
108
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
109
|
+
),
|
|
110
|
+
cast_to=V1FindResponse,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
def get_citations(
|
|
114
|
+
self,
|
|
115
|
+
*,
|
|
116
|
+
text: str,
|
|
117
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
118
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
119
|
+
extra_headers: Headers | None = None,
|
|
120
|
+
extra_query: Query | None = None,
|
|
121
|
+
extra_body: Body | None = None,
|
|
122
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
123
|
+
) -> V1GetCitationsResponse:
|
|
124
|
+
"""
|
|
125
|
+
Parses legal citations from text and returns structured Bluebook components
|
|
126
|
+
(case name, reporter, volume, page, year, court). Accepts either a single
|
|
127
|
+
citation or a full text block.
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
text: Text containing citations to extract. Can be a single citation (e.g., "531 U.S.
|
|
131
|
+
98") or a full document with multiple citations.
|
|
132
|
+
|
|
133
|
+
extra_headers: Send extra headers
|
|
134
|
+
|
|
135
|
+
extra_query: Add additional query parameters to the request
|
|
136
|
+
|
|
137
|
+
extra_body: Add additional JSON properties to the request
|
|
138
|
+
|
|
139
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
140
|
+
"""
|
|
141
|
+
return self._post(
|
|
142
|
+
"/legal/v1/citations",
|
|
143
|
+
body=maybe_transform({"text": text}, v1_get_citations_params.V1GetCitationsParams),
|
|
144
|
+
options=make_request_options(
|
|
145
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
146
|
+
),
|
|
147
|
+
cast_to=V1GetCitationsResponse,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
def get_citations_from_url(
|
|
151
|
+
self,
|
|
152
|
+
*,
|
|
153
|
+
url: str,
|
|
154
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
155
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
156
|
+
extra_headers: Headers | None = None,
|
|
157
|
+
extra_query: Query | None = None,
|
|
158
|
+
extra_body: Body | None = None,
|
|
159
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
160
|
+
) -> V1GetCitationsFromURLResponse:
|
|
161
|
+
"""Extract all legal citations and references from a document URL.
|
|
162
|
+
|
|
163
|
+
Returns
|
|
164
|
+
structured citation data including case citations, statute references, and
|
|
165
|
+
regulatory citations.
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
url: URL of the legal document to extract citations from
|
|
169
|
+
|
|
170
|
+
extra_headers: Send extra headers
|
|
171
|
+
|
|
172
|
+
extra_query: Add additional query parameters to the request
|
|
173
|
+
|
|
174
|
+
extra_body: Add additional JSON properties to the request
|
|
175
|
+
|
|
176
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
177
|
+
"""
|
|
178
|
+
return self._post(
|
|
179
|
+
"/legal/v1/citations-from-url",
|
|
180
|
+
body=maybe_transform({"url": url}, v1_get_citations_from_url_params.V1GetCitationsFromURLParams),
|
|
181
|
+
options=make_request_options(
|
|
182
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
183
|
+
),
|
|
184
|
+
cast_to=V1GetCitationsFromURLResponse,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
def get_full_text(
|
|
188
|
+
self,
|
|
189
|
+
*,
|
|
190
|
+
url: str,
|
|
191
|
+
highlight_query: str | Omit = omit,
|
|
192
|
+
max_characters: int | Omit = omit,
|
|
193
|
+
summary_query: str | Omit = omit,
|
|
194
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
195
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
196
|
+
extra_headers: Headers | None = None,
|
|
197
|
+
extra_query: Query | None = None,
|
|
198
|
+
extra_body: Body | None = None,
|
|
199
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
200
|
+
) -> V1GetFullTextResponse:
|
|
201
|
+
"""Retrieve the full text content of a legal document.
|
|
202
|
+
|
|
203
|
+
Use after verifying the
|
|
204
|
+
source with legal.verify(). Returns complete text with optional highlights and
|
|
205
|
+
AI summary.
|
|
206
|
+
|
|
207
|
+
Args:
|
|
208
|
+
url: URL of the verified legal document
|
|
209
|
+
|
|
210
|
+
highlight_query: Optional query to extract relevant highlights (e.g., "What is the holding?")
|
|
211
|
+
|
|
212
|
+
max_characters: Maximum characters to return (default: 10000, max: 50000)
|
|
213
|
+
|
|
214
|
+
summary_query: Optional query for generating a summary (e.g., "Summarize the key ruling")
|
|
215
|
+
|
|
216
|
+
extra_headers: Send extra headers
|
|
217
|
+
|
|
218
|
+
extra_query: Add additional query parameters to the request
|
|
219
|
+
|
|
220
|
+
extra_body: Add additional JSON properties to the request
|
|
221
|
+
|
|
222
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
223
|
+
"""
|
|
224
|
+
return self._post(
|
|
225
|
+
"/legal/v1/full-text",
|
|
226
|
+
body=maybe_transform(
|
|
227
|
+
{
|
|
228
|
+
"url": url,
|
|
229
|
+
"highlight_query": highlight_query,
|
|
230
|
+
"max_characters": max_characters,
|
|
231
|
+
"summary_query": summary_query,
|
|
232
|
+
},
|
|
233
|
+
v1_get_full_text_params.V1GetFullTextParams,
|
|
234
|
+
),
|
|
235
|
+
options=make_request_options(
|
|
236
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
237
|
+
),
|
|
238
|
+
cast_to=V1GetFullTextResponse,
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
def list_jurisdictions(
|
|
242
|
+
self,
|
|
243
|
+
*,
|
|
244
|
+
name: str,
|
|
245
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
246
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
247
|
+
extra_headers: Headers | None = None,
|
|
248
|
+
extra_query: Query | None = None,
|
|
249
|
+
extra_body: Body | None = None,
|
|
250
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
251
|
+
) -> V1ListJurisdictionsResponse:
|
|
252
|
+
"""Search for a jurisdiction by name.
|
|
253
|
+
|
|
254
|
+
Returns matching jurisdictions with their IDs
|
|
255
|
+
for use in legal.find() and other legal research endpoints.
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
name: Jurisdiction name (e.g., "California", "US Federal", "NY")
|
|
259
|
+
|
|
260
|
+
extra_headers: Send extra headers
|
|
261
|
+
|
|
262
|
+
extra_query: Add additional query parameters to the request
|
|
263
|
+
|
|
264
|
+
extra_body: Add additional JSON properties to the request
|
|
265
|
+
|
|
266
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
267
|
+
"""
|
|
268
|
+
return self._post(
|
|
269
|
+
"/legal/v1/jurisdictions",
|
|
270
|
+
body=maybe_transform({"name": name}, v1_list_jurisdictions_params.V1ListJurisdictionsParams),
|
|
271
|
+
options=make_request_options(
|
|
272
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
273
|
+
),
|
|
274
|
+
cast_to=V1ListJurisdictionsResponse,
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
def research(
|
|
278
|
+
self,
|
|
279
|
+
*,
|
|
280
|
+
query: str,
|
|
281
|
+
additional_queries: SequenceNotStr[str] | Omit = omit,
|
|
282
|
+
jurisdiction: str | Omit = omit,
|
|
283
|
+
num_results: int | Omit = omit,
|
|
284
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
285
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
286
|
+
extra_headers: Headers | None = None,
|
|
287
|
+
extra_query: Query | None = None,
|
|
288
|
+
extra_body: Body | None = None,
|
|
289
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
290
|
+
) -> V1ResearchResponse:
|
|
291
|
+
"""Perform comprehensive legal research with multiple query variations.
|
|
292
|
+
|
|
293
|
+
Uses
|
|
294
|
+
advanced deep search to find relevant sources across different phrasings of the
|
|
295
|
+
legal issue.
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
query: Primary search query
|
|
299
|
+
|
|
300
|
+
additional_queries: Additional query variations to search (e.g., different phrasings of the legal
|
|
301
|
+
issue)
|
|
302
|
+
|
|
303
|
+
jurisdiction: Optional jurisdiction ID from resolveJurisdiction
|
|
304
|
+
|
|
305
|
+
num_results: Number of results 1-25 (default: 10)
|
|
306
|
+
|
|
307
|
+
extra_headers: Send extra headers
|
|
308
|
+
|
|
309
|
+
extra_query: Add additional query parameters to the request
|
|
310
|
+
|
|
311
|
+
extra_body: Add additional JSON properties to the request
|
|
312
|
+
|
|
313
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
314
|
+
"""
|
|
315
|
+
return self._post(
|
|
316
|
+
"/legal/v1/research",
|
|
317
|
+
body=maybe_transform(
|
|
318
|
+
{
|
|
319
|
+
"query": query,
|
|
320
|
+
"additional_queries": additional_queries,
|
|
321
|
+
"jurisdiction": jurisdiction,
|
|
322
|
+
"num_results": num_results,
|
|
323
|
+
},
|
|
324
|
+
v1_research_params.V1ResearchParams,
|
|
325
|
+
),
|
|
326
|
+
options=make_request_options(
|
|
327
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
328
|
+
),
|
|
329
|
+
cast_to=V1ResearchResponse,
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
def similar(
|
|
333
|
+
self,
|
|
334
|
+
*,
|
|
335
|
+
url: str,
|
|
336
|
+
jurisdiction: str | Omit = omit,
|
|
337
|
+
num_results: int | Omit = omit,
|
|
338
|
+
start_published_date: Union[str, date] | Omit = omit,
|
|
339
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
340
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
341
|
+
extra_headers: Headers | None = None,
|
|
342
|
+
extra_query: Query | None = None,
|
|
343
|
+
extra_body: Body | None = None,
|
|
344
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
345
|
+
) -> V1SimilarResponse:
|
|
346
|
+
"""Find cases and documents similar to a given legal source.
|
|
347
|
+
|
|
348
|
+
Useful for finding
|
|
349
|
+
citing cases, related precedents, or similar statutes.
|
|
350
|
+
|
|
351
|
+
Args:
|
|
352
|
+
url: URL of a legal document to find similar sources for
|
|
353
|
+
|
|
354
|
+
jurisdiction: Optional jurisdiction ID to filter results
|
|
355
|
+
|
|
356
|
+
num_results: Number of results 1-25 (default: 10)
|
|
357
|
+
|
|
358
|
+
start_published_date: Optional ISO date to find only newer documents (e.g., "2020-01-01")
|
|
359
|
+
|
|
360
|
+
extra_headers: Send extra headers
|
|
361
|
+
|
|
362
|
+
extra_query: Add additional query parameters to the request
|
|
363
|
+
|
|
364
|
+
extra_body: Add additional JSON properties to the request
|
|
365
|
+
|
|
366
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
367
|
+
"""
|
|
368
|
+
return self._post(
|
|
369
|
+
"/legal/v1/similar",
|
|
370
|
+
body=maybe_transform(
|
|
371
|
+
{
|
|
372
|
+
"url": url,
|
|
373
|
+
"jurisdiction": jurisdiction,
|
|
374
|
+
"num_results": num_results,
|
|
375
|
+
"start_published_date": start_published_date,
|
|
376
|
+
},
|
|
377
|
+
v1_similar_params.V1SimilarParams,
|
|
378
|
+
),
|
|
379
|
+
options=make_request_options(
|
|
380
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
381
|
+
),
|
|
382
|
+
cast_to=V1SimilarResponse,
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
def verify(
|
|
386
|
+
self,
|
|
387
|
+
*,
|
|
388
|
+
text: str,
|
|
389
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
390
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
391
|
+
extra_headers: Headers | None = None,
|
|
392
|
+
extra_query: Query | None = None,
|
|
393
|
+
extra_body: Body | None = None,
|
|
394
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
395
|
+
) -> V1VerifyResponse:
|
|
396
|
+
"""
|
|
397
|
+
Validates legal citations against authoritative case law sources (CourtListener
|
|
398
|
+
database of ~10M cases). Returns verification status and case metadata for each
|
|
399
|
+
citation found in the input text. Accepts either a single citation or a full
|
|
400
|
+
text block containing multiple citations.
|
|
401
|
+
|
|
402
|
+
Args:
|
|
403
|
+
text: Text containing citations to verify. Can be a single citation (e.g., "531 U.S.
|
|
404
|
+
98") or a full document with multiple citations.
|
|
405
|
+
|
|
406
|
+
extra_headers: Send extra headers
|
|
407
|
+
|
|
408
|
+
extra_query: Add additional query parameters to the request
|
|
409
|
+
|
|
410
|
+
extra_body: Add additional JSON properties to the request
|
|
411
|
+
|
|
412
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
413
|
+
"""
|
|
414
|
+
return self._post(
|
|
415
|
+
"/legal/v1/verify",
|
|
416
|
+
body=maybe_transform({"text": text}, v1_verify_params.V1VerifyParams),
|
|
417
|
+
options=make_request_options(
|
|
418
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
419
|
+
),
|
|
420
|
+
cast_to=V1VerifyResponse,
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
class AsyncV1Resource(AsyncAPIResource):
|
|
425
|
+
@cached_property
|
|
426
|
+
def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
|
|
427
|
+
"""
|
|
428
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
429
|
+
the raw response object instead of the parsed content.
|
|
430
|
+
|
|
431
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
432
|
+
"""
|
|
433
|
+
return AsyncV1ResourceWithRawResponse(self)
|
|
434
|
+
|
|
435
|
+
@cached_property
|
|
436
|
+
def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
437
|
+
"""
|
|
438
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
439
|
+
|
|
440
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
441
|
+
"""
|
|
442
|
+
return AsyncV1ResourceWithStreamingResponse(self)
|
|
443
|
+
|
|
444
|
+
async def find(
|
|
445
|
+
self,
|
|
446
|
+
*,
|
|
447
|
+
query: str,
|
|
448
|
+
jurisdiction: str | Omit = omit,
|
|
449
|
+
num_results: int | Omit = omit,
|
|
450
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
451
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
452
|
+
extra_headers: Headers | None = None,
|
|
453
|
+
extra_query: Query | None = None,
|
|
454
|
+
extra_body: Body | None = None,
|
|
455
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
456
|
+
) -> V1FindResponse:
|
|
457
|
+
"""
|
|
458
|
+
Search for legal sources including cases, statutes, and regulations from
|
|
459
|
+
authoritative legal databases. Returns ranked candidates. Always verify with
|
|
460
|
+
legal.verify() before citing.
|
|
461
|
+
|
|
462
|
+
Args:
|
|
463
|
+
query: Search query (e.g., "fair use copyright", "Miranda rights")
|
|
464
|
+
|
|
465
|
+
jurisdiction: Optional jurisdiction ID from resolveJurisdiction (e.g., "california",
|
|
466
|
+
"us-federal")
|
|
467
|
+
|
|
468
|
+
num_results: Number of results 1-25 (default: 10)
|
|
469
|
+
|
|
470
|
+
extra_headers: Send extra headers
|
|
471
|
+
|
|
472
|
+
extra_query: Add additional query parameters to the request
|
|
473
|
+
|
|
474
|
+
extra_body: Add additional JSON properties to the request
|
|
475
|
+
|
|
476
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
477
|
+
"""
|
|
478
|
+
return await self._post(
|
|
479
|
+
"/legal/v1/find",
|
|
480
|
+
body=await async_maybe_transform(
|
|
481
|
+
{
|
|
482
|
+
"query": query,
|
|
483
|
+
"jurisdiction": jurisdiction,
|
|
484
|
+
"num_results": num_results,
|
|
485
|
+
},
|
|
486
|
+
v1_find_params.V1FindParams,
|
|
487
|
+
),
|
|
488
|
+
options=make_request_options(
|
|
489
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
490
|
+
),
|
|
491
|
+
cast_to=V1FindResponse,
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
async def get_citations(
|
|
495
|
+
self,
|
|
496
|
+
*,
|
|
497
|
+
text: str,
|
|
498
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
499
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
500
|
+
extra_headers: Headers | None = None,
|
|
501
|
+
extra_query: Query | None = None,
|
|
502
|
+
extra_body: Body | None = None,
|
|
503
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
504
|
+
) -> V1GetCitationsResponse:
|
|
505
|
+
"""
|
|
506
|
+
Parses legal citations from text and returns structured Bluebook components
|
|
507
|
+
(case name, reporter, volume, page, year, court). Accepts either a single
|
|
508
|
+
citation or a full text block.
|
|
509
|
+
|
|
510
|
+
Args:
|
|
511
|
+
text: Text containing citations to extract. Can be a single citation (e.g., "531 U.S.
|
|
512
|
+
98") or a full document with multiple citations.
|
|
513
|
+
|
|
514
|
+
extra_headers: Send extra headers
|
|
515
|
+
|
|
516
|
+
extra_query: Add additional query parameters to the request
|
|
517
|
+
|
|
518
|
+
extra_body: Add additional JSON properties to the request
|
|
519
|
+
|
|
520
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
521
|
+
"""
|
|
522
|
+
return await self._post(
|
|
523
|
+
"/legal/v1/citations",
|
|
524
|
+
body=await async_maybe_transform({"text": text}, v1_get_citations_params.V1GetCitationsParams),
|
|
525
|
+
options=make_request_options(
|
|
526
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
527
|
+
),
|
|
528
|
+
cast_to=V1GetCitationsResponse,
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
async def get_citations_from_url(
|
|
532
|
+
self,
|
|
533
|
+
*,
|
|
534
|
+
url: str,
|
|
535
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
536
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
537
|
+
extra_headers: Headers | None = None,
|
|
538
|
+
extra_query: Query | None = None,
|
|
539
|
+
extra_body: Body | None = None,
|
|
540
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
541
|
+
) -> V1GetCitationsFromURLResponse:
|
|
542
|
+
"""Extract all legal citations and references from a document URL.
|
|
543
|
+
|
|
544
|
+
Returns
|
|
545
|
+
structured citation data including case citations, statute references, and
|
|
546
|
+
regulatory citations.
|
|
547
|
+
|
|
548
|
+
Args:
|
|
549
|
+
url: URL of the legal document to extract citations from
|
|
550
|
+
|
|
551
|
+
extra_headers: Send extra headers
|
|
552
|
+
|
|
553
|
+
extra_query: Add additional query parameters to the request
|
|
554
|
+
|
|
555
|
+
extra_body: Add additional JSON properties to the request
|
|
556
|
+
|
|
557
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
558
|
+
"""
|
|
559
|
+
return await self._post(
|
|
560
|
+
"/legal/v1/citations-from-url",
|
|
561
|
+
body=await async_maybe_transform(
|
|
562
|
+
{"url": url}, v1_get_citations_from_url_params.V1GetCitationsFromURLParams
|
|
563
|
+
),
|
|
564
|
+
options=make_request_options(
|
|
565
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
566
|
+
),
|
|
567
|
+
cast_to=V1GetCitationsFromURLResponse,
|
|
568
|
+
)
|
|
569
|
+
|
|
570
|
+
async def get_full_text(
|
|
571
|
+
self,
|
|
572
|
+
*,
|
|
573
|
+
url: str,
|
|
574
|
+
highlight_query: str | Omit = omit,
|
|
575
|
+
max_characters: int | Omit = omit,
|
|
576
|
+
summary_query: str | Omit = omit,
|
|
577
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
578
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
579
|
+
extra_headers: Headers | None = None,
|
|
580
|
+
extra_query: Query | None = None,
|
|
581
|
+
extra_body: Body | None = None,
|
|
582
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
583
|
+
) -> V1GetFullTextResponse:
|
|
584
|
+
"""Retrieve the full text content of a legal document.
|
|
585
|
+
|
|
586
|
+
Use after verifying the
|
|
587
|
+
source with legal.verify(). Returns complete text with optional highlights and
|
|
588
|
+
AI summary.
|
|
589
|
+
|
|
590
|
+
Args:
|
|
591
|
+
url: URL of the verified legal document
|
|
592
|
+
|
|
593
|
+
highlight_query: Optional query to extract relevant highlights (e.g., "What is the holding?")
|
|
594
|
+
|
|
595
|
+
max_characters: Maximum characters to return (default: 10000, max: 50000)
|
|
596
|
+
|
|
597
|
+
summary_query: Optional query for generating a summary (e.g., "Summarize the key ruling")
|
|
598
|
+
|
|
599
|
+
extra_headers: Send extra headers
|
|
600
|
+
|
|
601
|
+
extra_query: Add additional query parameters to the request
|
|
602
|
+
|
|
603
|
+
extra_body: Add additional JSON properties to the request
|
|
604
|
+
|
|
605
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
606
|
+
"""
|
|
607
|
+
return await self._post(
|
|
608
|
+
"/legal/v1/full-text",
|
|
609
|
+
body=await async_maybe_transform(
|
|
610
|
+
{
|
|
611
|
+
"url": url,
|
|
612
|
+
"highlight_query": highlight_query,
|
|
613
|
+
"max_characters": max_characters,
|
|
614
|
+
"summary_query": summary_query,
|
|
615
|
+
},
|
|
616
|
+
v1_get_full_text_params.V1GetFullTextParams,
|
|
617
|
+
),
|
|
618
|
+
options=make_request_options(
|
|
619
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
620
|
+
),
|
|
621
|
+
cast_to=V1GetFullTextResponse,
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
async def list_jurisdictions(
|
|
625
|
+
self,
|
|
626
|
+
*,
|
|
627
|
+
name: str,
|
|
628
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
629
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
630
|
+
extra_headers: Headers | None = None,
|
|
631
|
+
extra_query: Query | None = None,
|
|
632
|
+
extra_body: Body | None = None,
|
|
633
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
634
|
+
) -> V1ListJurisdictionsResponse:
|
|
635
|
+
"""Search for a jurisdiction by name.
|
|
636
|
+
|
|
637
|
+
Returns matching jurisdictions with their IDs
|
|
638
|
+
for use in legal.find() and other legal research endpoints.
|
|
639
|
+
|
|
640
|
+
Args:
|
|
641
|
+
name: Jurisdiction name (e.g., "California", "US Federal", "NY")
|
|
642
|
+
|
|
643
|
+
extra_headers: Send extra headers
|
|
644
|
+
|
|
645
|
+
extra_query: Add additional query parameters to the request
|
|
646
|
+
|
|
647
|
+
extra_body: Add additional JSON properties to the request
|
|
648
|
+
|
|
649
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
650
|
+
"""
|
|
651
|
+
return await self._post(
|
|
652
|
+
"/legal/v1/jurisdictions",
|
|
653
|
+
body=await async_maybe_transform({"name": name}, v1_list_jurisdictions_params.V1ListJurisdictionsParams),
|
|
654
|
+
options=make_request_options(
|
|
655
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
656
|
+
),
|
|
657
|
+
cast_to=V1ListJurisdictionsResponse,
|
|
658
|
+
)
|
|
659
|
+
|
|
660
|
+
async def research(
|
|
661
|
+
self,
|
|
662
|
+
*,
|
|
663
|
+
query: str,
|
|
664
|
+
additional_queries: SequenceNotStr[str] | Omit = omit,
|
|
665
|
+
jurisdiction: str | Omit = omit,
|
|
666
|
+
num_results: int | Omit = omit,
|
|
667
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
668
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
669
|
+
extra_headers: Headers | None = None,
|
|
670
|
+
extra_query: Query | None = None,
|
|
671
|
+
extra_body: Body | None = None,
|
|
672
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
673
|
+
) -> V1ResearchResponse:
|
|
674
|
+
"""Perform comprehensive legal research with multiple query variations.
|
|
675
|
+
|
|
676
|
+
Uses
|
|
677
|
+
advanced deep search to find relevant sources across different phrasings of the
|
|
678
|
+
legal issue.
|
|
679
|
+
|
|
680
|
+
Args:
|
|
681
|
+
query: Primary search query
|
|
682
|
+
|
|
683
|
+
additional_queries: Additional query variations to search (e.g., different phrasings of the legal
|
|
684
|
+
issue)
|
|
685
|
+
|
|
686
|
+
jurisdiction: Optional jurisdiction ID from resolveJurisdiction
|
|
687
|
+
|
|
688
|
+
num_results: Number of results 1-25 (default: 10)
|
|
689
|
+
|
|
690
|
+
extra_headers: Send extra headers
|
|
691
|
+
|
|
692
|
+
extra_query: Add additional query parameters to the request
|
|
693
|
+
|
|
694
|
+
extra_body: Add additional JSON properties to the request
|
|
695
|
+
|
|
696
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
697
|
+
"""
|
|
698
|
+
return await self._post(
|
|
699
|
+
"/legal/v1/research",
|
|
700
|
+
body=await async_maybe_transform(
|
|
701
|
+
{
|
|
702
|
+
"query": query,
|
|
703
|
+
"additional_queries": additional_queries,
|
|
704
|
+
"jurisdiction": jurisdiction,
|
|
705
|
+
"num_results": num_results,
|
|
706
|
+
},
|
|
707
|
+
v1_research_params.V1ResearchParams,
|
|
708
|
+
),
|
|
709
|
+
options=make_request_options(
|
|
710
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
711
|
+
),
|
|
712
|
+
cast_to=V1ResearchResponse,
|
|
713
|
+
)
|
|
714
|
+
|
|
715
|
+
async def similar(
|
|
716
|
+
self,
|
|
717
|
+
*,
|
|
718
|
+
url: str,
|
|
719
|
+
jurisdiction: str | Omit = omit,
|
|
720
|
+
num_results: int | Omit = omit,
|
|
721
|
+
start_published_date: Union[str, date] | Omit = omit,
|
|
722
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
723
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
724
|
+
extra_headers: Headers | None = None,
|
|
725
|
+
extra_query: Query | None = None,
|
|
726
|
+
extra_body: Body | None = None,
|
|
727
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
728
|
+
) -> V1SimilarResponse:
|
|
729
|
+
"""Find cases and documents similar to a given legal source.
|
|
730
|
+
|
|
731
|
+
Useful for finding
|
|
732
|
+
citing cases, related precedents, or similar statutes.
|
|
733
|
+
|
|
734
|
+
Args:
|
|
735
|
+
url: URL of a legal document to find similar sources for
|
|
736
|
+
|
|
737
|
+
jurisdiction: Optional jurisdiction ID to filter results
|
|
738
|
+
|
|
739
|
+
num_results: Number of results 1-25 (default: 10)
|
|
740
|
+
|
|
741
|
+
start_published_date: Optional ISO date to find only newer documents (e.g., "2020-01-01")
|
|
742
|
+
|
|
743
|
+
extra_headers: Send extra headers
|
|
744
|
+
|
|
745
|
+
extra_query: Add additional query parameters to the request
|
|
746
|
+
|
|
747
|
+
extra_body: Add additional JSON properties to the request
|
|
748
|
+
|
|
749
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
750
|
+
"""
|
|
751
|
+
return await self._post(
|
|
752
|
+
"/legal/v1/similar",
|
|
753
|
+
body=await async_maybe_transform(
|
|
754
|
+
{
|
|
755
|
+
"url": url,
|
|
756
|
+
"jurisdiction": jurisdiction,
|
|
757
|
+
"num_results": num_results,
|
|
758
|
+
"start_published_date": start_published_date,
|
|
759
|
+
},
|
|
760
|
+
v1_similar_params.V1SimilarParams,
|
|
761
|
+
),
|
|
762
|
+
options=make_request_options(
|
|
763
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
764
|
+
),
|
|
765
|
+
cast_to=V1SimilarResponse,
|
|
766
|
+
)
|
|
767
|
+
|
|
768
|
+
async def verify(
|
|
769
|
+
self,
|
|
770
|
+
*,
|
|
771
|
+
text: str,
|
|
772
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
773
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
774
|
+
extra_headers: Headers | None = None,
|
|
775
|
+
extra_query: Query | None = None,
|
|
776
|
+
extra_body: Body | None = None,
|
|
777
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
778
|
+
) -> V1VerifyResponse:
|
|
779
|
+
"""
|
|
780
|
+
Validates legal citations against authoritative case law sources (CourtListener
|
|
781
|
+
database of ~10M cases). Returns verification status and case metadata for each
|
|
782
|
+
citation found in the input text. Accepts either a single citation or a full
|
|
783
|
+
text block containing multiple citations.
|
|
784
|
+
|
|
785
|
+
Args:
|
|
786
|
+
text: Text containing citations to verify. Can be a single citation (e.g., "531 U.S.
|
|
787
|
+
98") or a full document with multiple citations.
|
|
788
|
+
|
|
789
|
+
extra_headers: Send extra headers
|
|
790
|
+
|
|
791
|
+
extra_query: Add additional query parameters to the request
|
|
792
|
+
|
|
793
|
+
extra_body: Add additional JSON properties to the request
|
|
794
|
+
|
|
795
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
796
|
+
"""
|
|
797
|
+
return await self._post(
|
|
798
|
+
"/legal/v1/verify",
|
|
799
|
+
body=await async_maybe_transform({"text": text}, v1_verify_params.V1VerifyParams),
|
|
800
|
+
options=make_request_options(
|
|
801
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
802
|
+
),
|
|
803
|
+
cast_to=V1VerifyResponse,
|
|
804
|
+
)
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
class V1ResourceWithRawResponse:
|
|
808
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
809
|
+
self._v1 = v1
|
|
810
|
+
|
|
811
|
+
self.find = to_raw_response_wrapper(
|
|
812
|
+
v1.find,
|
|
813
|
+
)
|
|
814
|
+
self.get_citations = to_raw_response_wrapper(
|
|
815
|
+
v1.get_citations,
|
|
816
|
+
)
|
|
817
|
+
self.get_citations_from_url = to_raw_response_wrapper(
|
|
818
|
+
v1.get_citations_from_url,
|
|
819
|
+
)
|
|
820
|
+
self.get_full_text = to_raw_response_wrapper(
|
|
821
|
+
v1.get_full_text,
|
|
822
|
+
)
|
|
823
|
+
self.list_jurisdictions = to_raw_response_wrapper(
|
|
824
|
+
v1.list_jurisdictions,
|
|
825
|
+
)
|
|
826
|
+
self.research = to_raw_response_wrapper(
|
|
827
|
+
v1.research,
|
|
828
|
+
)
|
|
829
|
+
self.similar = to_raw_response_wrapper(
|
|
830
|
+
v1.similar,
|
|
831
|
+
)
|
|
832
|
+
self.verify = to_raw_response_wrapper(
|
|
833
|
+
v1.verify,
|
|
834
|
+
)
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
class AsyncV1ResourceWithRawResponse:
|
|
838
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
839
|
+
self._v1 = v1
|
|
840
|
+
|
|
841
|
+
self.find = async_to_raw_response_wrapper(
|
|
842
|
+
v1.find,
|
|
843
|
+
)
|
|
844
|
+
self.get_citations = async_to_raw_response_wrapper(
|
|
845
|
+
v1.get_citations,
|
|
846
|
+
)
|
|
847
|
+
self.get_citations_from_url = async_to_raw_response_wrapper(
|
|
848
|
+
v1.get_citations_from_url,
|
|
849
|
+
)
|
|
850
|
+
self.get_full_text = async_to_raw_response_wrapper(
|
|
851
|
+
v1.get_full_text,
|
|
852
|
+
)
|
|
853
|
+
self.list_jurisdictions = async_to_raw_response_wrapper(
|
|
854
|
+
v1.list_jurisdictions,
|
|
855
|
+
)
|
|
856
|
+
self.research = async_to_raw_response_wrapper(
|
|
857
|
+
v1.research,
|
|
858
|
+
)
|
|
859
|
+
self.similar = async_to_raw_response_wrapper(
|
|
860
|
+
v1.similar,
|
|
861
|
+
)
|
|
862
|
+
self.verify = async_to_raw_response_wrapper(
|
|
863
|
+
v1.verify,
|
|
864
|
+
)
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
class V1ResourceWithStreamingResponse:
|
|
868
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
869
|
+
self._v1 = v1
|
|
870
|
+
|
|
871
|
+
self.find = to_streamed_response_wrapper(
|
|
872
|
+
v1.find,
|
|
873
|
+
)
|
|
874
|
+
self.get_citations = to_streamed_response_wrapper(
|
|
875
|
+
v1.get_citations,
|
|
876
|
+
)
|
|
877
|
+
self.get_citations_from_url = to_streamed_response_wrapper(
|
|
878
|
+
v1.get_citations_from_url,
|
|
879
|
+
)
|
|
880
|
+
self.get_full_text = to_streamed_response_wrapper(
|
|
881
|
+
v1.get_full_text,
|
|
882
|
+
)
|
|
883
|
+
self.list_jurisdictions = to_streamed_response_wrapper(
|
|
884
|
+
v1.list_jurisdictions,
|
|
885
|
+
)
|
|
886
|
+
self.research = to_streamed_response_wrapper(
|
|
887
|
+
v1.research,
|
|
888
|
+
)
|
|
889
|
+
self.similar = to_streamed_response_wrapper(
|
|
890
|
+
v1.similar,
|
|
891
|
+
)
|
|
892
|
+
self.verify = to_streamed_response_wrapper(
|
|
893
|
+
v1.verify,
|
|
894
|
+
)
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
class AsyncV1ResourceWithStreamingResponse:
|
|
898
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
899
|
+
self._v1 = v1
|
|
900
|
+
|
|
901
|
+
self.find = async_to_streamed_response_wrapper(
|
|
902
|
+
v1.find,
|
|
903
|
+
)
|
|
904
|
+
self.get_citations = async_to_streamed_response_wrapper(
|
|
905
|
+
v1.get_citations,
|
|
906
|
+
)
|
|
907
|
+
self.get_citations_from_url = async_to_streamed_response_wrapper(
|
|
908
|
+
v1.get_citations_from_url,
|
|
909
|
+
)
|
|
910
|
+
self.get_full_text = async_to_streamed_response_wrapper(
|
|
911
|
+
v1.get_full_text,
|
|
912
|
+
)
|
|
913
|
+
self.list_jurisdictions = async_to_streamed_response_wrapper(
|
|
914
|
+
v1.list_jurisdictions,
|
|
915
|
+
)
|
|
916
|
+
self.research = async_to_streamed_response_wrapper(
|
|
917
|
+
v1.research,
|
|
918
|
+
)
|
|
919
|
+
self.similar = async_to_streamed_response_wrapper(
|
|
920
|
+
v1.similar,
|
|
921
|
+
)
|
|
922
|
+
self.verify = async_to_streamed_response_wrapper(
|
|
923
|
+
v1.verify,
|
|
924
|
+
)
|