permitstack 1.1.0__tar.gz → 1.1.3__tar.gz
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.
- {permitstack-1.1.0 → permitstack-1.1.3}/PKG-INFO +8 -3
- {permitstack-1.1.0 → permitstack-1.1.3}/README.md +7 -2
- {permitstack-1.1.0 → permitstack-1.1.3}/pyproject.toml +1 -1
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/_version.py +3 -3
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/contractors.py +14 -2
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/health.py +2 -2
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/__init__.py +70 -0
- permitstack-1.1.3/src/permitstack/models/battery_retrofit_candidatesop.py +115 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/contractorprofile.py +11 -1
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/contractorsummary.py +38 -3
- permitstack-1.1.3/src/permitstack/models/coverageconfidence.py +78 -0
- permitstack-1.1.0/src/permitstack/models/search_permitsop.py → permitstack-1.1.3/src/permitstack/models/export_permitsop.py +76 -84
- permitstack-1.1.3/src/permitstack/models/get_property_by_parcelop.py +71 -0
- permitstack-1.1.3/src/permitstack/models/get_property_historyop.py +87 -0
- permitstack-1.1.3/src/permitstack/models/list_permit_eventsop.py +135 -0
- permitstack-1.1.3/src/permitstack/models/orphan_recoveryop.py +97 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/permitdetail.py +11 -4
- permitstack-1.1.3/src/permitstack/models/permiteventout.py +106 -0
- permitstack-1.1.0/src/permitstack/models/permitsearchresponse.py → permitstack-1.1.3/src/permitstack/models/permiteventsresponse.py +5 -5
- permitstack-1.1.3/src/permitstack/models/permitsearchresponse.py +44 -0
- permitstack-1.1.3/src/permitstack/models/propertyhistoryresponse.py +77 -0
- permitstack-1.1.3/src/permitstack/models/propertyquery.py +57 -0
- permitstack-1.1.3/src/permitstack/models/propertysignals.py +138 -0
- permitstack-1.1.3/src/permitstack/models/propertysummary.py +97 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/search_contractorsop.py +30 -2
- permitstack-1.1.3/src/permitstack/models/search_permitsop.py +375 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/permits.py +979 -3
- permitstack-1.1.3/src/permitstack/property_history.py +481 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/sdk.py +1 -1
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/types/base64fileinput.py +4 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/eventstreaming.py +116 -99
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/forms.py +5 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/retries.py +90 -5
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/serializers.py +84 -3
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/webhooks.py +2 -2
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack.egg-info/PKG-INFO +8 -3
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack.egg-info/SOURCES.txt +11 -0
- permitstack-1.1.0/src/permitstack/models/export_permitsop.py +0 -187
- permitstack-1.1.0/src/permitstack/models/get_property_historyop.py +0 -18
- permitstack-1.1.0/src/permitstack/property_history.py +0 -207
- {permitstack-1.1.0 → permitstack-1.1.3}/setup.cfg +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/__init__.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/_hooks/__init__.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/_hooks/sdkhooks.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/_hooks/types.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/basesdk.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/errors/__init__.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/errors/httpvalidationerror.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/errors/no_response_error.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/errors/permitstackdefaulterror.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/errors/permitstackerror.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/errors/responsevalidationerror.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/httpclient.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/contractorsearchresponse.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/delete_webhookop.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/get_contractor_permitsop.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/get_contractorop.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/get_permitop.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/get_permits_by_addressop.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/get_webhook_secretop.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/permitenrichment.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/permitstatus.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/permitsummary.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/propertytype.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/security.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/test_webhookop.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/validationerror.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/models/webhookcreate.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/py.typed +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/sdkconfiguration.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/types/__init__.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/types/basemodel.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/__init__.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/annotations.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/datetimes.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/dynamic_imports.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/enums.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/headers.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/logger.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/metadata.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/queryparams.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/requestbodies.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/security.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/unmarshal_json_response.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/url.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack/utils/values.py +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack.egg-info/dependency_links.txt +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack.egg-info/requires.txt +0 -0
- {permitstack-1.1.0 → permitstack-1.1.3}/src/permitstack.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: permitstack
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Official Python SDK for the PermitStack building permit data API.
|
|
5
5
|
Author: PermitStack
|
|
6
6
|
License: Apache-2.0
|
|
@@ -25,7 +25,7 @@ Developer-friendly & type-safe Python SDK specifically catered to leverage *perm
|
|
|
25
25
|
PermitStack:
|
|
26
26
|
## PermitStack Building Permit API
|
|
27
27
|
|
|
28
|
-
Access
|
|
28
|
+
Access 62M+ building permits across 610 active U.S. jurisdictions (plus 62 historical archives), updated daily from official open data portals.
|
|
29
29
|
|
|
30
30
|
### Getting started
|
|
31
31
|
1. Sign up at [permit-stack.com](https://permit-stack.com/#pricing) for a free API key (100 req/day)
|
|
@@ -244,13 +244,18 @@ with Permitstack(
|
|
|
244
244
|
|
|
245
245
|
* [search_permits](docs/sdks/permits/README.md#search_permits) - Search Permits
|
|
246
246
|
* [export_permits](docs/sdks/permits/README.md#export_permits) - Export Permits
|
|
247
|
+
* [list_permit_events](docs/sdks/permits/README.md#list_permit_events) - List Permit Events
|
|
247
248
|
* [get_permit](docs/sdks/permits/README.md#get_permit) - Get Permit
|
|
248
249
|
* [get_permits_by_address](docs/sdks/permits/README.md#get_permits_by_address) - Get Permits By Address
|
|
249
250
|
* [get_coverage_stats](docs/sdks/permits/README.md#get_coverage_stats) - Get Coverage Stats
|
|
251
|
+
* [list_plays](docs/sdks/permits/README.md#list_plays) - List Plays
|
|
252
|
+
* [battery_retrofit_candidates](docs/sdks/permits/README.md#battery_retrofit_candidates) - Battery Retrofit Candidates
|
|
253
|
+
* [orphan_recovery](docs/sdks/permits/README.md#orphan_recovery) - Orphan Recovery
|
|
250
254
|
|
|
251
255
|
### [PropertyHistory](docs/sdks/propertyhistory/README.md)
|
|
252
256
|
|
|
253
257
|
* [get_property_history](docs/sdks/propertyhistory/README.md#get_property_history) - Get Property History
|
|
258
|
+
* [get_property_by_parcel](docs/sdks/propertyhistory/README.md#get_property_by_parcel) - Get Property By Parcel
|
|
254
259
|
|
|
255
260
|
### [Webhooks](docs/sdks/webhooks/README.md)
|
|
256
261
|
|
|
@@ -367,7 +372,7 @@ with Permitstack(
|
|
|
367
372
|
|
|
368
373
|
|
|
369
374
|
**Inherit from [`PermitstackError`](./src/permitstack/errors/permitstackerror.py)**:
|
|
370
|
-
* [`HTTPValidationError`](./src/permitstack/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to
|
|
375
|
+
* [`HTTPValidationError`](./src/permitstack/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 16 of 21 methods.*
|
|
371
376
|
* [`ResponseValidationError`](./src/permitstack/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
372
377
|
|
|
373
378
|
</details>
|
|
@@ -13,7 +13,7 @@ Developer-friendly & type-safe Python SDK specifically catered to leverage *perm
|
|
|
13
13
|
PermitStack:
|
|
14
14
|
## PermitStack Building Permit API
|
|
15
15
|
|
|
16
|
-
Access
|
|
16
|
+
Access 62M+ building permits across 610 active U.S. jurisdictions (plus 62 historical archives), updated daily from official open data portals.
|
|
17
17
|
|
|
18
18
|
### Getting started
|
|
19
19
|
1. Sign up at [permit-stack.com](https://permit-stack.com/#pricing) for a free API key (100 req/day)
|
|
@@ -232,13 +232,18 @@ with Permitstack(
|
|
|
232
232
|
|
|
233
233
|
* [search_permits](docs/sdks/permits/README.md#search_permits) - Search Permits
|
|
234
234
|
* [export_permits](docs/sdks/permits/README.md#export_permits) - Export Permits
|
|
235
|
+
* [list_permit_events](docs/sdks/permits/README.md#list_permit_events) - List Permit Events
|
|
235
236
|
* [get_permit](docs/sdks/permits/README.md#get_permit) - Get Permit
|
|
236
237
|
* [get_permits_by_address](docs/sdks/permits/README.md#get_permits_by_address) - Get Permits By Address
|
|
237
238
|
* [get_coverage_stats](docs/sdks/permits/README.md#get_coverage_stats) - Get Coverage Stats
|
|
239
|
+
* [list_plays](docs/sdks/permits/README.md#list_plays) - List Plays
|
|
240
|
+
* [battery_retrofit_candidates](docs/sdks/permits/README.md#battery_retrofit_candidates) - Battery Retrofit Candidates
|
|
241
|
+
* [orphan_recovery](docs/sdks/permits/README.md#orphan_recovery) - Orphan Recovery
|
|
238
242
|
|
|
239
243
|
### [PropertyHistory](docs/sdks/propertyhistory/README.md)
|
|
240
244
|
|
|
241
245
|
* [get_property_history](docs/sdks/propertyhistory/README.md#get_property_history) - Get Property History
|
|
246
|
+
* [get_property_by_parcel](docs/sdks/propertyhistory/README.md#get_property_by_parcel) - Get Property By Parcel
|
|
242
247
|
|
|
243
248
|
### [Webhooks](docs/sdks/webhooks/README.md)
|
|
244
249
|
|
|
@@ -355,7 +360,7 @@ with Permitstack(
|
|
|
355
360
|
|
|
356
361
|
|
|
357
362
|
**Inherit from [`PermitstackError`](./src/permitstack/errors/permitstackerror.py)**:
|
|
358
|
-
* [`HTTPValidationError`](./src/permitstack/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to
|
|
363
|
+
* [`HTTPValidationError`](./src/permitstack/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 16 of 21 methods.*
|
|
359
364
|
* [`ResponseValidationError`](./src/permitstack/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
360
365
|
|
|
361
366
|
</details>
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "permitstack"
|
|
6
|
-
__version__: str = "1.1.
|
|
6
|
+
__version__: str = "1.1.1"
|
|
7
7
|
__openapi_doc_version__: str = "1.0.0"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 1.1.
|
|
8
|
+
__gen_version__: str = "2.911.0"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 1.1.1 2.911.0 1.0.0 permitstack"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -20,6 +20,8 @@ class Contractors(BaseSDK):
|
|
|
20
20
|
city: OptionalNullable[str] = UNSET,
|
|
21
21
|
specialty: OptionalNullable[str] = UNSET,
|
|
22
22
|
min_permits: OptionalNullable[int] = UNSET,
|
|
23
|
+
min_score: OptionalNullable[int] = UNSET,
|
|
24
|
+
sort: Optional[str] = "score",
|
|
23
25
|
page: Optional[int] = 1,
|
|
24
26
|
per_page: Optional[int] = 25,
|
|
25
27
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -29,13 +31,15 @@ class Contractors(BaseSDK):
|
|
|
29
31
|
) -> models.ContractorSearchResponse:
|
|
30
32
|
r"""Search Contractors
|
|
31
33
|
|
|
32
|
-
Search contractors by name, location, or specialty.
|
|
34
|
+
Search contractors by name, location, or specialty, ranked by activity score.
|
|
33
35
|
|
|
34
36
|
:param name: Contractor name (partial match)
|
|
35
37
|
:param state: 2-letter state code
|
|
36
38
|
:param city: City name
|
|
37
39
|
:param specialty: Specialty tag (e.g. solar, roofing, hvac)
|
|
38
40
|
:param min_permits: Minimum total permits
|
|
41
|
+
:param min_score: Minimum contractor activity score (0-100)
|
|
42
|
+
:param sort: Sort order: 'score' (default), 'permits', or 'recent'
|
|
39
43
|
:param page:
|
|
40
44
|
:param per_page:
|
|
41
45
|
:param retries: Override the default retry configuration for this method
|
|
@@ -59,6 +63,8 @@ class Contractors(BaseSDK):
|
|
|
59
63
|
city=city,
|
|
60
64
|
specialty=specialty,
|
|
61
65
|
min_permits=min_permits,
|
|
66
|
+
min_score=min_score,
|
|
67
|
+
sort=sort,
|
|
62
68
|
page=page,
|
|
63
69
|
per_page=per_page,
|
|
64
70
|
)
|
|
@@ -132,6 +138,8 @@ class Contractors(BaseSDK):
|
|
|
132
138
|
city: OptionalNullable[str] = UNSET,
|
|
133
139
|
specialty: OptionalNullable[str] = UNSET,
|
|
134
140
|
min_permits: OptionalNullable[int] = UNSET,
|
|
141
|
+
min_score: OptionalNullable[int] = UNSET,
|
|
142
|
+
sort: Optional[str] = "score",
|
|
135
143
|
page: Optional[int] = 1,
|
|
136
144
|
per_page: Optional[int] = 25,
|
|
137
145
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -141,13 +149,15 @@ class Contractors(BaseSDK):
|
|
|
141
149
|
) -> models.ContractorSearchResponse:
|
|
142
150
|
r"""Search Contractors
|
|
143
151
|
|
|
144
|
-
Search contractors by name, location, or specialty.
|
|
152
|
+
Search contractors by name, location, or specialty, ranked by activity score.
|
|
145
153
|
|
|
146
154
|
:param name: Contractor name (partial match)
|
|
147
155
|
:param state: 2-letter state code
|
|
148
156
|
:param city: City name
|
|
149
157
|
:param specialty: Specialty tag (e.g. solar, roofing, hvac)
|
|
150
158
|
:param min_permits: Minimum total permits
|
|
159
|
+
:param min_score: Minimum contractor activity score (0-100)
|
|
160
|
+
:param sort: Sort order: 'score' (default), 'permits', or 'recent'
|
|
151
161
|
:param page:
|
|
152
162
|
:param per_page:
|
|
153
163
|
:param retries: Override the default retry configuration for this method
|
|
@@ -171,6 +181,8 @@ class Contractors(BaseSDK):
|
|
|
171
181
|
city=city,
|
|
172
182
|
specialty=specialty,
|
|
173
183
|
min_permits=min_permits,
|
|
184
|
+
min_score=min_score,
|
|
185
|
+
sort=sort,
|
|
174
186
|
page=page,
|
|
175
187
|
per_page=per_page,
|
|
176
188
|
)
|
|
@@ -182,7 +182,7 @@ class Health(BaseSDK):
|
|
|
182
182
|
|
|
183
183
|
Public stats endpoint — no auth required.
|
|
184
184
|
Returns aggregate coverage numbers for marketing/transparency.
|
|
185
|
-
Cached server-side for
|
|
185
|
+
Cached server-side for 30 minutes.
|
|
186
186
|
|
|
187
187
|
:param retries: Override the default retry configuration for this method
|
|
188
188
|
:param server_url: Override the default server URL for this method
|
|
@@ -265,7 +265,7 @@ class Health(BaseSDK):
|
|
|
265
265
|
|
|
266
266
|
Public stats endpoint — no auth required.
|
|
267
267
|
Returns aggregate coverage numbers for marketing/transparency.
|
|
268
|
-
Cached server-side for
|
|
268
|
+
Cached server-side for 30 minutes.
|
|
269
269
|
|
|
270
270
|
:param retries: Override the default retry configuration for this method
|
|
271
271
|
:param server_url: Override the default server URL for this method
|
|
@@ -5,12 +5,17 @@ from typing import Any, TYPE_CHECKING
|
|
|
5
5
|
from permitstack.utils.dynamic_imports import lazy_getattr, lazy_dir
|
|
6
6
|
|
|
7
7
|
if TYPE_CHECKING:
|
|
8
|
+
from .battery_retrofit_candidatesop import (
|
|
9
|
+
BatteryRetrofitCandidatesRequest,
|
|
10
|
+
BatteryRetrofitCandidatesRequestTypedDict,
|
|
11
|
+
)
|
|
8
12
|
from .contractorprofile import ContractorProfile, ContractorProfileTypedDict
|
|
9
13
|
from .contractorsearchresponse import (
|
|
10
14
|
ContractorSearchResponse,
|
|
11
15
|
ContractorSearchResponseTypedDict,
|
|
12
16
|
)
|
|
13
17
|
from .contractorsummary import ContractorSummary, ContractorSummaryTypedDict
|
|
18
|
+
from .coverageconfidence import CoverageConfidence, CoverageConfidenceTypedDict
|
|
14
19
|
from .delete_webhookop import DeleteWebhookRequest, DeleteWebhookRequestTypedDict
|
|
15
20
|
from .export_permitsop import ExportPermitsRequest, ExportPermitsRequestTypedDict
|
|
16
21
|
from .get_contractor_permitsop import (
|
|
@@ -23,6 +28,10 @@ if TYPE_CHECKING:
|
|
|
23
28
|
GetPermitsByAddressRequest,
|
|
24
29
|
GetPermitsByAddressRequestTypedDict,
|
|
25
30
|
)
|
|
31
|
+
from .get_property_by_parcelop import (
|
|
32
|
+
GetPropertyByParcelRequest,
|
|
33
|
+
GetPropertyByParcelRequestTypedDict,
|
|
34
|
+
)
|
|
26
35
|
from .get_property_historyop import (
|
|
27
36
|
GetPropertyHistoryRequest,
|
|
28
37
|
GetPropertyHistoryRequestTypedDict,
|
|
@@ -31,14 +40,31 @@ if TYPE_CHECKING:
|
|
|
31
40
|
GetWebhookSecretRequest,
|
|
32
41
|
GetWebhookSecretRequestTypedDict,
|
|
33
42
|
)
|
|
43
|
+
from .list_permit_eventsop import (
|
|
44
|
+
ListPermitEventsRequest,
|
|
45
|
+
ListPermitEventsRequestTypedDict,
|
|
46
|
+
)
|
|
47
|
+
from .orphan_recoveryop import OrphanRecoveryRequest, OrphanRecoveryRequestTypedDict
|
|
34
48
|
from .permitdetail import PermitDetail, PermitDetailTypedDict
|
|
35
49
|
from .permitenrichment import PermitEnrichment, PermitEnrichmentTypedDict
|
|
50
|
+
from .permiteventout import PermitEventOut, PermitEventOutTypedDict
|
|
51
|
+
from .permiteventsresponse import (
|
|
52
|
+
PermitEventsResponse,
|
|
53
|
+
PermitEventsResponseTypedDict,
|
|
54
|
+
)
|
|
36
55
|
from .permitsearchresponse import (
|
|
37
56
|
PermitSearchResponse,
|
|
38
57
|
PermitSearchResponseTypedDict,
|
|
39
58
|
)
|
|
40
59
|
from .permitstatus import PermitStatus
|
|
41
60
|
from .permitsummary import PermitSummary, PermitSummaryTypedDict
|
|
61
|
+
from .propertyhistoryresponse import (
|
|
62
|
+
PropertyHistoryResponse,
|
|
63
|
+
PropertyHistoryResponseTypedDict,
|
|
64
|
+
)
|
|
65
|
+
from .propertyquery import PropertyQuery, PropertyQueryTypedDict
|
|
66
|
+
from .propertysignals import PropertySignals, PropertySignalsTypedDict
|
|
67
|
+
from .propertysummary import PropertySummary, PropertySummaryTypedDict
|
|
42
68
|
from .propertytype import PropertyType
|
|
43
69
|
from .search_contractorsop import (
|
|
44
70
|
SearchContractorsRequest,
|
|
@@ -58,6 +84,8 @@ if TYPE_CHECKING:
|
|
|
58
84
|
from .webhookcreate import WebhookCreate, WebhookCreateTypedDict
|
|
59
85
|
|
|
60
86
|
__all__ = [
|
|
87
|
+
"BatteryRetrofitCandidatesRequest",
|
|
88
|
+
"BatteryRetrofitCandidatesRequestTypedDict",
|
|
61
89
|
"Context",
|
|
62
90
|
"ContextTypedDict",
|
|
63
91
|
"ContractorProfile",
|
|
@@ -66,6 +94,8 @@ __all__ = [
|
|
|
66
94
|
"ContractorSearchResponseTypedDict",
|
|
67
95
|
"ContractorSummary",
|
|
68
96
|
"ContractorSummaryTypedDict",
|
|
97
|
+
"CoverageConfidence",
|
|
98
|
+
"CoverageConfidenceTypedDict",
|
|
69
99
|
"DeleteWebhookRequest",
|
|
70
100
|
"DeleteWebhookRequestTypedDict",
|
|
71
101
|
"ExportPermitsRequest",
|
|
@@ -78,21 +108,39 @@ __all__ = [
|
|
|
78
108
|
"GetPermitRequestTypedDict",
|
|
79
109
|
"GetPermitsByAddressRequest",
|
|
80
110
|
"GetPermitsByAddressRequestTypedDict",
|
|
111
|
+
"GetPropertyByParcelRequest",
|
|
112
|
+
"GetPropertyByParcelRequestTypedDict",
|
|
81
113
|
"GetPropertyHistoryRequest",
|
|
82
114
|
"GetPropertyHistoryRequestTypedDict",
|
|
83
115
|
"GetWebhookSecretRequest",
|
|
84
116
|
"GetWebhookSecretRequestTypedDict",
|
|
117
|
+
"ListPermitEventsRequest",
|
|
118
|
+
"ListPermitEventsRequestTypedDict",
|
|
85
119
|
"Loc",
|
|
86
120
|
"LocTypedDict",
|
|
121
|
+
"OrphanRecoveryRequest",
|
|
122
|
+
"OrphanRecoveryRequestTypedDict",
|
|
87
123
|
"PermitDetail",
|
|
88
124
|
"PermitDetailTypedDict",
|
|
89
125
|
"PermitEnrichment",
|
|
90
126
|
"PermitEnrichmentTypedDict",
|
|
127
|
+
"PermitEventOut",
|
|
128
|
+
"PermitEventOutTypedDict",
|
|
129
|
+
"PermitEventsResponse",
|
|
130
|
+
"PermitEventsResponseTypedDict",
|
|
91
131
|
"PermitSearchResponse",
|
|
92
132
|
"PermitSearchResponseTypedDict",
|
|
93
133
|
"PermitStatus",
|
|
94
134
|
"PermitSummary",
|
|
95
135
|
"PermitSummaryTypedDict",
|
|
136
|
+
"PropertyHistoryResponse",
|
|
137
|
+
"PropertyHistoryResponseTypedDict",
|
|
138
|
+
"PropertyQuery",
|
|
139
|
+
"PropertyQueryTypedDict",
|
|
140
|
+
"PropertySignals",
|
|
141
|
+
"PropertySignalsTypedDict",
|
|
142
|
+
"PropertySummary",
|
|
143
|
+
"PropertySummaryTypedDict",
|
|
96
144
|
"PropertyType",
|
|
97
145
|
"SearchContractorsRequest",
|
|
98
146
|
"SearchContractorsRequestTypedDict",
|
|
@@ -109,12 +157,16 @@ __all__ = [
|
|
|
109
157
|
]
|
|
110
158
|
|
|
111
159
|
_dynamic_imports: dict[str, str] = {
|
|
160
|
+
"BatteryRetrofitCandidatesRequest": ".battery_retrofit_candidatesop",
|
|
161
|
+
"BatteryRetrofitCandidatesRequestTypedDict": ".battery_retrofit_candidatesop",
|
|
112
162
|
"ContractorProfile": ".contractorprofile",
|
|
113
163
|
"ContractorProfileTypedDict": ".contractorprofile",
|
|
114
164
|
"ContractorSearchResponse": ".contractorsearchresponse",
|
|
115
165
|
"ContractorSearchResponseTypedDict": ".contractorsearchresponse",
|
|
116
166
|
"ContractorSummary": ".contractorsummary",
|
|
117
167
|
"ContractorSummaryTypedDict": ".contractorsummary",
|
|
168
|
+
"CoverageConfidence": ".coverageconfidence",
|
|
169
|
+
"CoverageConfidenceTypedDict": ".coverageconfidence",
|
|
118
170
|
"DeleteWebhookRequest": ".delete_webhookop",
|
|
119
171
|
"DeleteWebhookRequestTypedDict": ".delete_webhookop",
|
|
120
172
|
"ExportPermitsRequest": ".export_permitsop",
|
|
@@ -127,19 +179,37 @@ _dynamic_imports: dict[str, str] = {
|
|
|
127
179
|
"GetPermitRequestTypedDict": ".get_permitop",
|
|
128
180
|
"GetPermitsByAddressRequest": ".get_permits_by_addressop",
|
|
129
181
|
"GetPermitsByAddressRequestTypedDict": ".get_permits_by_addressop",
|
|
182
|
+
"GetPropertyByParcelRequest": ".get_property_by_parcelop",
|
|
183
|
+
"GetPropertyByParcelRequestTypedDict": ".get_property_by_parcelop",
|
|
130
184
|
"GetPropertyHistoryRequest": ".get_property_historyop",
|
|
131
185
|
"GetPropertyHistoryRequestTypedDict": ".get_property_historyop",
|
|
132
186
|
"GetWebhookSecretRequest": ".get_webhook_secretop",
|
|
133
187
|
"GetWebhookSecretRequestTypedDict": ".get_webhook_secretop",
|
|
188
|
+
"ListPermitEventsRequest": ".list_permit_eventsop",
|
|
189
|
+
"ListPermitEventsRequestTypedDict": ".list_permit_eventsop",
|
|
190
|
+
"OrphanRecoveryRequest": ".orphan_recoveryop",
|
|
191
|
+
"OrphanRecoveryRequestTypedDict": ".orphan_recoveryop",
|
|
134
192
|
"PermitDetail": ".permitdetail",
|
|
135
193
|
"PermitDetailTypedDict": ".permitdetail",
|
|
136
194
|
"PermitEnrichment": ".permitenrichment",
|
|
137
195
|
"PermitEnrichmentTypedDict": ".permitenrichment",
|
|
196
|
+
"PermitEventOut": ".permiteventout",
|
|
197
|
+
"PermitEventOutTypedDict": ".permiteventout",
|
|
198
|
+
"PermitEventsResponse": ".permiteventsresponse",
|
|
199
|
+
"PermitEventsResponseTypedDict": ".permiteventsresponse",
|
|
138
200
|
"PermitSearchResponse": ".permitsearchresponse",
|
|
139
201
|
"PermitSearchResponseTypedDict": ".permitsearchresponse",
|
|
140
202
|
"PermitStatus": ".permitstatus",
|
|
141
203
|
"PermitSummary": ".permitsummary",
|
|
142
204
|
"PermitSummaryTypedDict": ".permitsummary",
|
|
205
|
+
"PropertyHistoryResponse": ".propertyhistoryresponse",
|
|
206
|
+
"PropertyHistoryResponseTypedDict": ".propertyhistoryresponse",
|
|
207
|
+
"PropertyQuery": ".propertyquery",
|
|
208
|
+
"PropertyQueryTypedDict": ".propertyquery",
|
|
209
|
+
"PropertySignals": ".propertysignals",
|
|
210
|
+
"PropertySignalsTypedDict": ".propertysignals",
|
|
211
|
+
"PropertySummary": ".propertysummary",
|
|
212
|
+
"PropertySummaryTypedDict": ".propertysummary",
|
|
143
213
|
"PropertyType": ".propertytype",
|
|
144
214
|
"SearchContractorsRequest": ".search_contractorsop",
|
|
145
215
|
"SearchContractorsRequestTypedDict": ".search_contractorsop",
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from permitstack.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from permitstack.utils import FieldMetadata, QueryParamMetadata
|
|
12
|
+
from pydantic import model_serializer
|
|
13
|
+
from typing import Optional
|
|
14
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class BatteryRetrofitCandidatesRequestTypedDict(TypedDict):
|
|
18
|
+
state: NotRequired[Nullable[str]]
|
|
19
|
+
r"""2-letter state code"""
|
|
20
|
+
city: NotRequired[Nullable[str]]
|
|
21
|
+
r"""City name"""
|
|
22
|
+
zip_code: NotRequired[Nullable[str]]
|
|
23
|
+
r"""5-digit ZIP"""
|
|
24
|
+
jurisdiction: NotRequired[Nullable[str]]
|
|
25
|
+
r"""Jurisdiction name (partial)"""
|
|
26
|
+
min_age_years: NotRequired[float]
|
|
27
|
+
r"""Minimum age of the PV permit, in years"""
|
|
28
|
+
max_age_years: NotRequired[float]
|
|
29
|
+
r"""Maximum age of the PV permit, in years"""
|
|
30
|
+
page: NotRequired[int]
|
|
31
|
+
per_page: NotRequired[int]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class BatteryRetrofitCandidatesRequest(BaseModel):
|
|
35
|
+
state: Annotated[
|
|
36
|
+
OptionalNullable[str],
|
|
37
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
38
|
+
] = UNSET
|
|
39
|
+
r"""2-letter state code"""
|
|
40
|
+
|
|
41
|
+
city: Annotated[
|
|
42
|
+
OptionalNullable[str],
|
|
43
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
44
|
+
] = UNSET
|
|
45
|
+
r"""City name"""
|
|
46
|
+
|
|
47
|
+
zip_code: Annotated[
|
|
48
|
+
OptionalNullable[str],
|
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
50
|
+
] = UNSET
|
|
51
|
+
r"""5-digit ZIP"""
|
|
52
|
+
|
|
53
|
+
jurisdiction: Annotated[
|
|
54
|
+
OptionalNullable[str],
|
|
55
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
56
|
+
] = UNSET
|
|
57
|
+
r"""Jurisdiction name (partial)"""
|
|
58
|
+
|
|
59
|
+
min_age_years: Annotated[
|
|
60
|
+
Optional[float],
|
|
61
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
62
|
+
] = 2
|
|
63
|
+
r"""Minimum age of the PV permit, in years"""
|
|
64
|
+
|
|
65
|
+
max_age_years: Annotated[
|
|
66
|
+
Optional[float],
|
|
67
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
68
|
+
] = 7
|
|
69
|
+
r"""Maximum age of the PV permit, in years"""
|
|
70
|
+
|
|
71
|
+
page: Annotated[
|
|
72
|
+
Optional[int],
|
|
73
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
74
|
+
] = 1
|
|
75
|
+
|
|
76
|
+
per_page: Annotated[
|
|
77
|
+
Optional[int],
|
|
78
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
79
|
+
] = 25
|
|
80
|
+
|
|
81
|
+
@model_serializer(mode="wrap")
|
|
82
|
+
def serialize_model(self, handler):
|
|
83
|
+
optional_fields = set(
|
|
84
|
+
[
|
|
85
|
+
"state",
|
|
86
|
+
"city",
|
|
87
|
+
"zip_code",
|
|
88
|
+
"jurisdiction",
|
|
89
|
+
"min_age_years",
|
|
90
|
+
"max_age_years",
|
|
91
|
+
"page",
|
|
92
|
+
"per_page",
|
|
93
|
+
]
|
|
94
|
+
)
|
|
95
|
+
nullable_fields = set(["state", "city", "zip_code", "jurisdiction"])
|
|
96
|
+
serialized = handler(self)
|
|
97
|
+
m = {}
|
|
98
|
+
|
|
99
|
+
for n, f in type(self).model_fields.items():
|
|
100
|
+
k = f.alias or n
|
|
101
|
+
val = serialized.get(k, serialized.get(n))
|
|
102
|
+
is_nullable_and_explicitly_set = (
|
|
103
|
+
k in nullable_fields
|
|
104
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
if val != UNSET_SENTINEL:
|
|
108
|
+
if (
|
|
109
|
+
val is not None
|
|
110
|
+
or k not in optional_fields
|
|
111
|
+
or is_nullable_and_explicitly_set
|
|
112
|
+
):
|
|
113
|
+
m[k] = val
|
|
114
|
+
|
|
115
|
+
return m
|
|
@@ -29,6 +29,8 @@ class ContractorProfileTypedDict(TypedDict):
|
|
|
29
29
|
email: Nullable[str]
|
|
30
30
|
address: Nullable[str]
|
|
31
31
|
zip_code: Nullable[str]
|
|
32
|
+
score: NotRequired[Nullable[int]]
|
|
33
|
+
is_business: NotRequired[Nullable[bool]]
|
|
32
34
|
recent_categories: NotRequired[Nullable[List[str]]]
|
|
33
35
|
avg_project_value: NotRequired[Nullable[float]]
|
|
34
36
|
|
|
@@ -62,13 +64,19 @@ class ContractorProfile(BaseModel):
|
|
|
62
64
|
|
|
63
65
|
zip_code: Nullable[str]
|
|
64
66
|
|
|
67
|
+
score: OptionalNullable[int] = UNSET
|
|
68
|
+
|
|
69
|
+
is_business: OptionalNullable[bool] = UNSET
|
|
70
|
+
|
|
65
71
|
recent_categories: OptionalNullable[List[str]] = UNSET
|
|
66
72
|
|
|
67
73
|
avg_project_value: OptionalNullable[float] = UNSET
|
|
68
74
|
|
|
69
75
|
@model_serializer(mode="wrap")
|
|
70
76
|
def serialize_model(self, handler):
|
|
71
|
-
optional_fields = set(
|
|
77
|
+
optional_fields = set(
|
|
78
|
+
["score", "is_business", "recent_categories", "avg_project_value"]
|
|
79
|
+
)
|
|
72
80
|
nullable_fields = set(
|
|
73
81
|
[
|
|
74
82
|
"license_number",
|
|
@@ -78,6 +86,8 @@ class ContractorProfile(BaseModel):
|
|
|
78
86
|
"first_permit_date",
|
|
79
87
|
"last_permit_date",
|
|
80
88
|
"specialties",
|
|
89
|
+
"score",
|
|
90
|
+
"is_business",
|
|
81
91
|
"phone",
|
|
82
92
|
"email",
|
|
83
93
|
"address",
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from datetime import date
|
|
5
|
-
from permitstack.types import
|
|
5
|
+
from permitstack.types import (
|
|
6
|
+
BaseModel,
|
|
7
|
+
Nullable,
|
|
8
|
+
OptionalNullable,
|
|
9
|
+
UNSET,
|
|
10
|
+
UNSET_SENTINEL,
|
|
11
|
+
)
|
|
6
12
|
from pydantic import model_serializer
|
|
7
13
|
from typing import List
|
|
8
|
-
from typing_extensions import TypedDict
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict
|
|
9
15
|
|
|
10
16
|
|
|
11
17
|
class ContractorSummaryTypedDict(TypedDict):
|
|
@@ -19,6 +25,8 @@ class ContractorSummaryTypedDict(TypedDict):
|
|
|
19
25
|
first_permit_date: Nullable[date]
|
|
20
26
|
last_permit_date: Nullable[date]
|
|
21
27
|
specialties: Nullable[List[str]]
|
|
28
|
+
score: NotRequired[Nullable[int]]
|
|
29
|
+
is_business: NotRequired[Nullable[bool]]
|
|
22
30
|
|
|
23
31
|
|
|
24
32
|
class ContractorSummary(BaseModel):
|
|
@@ -42,16 +50,43 @@ class ContractorSummary(BaseModel):
|
|
|
42
50
|
|
|
43
51
|
specialties: Nullable[List[str]]
|
|
44
52
|
|
|
53
|
+
score: OptionalNullable[int] = UNSET
|
|
54
|
+
|
|
55
|
+
is_business: OptionalNullable[bool] = UNSET
|
|
56
|
+
|
|
45
57
|
@model_serializer(mode="wrap")
|
|
46
58
|
def serialize_model(self, handler):
|
|
59
|
+
optional_fields = set(["score", "is_business"])
|
|
60
|
+
nullable_fields = set(
|
|
61
|
+
[
|
|
62
|
+
"license_number",
|
|
63
|
+
"license_state",
|
|
64
|
+
"city",
|
|
65
|
+
"state",
|
|
66
|
+
"first_permit_date",
|
|
67
|
+
"last_permit_date",
|
|
68
|
+
"specialties",
|
|
69
|
+
"score",
|
|
70
|
+
"is_business",
|
|
71
|
+
]
|
|
72
|
+
)
|
|
47
73
|
serialized = handler(self)
|
|
48
74
|
m = {}
|
|
49
75
|
|
|
50
76
|
for n, f in type(self).model_fields.items():
|
|
51
77
|
k = f.alias or n
|
|
52
78
|
val = serialized.get(k, serialized.get(n))
|
|
79
|
+
is_nullable_and_explicitly_set = (
|
|
80
|
+
k in nullable_fields
|
|
81
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
82
|
+
)
|
|
53
83
|
|
|
54
84
|
if val != UNSET_SENTINEL:
|
|
55
|
-
|
|
85
|
+
if (
|
|
86
|
+
val is not None
|
|
87
|
+
or k not in optional_fields
|
|
88
|
+
or is_nullable_and_explicitly_set
|
|
89
|
+
):
|
|
90
|
+
m[k] = val
|
|
56
91
|
|
|
57
92
|
return m
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from permitstack.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from pydantic import model_serializer
|
|
12
|
+
from typing_extensions import NotRequired, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CoverageConfidenceTypedDict(TypedDict):
|
|
16
|
+
r"""Honest read on whether a `found: false` is meaningful or just missing data.
|
|
17
|
+
|
|
18
|
+
The wedge competitors won't ship: a 'no permit on record' is only useful if we
|
|
19
|
+
actually cover that jurisdiction. We say so explicitly so an automated (e.g.
|
|
20
|
+
underwriting) workflow can tell UNKNOWN apart from genuinely-no-work.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
confidence: str
|
|
24
|
+
covered: bool
|
|
25
|
+
note: str
|
|
26
|
+
jurisdiction: NotRequired[Nullable[str]]
|
|
27
|
+
data_status: NotRequired[Nullable[str]]
|
|
28
|
+
jurisdiction_permit_count: NotRequired[Nullable[int]]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class CoverageConfidence(BaseModel):
|
|
32
|
+
r"""Honest read on whether a `found: false` is meaningful or just missing data.
|
|
33
|
+
|
|
34
|
+
The wedge competitors won't ship: a 'no permit on record' is only useful if we
|
|
35
|
+
actually cover that jurisdiction. We say so explicitly so an automated (e.g.
|
|
36
|
+
underwriting) workflow can tell UNKNOWN apart from genuinely-no-work.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
confidence: str
|
|
40
|
+
|
|
41
|
+
covered: bool
|
|
42
|
+
|
|
43
|
+
note: str
|
|
44
|
+
|
|
45
|
+
jurisdiction: OptionalNullable[str] = UNSET
|
|
46
|
+
|
|
47
|
+
data_status: OptionalNullable[str] = UNSET
|
|
48
|
+
|
|
49
|
+
jurisdiction_permit_count: OptionalNullable[int] = UNSET
|
|
50
|
+
|
|
51
|
+
@model_serializer(mode="wrap")
|
|
52
|
+
def serialize_model(self, handler):
|
|
53
|
+
optional_fields = set(
|
|
54
|
+
["jurisdiction", "data_status", "jurisdiction_permit_count"]
|
|
55
|
+
)
|
|
56
|
+
nullable_fields = set(
|
|
57
|
+
["jurisdiction", "data_status", "jurisdiction_permit_count"]
|
|
58
|
+
)
|
|
59
|
+
serialized = handler(self)
|
|
60
|
+
m = {}
|
|
61
|
+
|
|
62
|
+
for n, f in type(self).model_fields.items():
|
|
63
|
+
k = f.alias or n
|
|
64
|
+
val = serialized.get(k, serialized.get(n))
|
|
65
|
+
is_nullable_and_explicitly_set = (
|
|
66
|
+
k in nullable_fields
|
|
67
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
if val != UNSET_SENTINEL:
|
|
71
|
+
if (
|
|
72
|
+
val is not None
|
|
73
|
+
or k not in optional_fields
|
|
74
|
+
or is_nullable_and_explicitly_set
|
|
75
|
+
):
|
|
76
|
+
m[k] = val
|
|
77
|
+
|
|
78
|
+
return m
|