proxyrequest-sdk 4.2.0__py3-none-any.whl → 4.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,7 @@ def _get_kwargs(
24
24
  code: str | Unset = UNSET,
25
25
  country_code: str | Unset = UNSET,
26
26
  global_: bool | Unset = UNSET,
27
+ include_geo: bool | Unset = False,
27
28
  limit: int | Unset = UNSET,
28
29
  name: str | Unset = UNSET,
29
30
  offset: int | Unset = UNSET,
@@ -44,6 +45,8 @@ def _get_kwargs(
44
45
 
45
46
  params["global"] = global_
46
47
 
48
+ params["include_geo"] = include_geo
49
+
47
50
  params["limit"] = limit
48
51
 
49
52
  params["name"] = name
@@ -127,6 +130,7 @@ def sync_detailed(
127
130
  code: str | Unset = UNSET,
128
131
  country_code: str | Unset = UNSET,
129
132
  global_: bool | Unset = UNSET,
133
+ include_geo: bool | Unset = False,
130
134
  limit: int | Unset = UNSET,
131
135
  name: str | Unset = UNSET,
132
136
  offset: int | Unset = UNSET,
@@ -142,13 +146,14 @@ def sync_detailed(
142
146
  ]:
143
147
  """List available autonomous systems
144
148
 
145
- Returns targetable ASNs for the selected package. Geo-scoped records include the country, region, or
146
- city where the ASN can be selected.
149
+ Returns targetable ASNs for the selected package. The geo field is empty unless include_geo=true;
150
+ then it contains targetable geographic scopes.
147
151
 
148
152
  Args:
149
153
  code (str | Unset):
150
154
  country_code (str | Unset):
151
155
  global_ (bool | Unset):
156
+ include_geo (bool | Unset): Default: False.
152
157
  limit (int | Unset):
153
158
  name (str | Unset):
154
159
  offset (int | Unset):
@@ -169,6 +174,7 @@ def sync_detailed(
169
174
  code=code,
170
175
  country_code=country_code,
171
176
  global_=global_,
177
+ include_geo=include_geo,
172
178
  limit=limit,
173
179
  name=name,
174
180
  offset=offset,
@@ -191,6 +197,7 @@ def sync(
191
197
  code: str | Unset = UNSET,
192
198
  country_code: str | Unset = UNSET,
193
199
  global_: bool | Unset = UNSET,
200
+ include_geo: bool | Unset = False,
194
201
  limit: int | Unset = UNSET,
195
202
  name: str | Unset = UNSET,
196
203
  offset: int | Unset = UNSET,
@@ -207,13 +214,14 @@ def sync(
207
214
  ):
208
215
  """List available autonomous systems
209
216
 
210
- Returns targetable ASNs for the selected package. Geo-scoped records include the country, region, or
211
- city where the ASN can be selected.
217
+ Returns targetable ASNs for the selected package. The geo field is empty unless include_geo=true;
218
+ then it contains targetable geographic scopes.
212
219
 
213
220
  Args:
214
221
  code (str | Unset):
215
222
  country_code (str | Unset):
216
223
  global_ (bool | Unset):
224
+ include_geo (bool | Unset): Default: False.
217
225
  limit (int | Unset):
218
226
  name (str | Unset):
219
227
  offset (int | Unset):
@@ -235,6 +243,7 @@ def sync(
235
243
  code=code,
236
244
  country_code=country_code,
237
245
  global_=global_,
246
+ include_geo=include_geo,
238
247
  limit=limit,
239
248
  name=name,
240
249
  offset=offset,
@@ -251,6 +260,7 @@ async def asyncio_detailed(
251
260
  code: str | Unset = UNSET,
252
261
  country_code: str | Unset = UNSET,
253
262
  global_: bool | Unset = UNSET,
263
+ include_geo: bool | Unset = False,
254
264
  limit: int | Unset = UNSET,
255
265
  name: str | Unset = UNSET,
256
266
  offset: int | Unset = UNSET,
@@ -266,13 +276,14 @@ async def asyncio_detailed(
266
276
  ]:
267
277
  """List available autonomous systems
268
278
 
269
- Returns targetable ASNs for the selected package. Geo-scoped records include the country, region, or
270
- city where the ASN can be selected.
279
+ Returns targetable ASNs for the selected package. The geo field is empty unless include_geo=true;
280
+ then it contains targetable geographic scopes.
271
281
 
272
282
  Args:
273
283
  code (str | Unset):
274
284
  country_code (str | Unset):
275
285
  global_ (bool | Unset):
286
+ include_geo (bool | Unset): Default: False.
276
287
  limit (int | Unset):
277
288
  name (str | Unset):
278
289
  offset (int | Unset):
@@ -293,6 +304,7 @@ async def asyncio_detailed(
293
304
  code=code,
294
305
  country_code=country_code,
295
306
  global_=global_,
307
+ include_geo=include_geo,
296
308
  limit=limit,
297
309
  name=name,
298
310
  offset=offset,
@@ -313,6 +325,7 @@ async def asyncio(
313
325
  code: str | Unset = UNSET,
314
326
  country_code: str | Unset = UNSET,
315
327
  global_: bool | Unset = UNSET,
328
+ include_geo: bool | Unset = False,
316
329
  limit: int | Unset = UNSET,
317
330
  name: str | Unset = UNSET,
318
331
  offset: int | Unset = UNSET,
@@ -329,13 +342,14 @@ async def asyncio(
329
342
  ):
330
343
  """List available autonomous systems
331
344
 
332
- Returns targetable ASNs for the selected package. Geo-scoped records include the country, region, or
333
- city where the ASN can be selected.
345
+ Returns targetable ASNs for the selected package. The geo field is empty unless include_geo=true;
346
+ then it contains targetable geographic scopes.
334
347
 
335
348
  Args:
336
349
  code (str | Unset):
337
350
  country_code (str | Unset):
338
351
  global_ (bool | Unset):
352
+ include_geo (bool | Unset): Default: False.
339
353
  limit (int | Unset):
340
354
  name (str | Unset):
341
355
  offset (int | Unset):
@@ -358,6 +372,7 @@ async def asyncio(
358
372
  code=code,
359
373
  country_code=country_code,
360
374
  global_=global_,
375
+ include_geo=include_geo,
361
376
  limit=limit,
362
377
  name=name,
363
378
  offset=offset,
@@ -52,10 +52,10 @@ class InvoiceCreateRequest:
52
52
  """ Account balance amount to purchase, in the smallest currency unit. Use for a wallet top-up without
53
53
  package_id, not for buying proxy data. """
54
54
  price_total: int | Unset = UNSET
55
- """ Optional final invoice total in the smallest currency unit, including tax and discounts. For a balance
56
- invoice, this is also the balance credit and takes precedence over amount. Only superusers or active superuser
57
- API keys may supply it, including during API-key impersonation; coupon_code cannot be supplied with price_total.
58
- """
55
+ """ Optional final invoice total in the smallest currency unit, including tax and discounts. Zero is allowed for
56
+ a free product purchase. For a balance invoice, this is also the balance credit, must satisfy the balance top-up
57
+ limits, and takes precedence over amount. Only superusers or active superuser API keys may supply it, including
58
+ zero and during API-key impersonation; coupon_code cannot be supplied with price_total. """
59
59
  connection_limit: int | Unset = UNSET
60
60
  expires: int | Unset = UNSET
61
61
  """ Optional future expiration as a Unix timestamp in seconds, not milliseconds. Otherwise a positive package
@@ -8,7 +8,6 @@ from attrs import field as _attrs_field
8
8
 
9
9
  from ..types import UNSET, Unset
10
10
 
11
- from ..types import UNSET, Unset
12
11
  from typing import cast
13
12
 
14
13
  if TYPE_CHECKING:
@@ -22,7 +21,8 @@ T = TypeVar("T", bound="LocationASNRecord")
22
21
  class LocationASNRecord:
23
22
  code: str
24
23
  name: str
25
- geo: list[LocationASNGeoItem] | Unset = UNSET
24
+ country_codes: list[str]
25
+ geo: list[LocationASNGeoItem]
26
26
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
27
 
28
28
  def to_dict(self) -> dict[str, Any]:
@@ -32,12 +32,12 @@ class LocationASNRecord:
32
32
 
33
33
  name = self.name
34
34
 
35
- geo: list[dict[str, Any]] | Unset = UNSET
36
- if not isinstance(self.geo, Unset):
37
- geo = []
38
- for geo_item_data in self.geo:
39
- geo_item = geo_item_data.to_dict()
40
- geo.append(geo_item)
35
+ country_codes = self.country_codes
36
+
37
+ geo = []
38
+ for geo_item_data in self.geo:
39
+ geo_item = geo_item_data.to_dict()
40
+ geo.append(geo_item)
41
41
 
42
42
  field_dict: dict[str, Any] = {}
43
43
  field_dict.update(self.additional_properties)
@@ -45,10 +45,10 @@ class LocationASNRecord:
45
45
  {
46
46
  "code": code,
47
47
  "name": name,
48
+ "country_codes": country_codes,
49
+ "geo": geo,
48
50
  }
49
51
  )
50
- if geo is not UNSET:
51
- field_dict["geo"] = geo
52
52
 
53
53
  return field_dict
54
54
 
@@ -61,18 +61,19 @@ class LocationASNRecord:
61
61
 
62
62
  name = d.pop("name")
63
63
 
64
- _geo = d.pop("geo", UNSET)
65
- geo: list[LocationASNGeoItem] | Unset = UNSET
66
- if _geo is not UNSET:
67
- geo = []
68
- for geo_item_data in _geo:
69
- geo_item = LocationASNGeoItem.from_dict(geo_item_data)
64
+ country_codes = cast(list[str], d.pop("country_codes"))
65
+
66
+ geo = []
67
+ _geo = d.pop("geo")
68
+ for geo_item_data in _geo:
69
+ geo_item = LocationASNGeoItem.from_dict(geo_item_data)
70
70
 
71
- geo.append(geo_item)
71
+ geo.append(geo_item)
72
72
 
73
73
  location_asn_record = cls(
74
74
  code=code,
75
75
  name=name,
76
+ country_codes=country_codes,
76
77
  geo=geo,
77
78
  )
78
79
 
@@ -190,6 +190,7 @@ class LocationsResource:
190
190
  code: str | Unset = UNSET,
191
191
  country_code: str | Unset = UNSET,
192
192
  global_: bool | Unset = UNSET,
193
+ include_geo: bool | Unset = False,
193
194
  limit: int | Unset = UNSET,
194
195
  name: str | Unset = UNSET,
195
196
  offset: int | Unset = UNSET,
@@ -206,6 +207,7 @@ class LocationsResource:
206
207
  code=code,
207
208
  country_code=country_code,
208
209
  global_=global_,
210
+ include_geo=include_geo,
209
211
  limit=limit,
210
212
  name=name,
211
213
  offset=offset,
@@ -222,6 +224,7 @@ class LocationsResource:
222
224
  code: str | Unset = UNSET,
223
225
  country_code: str | Unset = UNSET,
224
226
  global_: bool | Unset = UNSET,
227
+ include_geo: bool | Unset = False,
225
228
  limit: int | Unset = UNSET,
226
229
  name: str | Unset = UNSET,
227
230
  offset: int | Unset = UNSET,
@@ -238,6 +241,7 @@ class LocationsResource:
238
241
  code=code,
239
242
  country_code=country_code,
240
243
  global_=global_,
244
+ include_geo=include_geo,
241
245
  limit=limit,
242
246
  name=name,
243
247
  offset=offset,
@@ -715,6 +719,7 @@ class AsyncLocationsResource:
715
719
  code: str | Unset = UNSET,
716
720
  country_code: str | Unset = UNSET,
717
721
  global_: bool | Unset = UNSET,
722
+ include_geo: bool | Unset = False,
718
723
  limit: int | Unset = UNSET,
719
724
  name: str | Unset = UNSET,
720
725
  offset: int | Unset = UNSET,
@@ -731,6 +736,7 @@ class AsyncLocationsResource:
731
736
  code=code,
732
737
  country_code=country_code,
733
738
  global_=global_,
739
+ include_geo=include_geo,
734
740
  limit=limit,
735
741
  name=name,
736
742
  offset=offset,
@@ -747,6 +753,7 @@ class AsyncLocationsResource:
747
753
  code: str | Unset = UNSET,
748
754
  country_code: str | Unset = UNSET,
749
755
  global_: bool | Unset = UNSET,
756
+ include_geo: bool | Unset = False,
750
757
  limit: int | Unset = UNSET,
751
758
  name: str | Unset = UNSET,
752
759
  offset: int | Unset = UNSET,
@@ -763,6 +770,7 @@ class AsyncLocationsResource:
763
770
  code=code,
764
771
  country_code=country_code,
765
772
  global_=global_,
773
+ include_geo=include_geo,
766
774
  limit=limit,
767
775
  name=name,
768
776
  offset=offset,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxyrequest-sdk
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: Official sync and async Python SDK for the ProxyRequest public API.
5
5
  Project-URL: Homepage, https://proxyrequest.com
6
6
  Project-URL: Documentation, https://proxyrequest.com/docs/
@@ -370,3 +370,5 @@ for balance in page.results:
370
370
  Provider byte amounts are exact decimal **strings**, including history entries; calculated usage and remaining amounts can be `null`. The response includes observation and calculation times, freshness, errors, and recent checkpoint history. History is limited by the server's `PROVIDER_DATA_BALANCE_HISTORY_LIMIT` setting (default 10). Standard pagination applies to providers.
371
371
 
372
372
  Country, region, and city methods also support `include_asns`. Set it to `true` to populate nested ASN arrays; omitted or false uses the API's empty-array default.
373
+
374
+ `client.locations.list_asns(package_id=package_id, include_geo=True)` includes country, region, and city scopes in each ASN's `geo` list. Without `include_geo`, `geo` is empty; `country_codes` still lists the available country codes. The same option is available on `AsyncClient`.
@@ -50,7 +50,7 @@ proxyrequest_sdk/_generated/api/invoices/invoices_list.py,sha256=a2scRW0Jk5rOyDk
50
50
  proxyrequest_sdk/_generated/api/invoices/invoices_pay_retrieve.py,sha256=joYEf-uuSvdWwvCntWUIJ9423mYSgUzoLxBK-R3QkZA,7569
51
51
  proxyrequest_sdk/_generated/api/invoices/invoices_retrieve.py,sha256=hFwZqONVfGoWH_RB6TXpdxo3OW6WbL2haUgPE_zj2Zc,7970
52
52
  proxyrequest_sdk/_generated/api/locations/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
53
- proxyrequest_sdk/_generated/api/locations/locations_asn_list.py,sha256=1etqhF2ru-7v2rKWaAf_0kT5jcJ94FubOSgIep2lWA0,10783
53
+ proxyrequest_sdk/_generated/api/locations/locations_asn_list.py,sha256=yu-koP46Iuph5Mhx3IWAw-Eq2nTQUwwVVnq4CTfDC2E,11399
54
54
  proxyrequest_sdk/_generated/api/locations/locations_cities_list.py,sha256=nhDTWZThun-f_4W5ebtI94Kwv2i-RM9ZLE_DiiAnJ7A,12216
55
55
  proxyrequest_sdk/_generated/api/locations/locations_cities_retrieve.py,sha256=HK1tM5zmraRptirC5GSaRFxbEosGgrZX6ovDTk-PuUw,9468
56
56
  proxyrequest_sdk/_generated/api/locations/locations_continents_list.py,sha256=FH99s_CkmtySibgHSbO3iw7T7D5PwTjd7-2vDaC7O1M,9855
@@ -247,7 +247,7 @@ proxyrequest_sdk/_generated/models/integrations_telegram_link_create_response_40
247
247
  proxyrequest_sdk/_generated/models/integrations_telegram_link_create_response_401.py,sha256=mGsl6-GmEYDwJaL_yHdyUd97PkYeWwGcumCBEv1zQ60,3272
248
248
  proxyrequest_sdk/_generated/models/integrations_telegram_link_create_response_403.py,sha256=jAHqklPkiY8Plt_9cNejmP32L1VJVFuw1UhkMZb3Mo0,3272
249
249
  proxyrequest_sdk/_generated/models/invoice.py,sha256=walF-KGLIyBiL13peMAfizARkhR1kE1ZBz769QQKadc,18171
250
- proxyrequest_sdk/_generated/models/invoice_create_request.py,sha256=SE6HbsRcLFYoG7Lk8_hc8oYpn8LkdormDREbioN1MMg,9460
250
+ proxyrequest_sdk/_generated/models/invoice_create_request.py,sha256=s1LKhkHYYdiR7wC-GTrtlcasHT0aB_7vg8EQcwh9lnE,9555
251
251
  proxyrequest_sdk/_generated/models/invoice_create_request_gateway_enum.py,sha256=RnXuzXhDnEYB7Dx9qer0SqGmdGsFD0MdR-F9YFfJsXQ,1357
252
252
  proxyrequest_sdk/_generated/models/invoice_create_request_status_enum.py,sha256=dMFap-L17E3pSC9tpSGv2md06UjJ7rxXrCqwZEGY9Zs,434
253
253
  proxyrequest_sdk/_generated/models/invoice_gateway_enum.py,sha256=eC4f8wqnDroE77slXq5PQ3Opx23eqt6KU8vnt7jpyqc,1290
@@ -287,7 +287,7 @@ proxyrequest_sdk/_generated/models/isp.py,sha256=3bSjhTkNxroQP6EvM-6H2YXcj0AicYJ
287
287
  proxyrequest_sdk/_generated/models/language_enum.py,sha256=jLzITKTxCPEs6TV4KAwJGpHi-xRCbaul3Zf0gPOtDjI,444
288
288
  proxyrequest_sdk/_generated/models/level_enum.py,sha256=sLLtNQ2rUuMZBDEdHaEl4AQN3Jk7On2AVlWQ46o_PW0,461
289
289
  proxyrequest_sdk/_generated/models/location_asn_geo_item.py,sha256=z5lmKygNXi70Ttat39y4iDK37Gq3NE4rq_UoawjolOk,2862
290
- proxyrequest_sdk/_generated/models/location_asn_record.py,sha256=MSXhwxfLk8ZBklpmuDGxq9qEOJKhUANmSXFW1VZrfjE,2612
290
+ proxyrequest_sdk/_generated/models/location_asn_record.py,sha256=HObIrifXbj4kwwGneM2sgjqwLtTZOhzKOiTddsFCVeM,2536
291
291
  proxyrequest_sdk/_generated/models/location_code_name.py,sha256=VL29JWYxrRIKwVQkwDLbPMyY0R-sc9mz7STJ1GANu_Q,1650
292
292
  proxyrequest_sdk/_generated/models/location_country_summary.py,sha256=V6UmxdsdOXPDFhs-TLXxTnkOx1EWX3Mqcqusjnse9yQ,1988
293
293
  proxyrequest_sdk/_generated/models/location_region_summary.py,sha256=p5OEZSGAA_w-7GuuSK82cBbkDgFkQ-GBgZKZayLUiyg,1983
@@ -579,7 +579,7 @@ proxyrequest_sdk/resources/api_keys.py,sha256=Ev516ynBWkLGXDSVeKPq7uriaKQi7uJArP
579
579
  proxyrequest_sdk/resources/authorization.py,sha256=Dh0cr64bmNQX6_WvxcfN7VEZga-vX40CS7noH8krhiY,12082
580
580
  proxyrequest_sdk/resources/coupons.py,sha256=VQuZkACtR3tealYUIXBEIvUfkKkQbCpJkIfverczAcI,21121
581
581
  proxyrequest_sdk/resources/invoices.py,sha256=fzp9ebxiHdVm9HPQMePkgnULEcGokUsxcD0npxw3In0,16142
582
- proxyrequest_sdk/resources/locations.py,sha256=snFRbYENXnjhMpJn6pS0YSMaDM1eqDtcmLRsBNf2qkA,35523
582
+ proxyrequest_sdk/resources/locations.py,sha256=47GWWxVArgJWp83Fd9eOspy5AVo8d-z1VLnoHMpixYU,35859
583
583
  proxyrequest_sdk/resources/news.py,sha256=u7a8SyG8Lg_09vUjCc01kLpv-Kcr2NS8Ie4PbhuWe0Y,3298
584
584
  proxyrequest_sdk/resources/orders.py,sha256=GPlzSpb8AGFVIo_dVvhJgcjR8HVBUqxoWlRd6kWRFpc,13841
585
585
  proxyrequest_sdk/resources/packages.py,sha256=PXoJeOf9ONZOefy3XrszPEYCQWIWDRJ_GSq4ZAfmSv0,8694
@@ -591,7 +591,7 @@ proxyrequest_sdk/resources/settings.py,sha256=VEZATzyfZnM9colaHw-YXqK5XwXF4OJmq1
591
591
  proxyrequest_sdk/resources/telegram.py,sha256=ixsPj5PJ0icKk_wgoaKbxA_DqxCuc6WABXhLlq6IUmQ,8608
592
592
  proxyrequest_sdk/resources/users.py,sha256=IuaOiXxLv8sHLaUFiTu9XDVLIMafuVlvxffRfhjuDA4,27170
593
593
  proxyrequest_sdk/resources/webhooks.py,sha256=UrqEHvO_O9k9G8N0ZP5ColZ2O5VtNjTQL6FfGpYl0ZI,9458
594
- proxyrequest_sdk-4.2.0.dist-info/METADATA,sha256=mrXOrcsMUpRjumbUM94ThsYJKTCHbp1UYZTiC2L3_Vo,14920
595
- proxyrequest_sdk-4.2.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
596
- proxyrequest_sdk-4.2.0.dist-info/licenses/LICENSE,sha256=bdsL11JcfG-rcqMzIdm-HzSwefMNqOyHXghcGIihYf8,1069
597
- proxyrequest_sdk-4.2.0.dist-info/RECORD,,
594
+ proxyrequest_sdk-4.3.0.dist-info/METADATA,sha256=8HCNj50gwi1MReDEHbeDZDCLtc6swYrZRkHe1z5rc7o,15202
595
+ proxyrequest_sdk-4.3.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
596
+ proxyrequest_sdk-4.3.0.dist-info/licenses/LICENSE,sha256=bdsL11JcfG-rcqMzIdm-HzSwefMNqOyHXghcGIihYf8,1069
597
+ proxyrequest_sdk-4.3.0.dist-info/RECORD,,