Skip to content

Commit 971ed0c

Browse files
chore(internal): codegen related update (#493)
1 parent 45947f2 commit 971ed0c

30 files changed

+627
-4
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,17 @@ We take backwards-compatibility seriously and work hard to ensure you can rely o
416416

417417
We are keen for your feedback; please open an [issue](https://www.github.com/Finch-API/finch-api-python/issues) with questions, bugs, or suggestions.
418418

419+
### Determining the installed version
420+
421+
If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.
422+
423+
You can determine the version that is being used at runtime with:
424+
425+
```py
426+
import finch
427+
print(finch.__version__)
428+
```
429+
419430
## Requirements
420431

421432
Python 3.7 or higher.

pyproject.toml

-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ dependencies = [
1515
"distro>=1.7.0, <2",
1616
"sniffio",
1717
"cached-property; python_version < '3.8'",
18-
1918
]
2019
requires-python = ">= 3.7"
2120
classifiers = [
@@ -36,8 +35,6 @@ classifiers = [
3635
"License :: OSI Approved :: Apache Software License"
3736
]
3837

39-
40-
4138
[project.urls]
4239
Homepage = "https://github.com/Finch-API/finch-api-python"
4340
Repository = "https://github.com/Finch-API/finch-api-python"
@@ -59,7 +56,6 @@ dev-dependencies = [
5956
"dirty-equals>=0.6.0",
6057
"importlib-metadata>=6.7.0",
6158
"rich>=13.7.1",
62-
6359
]
6460

6561
[tool.rye.scripts]

src/finch/resources/access_tokens.py

+22
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@
2020
class AccessTokens(SyncAPIResource):
2121
@cached_property
2222
def with_raw_response(self) -> AccessTokensWithRawResponse:
23+
"""
24+
This property can be used as a prefix for any HTTP method call to return the
25+
the raw response object instead of the parsed content.
26+
27+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
28+
"""
2329
return AccessTokensWithRawResponse(self)
2430

2531
@cached_property
2632
def with_streaming_response(self) -> AccessTokensWithStreamingResponse:
33+
"""
34+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
35+
36+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
37+
"""
2738
return AccessTokensWithStreamingResponse(self)
2839

2940
def create(
@@ -87,10 +98,21 @@ def create(
8798
class AsyncAccessTokens(AsyncAPIResource):
8899
@cached_property
89100
def with_raw_response(self) -> AsyncAccessTokensWithRawResponse:
101+
"""
102+
This property can be used as a prefix for any HTTP method call to return the
103+
the raw response object instead of the parsed content.
104+
105+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
106+
"""
90107
return AsyncAccessTokensWithRawResponse(self)
91108

92109
@cached_property
93110
def with_streaming_response(self) -> AsyncAccessTokensWithStreamingResponse:
111+
"""
112+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
113+
114+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
115+
"""
94116
return AsyncAccessTokensWithStreamingResponse(self)
95117

96118
async def create(

src/finch/resources/account.py

+22
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,21 @@
1919
class Account(SyncAPIResource):
2020
@cached_property
2121
def with_raw_response(self) -> AccountWithRawResponse:
22+
"""
23+
This property can be used as a prefix for any HTTP method call to return the
24+
the raw response object instead of the parsed content.
25+
26+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
27+
"""
2228
return AccountWithRawResponse(self)
2329

2430
@cached_property
2531
def with_streaming_response(self) -> AccountWithStreamingResponse:
32+
"""
33+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
34+
35+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
36+
"""
2637
return AccountWithStreamingResponse(self)
2738

2839
def disconnect(
@@ -67,10 +78,21 @@ def introspect(
6778
class AsyncAccount(AsyncAPIResource):
6879
@cached_property
6980
def with_raw_response(self) -> AsyncAccountWithRawResponse:
81+
"""
82+
This property can be used as a prefix for any HTTP method call to return the
83+
the raw response object instead of the parsed content.
84+
85+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
86+
"""
7087
return AsyncAccountWithRawResponse(self)
7188

7289
@cached_property
7390
def with_streaming_response(self) -> AsyncAccountWithStreamingResponse:
91+
"""
92+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
93+
94+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
95+
"""
7496
return AsyncAccountWithStreamingResponse(self)
7597

7698
async def disconnect(

src/finch/resources/hris/benefits/benefits.py

+22
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,21 @@ def individuals(self) -> Individuals:
4343

4444
@cached_property
4545
def with_raw_response(self) -> BenefitsWithRawResponse:
46+
"""
47+
This property can be used as a prefix for any HTTP method call to return the
48+
the raw response object instead of the parsed content.
49+
50+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
51+
"""
4652
return BenefitsWithRawResponse(self)
4753

4854
@cached_property
4955
def with_streaming_response(self) -> BenefitsWithStreamingResponse:
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/Finch-API/finch-api-python#with_streaming_response
60+
"""
5061
return BenefitsWithStreamingResponse(self)
5162

5263
def create(
@@ -216,10 +227,21 @@ def individuals(self) -> AsyncIndividuals:
216227

217228
@cached_property
218229
def with_raw_response(self) -> AsyncBenefitsWithRawResponse:
230+
"""
231+
This property can be used as a prefix for any HTTP method call to return the
232+
the raw response object instead of the parsed content.
233+
234+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
235+
"""
219236
return AsyncBenefitsWithRawResponse(self)
220237

221238
@cached_property
222239
def with_streaming_response(self) -> AsyncBenefitsWithStreamingResponse:
240+
"""
241+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
242+
243+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
244+
"""
223245
return AsyncBenefitsWithStreamingResponse(self)
224246

225247
async def create(

src/finch/resources/hris/benefits/individuals.py

+22
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,21 @@
3030
class Individuals(SyncAPIResource):
3131
@cached_property
3232
def with_raw_response(self) -> IndividualsWithRawResponse:
33+
"""
34+
This property can be used as a prefix for any HTTP method call to return the
35+
the raw response object instead of the parsed content.
36+
37+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
38+
"""
3339
return IndividualsWithRawResponse(self)
3440

3541
@cached_property
3642
def with_streaming_response(self) -> IndividualsWithStreamingResponse:
43+
"""
44+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
45+
46+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
47+
"""
3748
return IndividualsWithStreamingResponse(self)
3849

3950
def enroll_many(
@@ -202,10 +213,21 @@ def unenroll_many(
202213
class AsyncIndividuals(AsyncAPIResource):
203214
@cached_property
204215
def with_raw_response(self) -> AsyncIndividualsWithRawResponse:
216+
"""
217+
This property can be used as a prefix for any HTTP method call to return the
218+
the raw response object instead of the parsed content.
219+
220+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
221+
"""
205222
return AsyncIndividualsWithRawResponse(self)
206223

207224
@cached_property
208225
def with_streaming_response(self) -> AsyncIndividualsWithStreamingResponse:
226+
"""
227+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
228+
229+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
230+
"""
209231
return AsyncIndividualsWithStreamingResponse(self)
210232

211233
def enroll_many(

src/finch/resources/hris/company.py

+22
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@
1818
class CompanyResource(SyncAPIResource):
1919
@cached_property
2020
def with_raw_response(self) -> CompanyResourceWithRawResponse:
21+
"""
22+
This property can be used as a prefix for any HTTP method call to return the
23+
the raw response object instead of the parsed content.
24+
25+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
26+
"""
2127
return CompanyResourceWithRawResponse(self)
2228

2329
@cached_property
2430
def with_streaming_response(self) -> CompanyResourceWithStreamingResponse:
31+
"""
32+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
33+
34+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
35+
"""
2536
return CompanyResourceWithStreamingResponse(self)
2637

2738
def retrieve(
@@ -47,10 +58,21 @@ def retrieve(
4758
class AsyncCompanyResource(AsyncAPIResource):
4859
@cached_property
4960
def with_raw_response(self) -> AsyncCompanyResourceWithRawResponse:
61+
"""
62+
This property can be used as a prefix for any HTTP method call to return the
63+
the raw response object instead of the parsed content.
64+
65+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
66+
"""
5067
return AsyncCompanyResourceWithRawResponse(self)
5168

5269
@cached_property
5370
def with_streaming_response(self) -> AsyncCompanyResourceWithStreamingResponse:
71+
"""
72+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
73+
74+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
75+
"""
5476
return AsyncCompanyResourceWithStreamingResponse(self)
5577

5678
async def retrieve(

src/finch/resources/hris/directory.py

+22
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,21 @@
2323
class Directory(SyncAPIResource):
2424
@cached_property
2525
def with_raw_response(self) -> DirectoryWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return the
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
31+
"""
2632
return DirectoryWithRawResponse(self)
2733

2834
@cached_property
2935
def with_streaming_response(self) -> DirectoryWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
40+
"""
3041
return DirectoryWithStreamingResponse(self)
3142

3243
def list(
@@ -118,10 +129,21 @@ def list_individuals(
118129
class AsyncDirectory(AsyncAPIResource):
119130
@cached_property
120131
def with_raw_response(self) -> AsyncDirectoryWithRawResponse:
132+
"""
133+
This property can be used as a prefix for any HTTP method call to return the
134+
the raw response object instead of the parsed content.
135+
136+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
137+
"""
121138
return AsyncDirectoryWithRawResponse(self)
122139

123140
@cached_property
124141
def with_streaming_response(self) -> AsyncDirectoryWithStreamingResponse:
142+
"""
143+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
144+
145+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
146+
"""
125147
return AsyncDirectoryWithStreamingResponse(self)
126148

127149
def list(

src/finch/resources/hris/employments.py

+22
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,21 @@
2323
class Employments(SyncAPIResource):
2424
@cached_property
2525
def with_raw_response(self) -> EmploymentsWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return the
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
31+
"""
2632
return EmploymentsWithRawResponse(self)
2733

2834
@cached_property
2935
def with_streaming_response(self) -> EmploymentsWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
40+
"""
3041
return EmploymentsWithStreamingResponse(self)
3142

3243
def retrieve_many(
@@ -69,10 +80,21 @@ def retrieve_many(
6980
class AsyncEmployments(AsyncAPIResource):
7081
@cached_property
7182
def with_raw_response(self) -> AsyncEmploymentsWithRawResponse:
83+
"""
84+
This property can be used as a prefix for any HTTP method call to return the
85+
the raw response object instead of the parsed content.
86+
87+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
88+
"""
7289
return AsyncEmploymentsWithRawResponse(self)
7390

7491
@cached_property
7592
def with_streaming_response(self) -> AsyncEmploymentsWithStreamingResponse:
93+
"""
94+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
95+
96+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
97+
"""
7698
return AsyncEmploymentsWithStreamingResponse(self)
7799

78100
def retrieve_many(

src/finch/resources/hris/hris.py

+22
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,21 @@ def benefits(self) -> Benefits:
9696

9797
@cached_property
9898
def with_raw_response(self) -> HRISWithRawResponse:
99+
"""
100+
This property can be used as a prefix for any HTTP method call to return the
101+
the raw response object instead of the parsed content.
102+
103+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
104+
"""
99105
return HRISWithRawResponse(self)
100106

101107
@cached_property
102108
def with_streaming_response(self) -> HRISWithStreamingResponse:
109+
"""
110+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
111+
112+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
113+
"""
103114
return HRISWithStreamingResponse(self)
104115

105116

@@ -134,10 +145,21 @@ def benefits(self) -> AsyncBenefits:
134145

135146
@cached_property
136147
def with_raw_response(self) -> AsyncHRISWithRawResponse:
148+
"""
149+
This property can be used as a prefix for any HTTP method call to return the
150+
the raw response object instead of the parsed content.
151+
152+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
153+
"""
137154
return AsyncHRISWithRawResponse(self)
138155

139156
@cached_property
140157
def with_streaming_response(self) -> AsyncHRISWithStreamingResponse:
158+
"""
159+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
160+
161+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
162+
"""
141163
return AsyncHRISWithStreamingResponse(self)
142164

143165

0 commit comments

Comments
 (0)