gcore 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gcore might be problematic. Click here for more details.

gcore/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "gcore"
4
- __version__ = "0.7.0" # x-release-please-version
4
+ __version__ = "0.8.0" # x-release-please-version
gcore/pagination.py CHANGED
@@ -12,8 +12,6 @@ from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage
12
12
  __all__ = [
13
13
  "SyncOffsetPage",
14
14
  "AsyncOffsetPage",
15
- "SyncOffsetPageIam",
16
- "AsyncOffsetPageIam",
17
15
  "SyncOffsetPageFastedgeApps",
18
16
  "AsyncOffsetPageFastedgeApps",
19
17
  "SyncOffsetPageFastedgeTemplates",
@@ -91,66 +89,6 @@ class AsyncOffsetPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
91
89
  return None
92
90
 
93
91
 
94
- class SyncOffsetPageIam(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
95
- result: List[_T]
96
- count: Optional[int] = None
97
-
98
- @override
99
- def _get_page_items(self) -> List[_T]:
100
- result = self.result
101
- if not result:
102
- return []
103
- return result
104
-
105
- @override
106
- def next_page_info(self) -> Optional[PageInfo]:
107
- offset = self._options.params.get("offset") or 0
108
- if not isinstance(offset, int):
109
- raise ValueError(f'Expected "offset" param to be an integer but got {offset}')
110
-
111
- length = len(self._get_page_items())
112
- current_count = offset + length
113
-
114
- count = self.count
115
- if count is None:
116
- return None
117
-
118
- if current_count < count:
119
- return PageInfo(params={"offset": current_count})
120
-
121
- return None
122
-
123
-
124
- class AsyncOffsetPageIam(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
125
- result: List[_T]
126
- count: Optional[int] = None
127
-
128
- @override
129
- def _get_page_items(self) -> List[_T]:
130
- result = self.result
131
- if not result:
132
- return []
133
- return result
134
-
135
- @override
136
- def next_page_info(self) -> Optional[PageInfo]:
137
- offset = self._options.params.get("offset") or 0
138
- if not isinstance(offset, int):
139
- raise ValueError(f'Expected "offset" param to be an integer but got {offset}')
140
-
141
- length = len(self._get_page_items())
142
- current_count = offset + length
143
-
144
- count = self.count
145
- if count is None:
146
- return None
147
-
148
- if current_count < count:
149
- return PageInfo(params={"offset": current_count})
150
-
151
- return None
152
-
153
-
154
92
  class SyncOffsetPageFastedgeApps(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
155
93
  apps: List[_T]
156
94
  count: Optional[int] = None
@@ -18,7 +18,7 @@ from ..._response import (
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
20
  from ...types.iam import user_list_params, user_invite_params, user_update_params
21
- from ...pagination import SyncOffsetPageIam, AsyncOffsetPageIam
21
+ from ...pagination import SyncOffsetPage, AsyncOffsetPage
22
22
  from ..._base_client import AsyncPaginator, make_request_options
23
23
  from ...types.iam.user import User
24
24
  from ...types.iam.user_invite import UserInvite
@@ -131,7 +131,7 @@ class UsersResource(SyncAPIResource):
131
131
  extra_query: Query | None = None,
132
132
  extra_body: Body | None = None,
133
133
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
134
- ) -> SyncOffsetPageIam[User]:
134
+ ) -> SyncOffsetPage[User]:
135
135
  """Get a list of users.
136
136
 
137
137
  Pass a value for the `limit` parameter in your request if
@@ -153,7 +153,7 @@ class UsersResource(SyncAPIResource):
153
153
  """
154
154
  return self._get_api_list(
155
155
  "/iam/users",
156
- page=SyncOffsetPageIam[User],
156
+ page=SyncOffsetPage[User],
157
157
  options=make_request_options(
158
158
  extra_headers=extra_headers,
159
159
  extra_query=extra_query,
@@ -396,7 +396,7 @@ class AsyncUsersResource(AsyncAPIResource):
396
396
  extra_query: Query | None = None,
397
397
  extra_body: Body | None = None,
398
398
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
399
- ) -> AsyncPaginator[User, AsyncOffsetPageIam[User]]:
399
+ ) -> AsyncPaginator[User, AsyncOffsetPage[User]]:
400
400
  """Get a list of users.
401
401
 
402
402
  Pass a value for the `limit` parameter in your request if
@@ -418,7 +418,7 @@ class AsyncUsersResource(AsyncAPIResource):
418
418
  """
419
419
  return self._get_api_list(
420
420
  "/iam/users",
421
- page=AsyncOffsetPageIam[User],
421
+ page=AsyncOffsetPage[User],
422
422
  options=make_request_options(
423
423
  extra_headers=extra_headers,
424
424
  extra_query=extra_query,
@@ -20,12 +20,6 @@ class FloatingIP(BaseModel):
20
20
  creator_task_id: Optional[str] = None
21
21
  """Task that created this entity"""
22
22
 
23
- dns_domain: Optional[str] = None
24
- """This field is deprecated and can be ignored"""
25
-
26
- dns_name: Optional[str] = None
27
- """This field is deprecated and can be ignored"""
28
-
29
23
  fixed_ip_address: Optional[str] = None
30
24
  """IP address of the port the floating IP is attached to"""
31
25
 
@@ -53,9 +47,6 @@ class FloatingIP(BaseModel):
53
47
  status: Optional[FloatingIPStatus] = None
54
48
  """Floating IP status"""
55
49
 
56
- subnet_id: Optional[str] = None
57
- """This field is deprecated and can be ignored"""
58
-
59
50
  tags: List[Tag]
60
51
  """List of key-value tags associated with the resource.
61
52
 
@@ -162,12 +162,6 @@ class FloatingIPDetailed(BaseModel):
162
162
  creator_task_id: Optional[str] = None
163
163
  """Task that created this entity"""
164
164
 
165
- dns_domain: Optional[str] = None
166
- """This field is deprecated and can be ignored"""
167
-
168
- dns_name: Optional[str] = None
169
- """This field is deprecated and can be ignored"""
170
-
171
165
  fixed_ip_address: Optional[str] = None
172
166
  """IP address of the port the floating IP is attached to"""
173
167
 
@@ -198,9 +192,6 @@ class FloatingIPDetailed(BaseModel):
198
192
  status: Optional[FloatingIPStatus] = None
199
193
  """Floating IP status"""
200
194
 
201
- subnet_id: Optional[str] = None
202
- """This field is deprecated and can be ignored"""
203
-
204
195
  tags: List[Tag]
205
196
  """List of key-value tags associated with the resource.
206
197
 
@@ -71,7 +71,7 @@ class Subnet(BaseModel):
71
71
  """
72
72
 
73
73
  has_router: Optional[bool] = None
74
- """Subnet has router attached to it"""
74
+ """Deprecated. Always returns `false`."""
75
75
 
76
76
  host_routes: Optional[List[Route]] = None
77
77
  """List of custom static routes to advertise via DHCP."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gcore
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: The official Python library for the gcore API
5
5
  Project-URL: Homepage, https://github.com/G-Core/gcore-python
6
6
  Project-URL: Repository, https://github.com/G-Core/gcore-python
@@ -11,8 +11,8 @@ gcore/_resource.py,sha256=wjIMnFffh-DZDdpBCgdDCdoXR2TPhpAosw7rElBSpYo,1094
11
11
  gcore/_response.py,sha256=V1N02BVR5uoyxmvzOS3O579oe_PkeA4eyM_Hzodv9EU,28782
12
12
  gcore/_streaming.py,sha256=ICh9tioDlP6Uvmis9p5Aieefqhjfhu6xLCJqDSDIqK4,10096
13
13
  gcore/_types.py,sha256=zuvjpJIwv-yunY8WsEsHlKKHTbpHeFriUoesVDk4Qbk,6196
14
- gcore/_version.py,sha256=ieMS36hoJvZoCWMs_cnzeTXjUbbTTQma4r3sf459Eu8,157
15
- gcore/pagination.py,sha256=WivhVD0eg6sEjjh57wV7CqwkI0UPtkJsOfXeYDJyZ5Q,11646
14
+ gcore/_version.py,sha256=32DTP7A92CbX_JvPbCAGgrzNrATOJ5yX3c5xj9HM_s8,157
15
+ gcore/pagination.py,sha256=vRpi4H_oQAPcGbdX7r3hpnXulNB3WQ_vqqI3mBaJHQg,9961
16
16
  gcore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  gcore/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
18
18
  gcore/_utils/_logs.py,sha256=lEywH7KTgcBPFhujlCt0ZsdLik95tvtoWa-CtXw85V4,771
@@ -120,7 +120,7 @@ gcore/resources/fastedge/apps/logs.py,sha256=VIqkuvyba0TvozVj3g0z2sJKKTOr2gpr8le
120
120
  gcore/resources/iam/__init__.py,sha256=XM8FhUWt3T0AAh8w00KZVoBWGwp_uIP0XEq09_asIZE,1440
121
121
  gcore/resources/iam/api_tokens.py,sha256=V8gWiJpyYQyln2gFKglOpOOfgBBu6hLuY7t_rZ3EaIo,19237
122
122
  gcore/resources/iam/iam.py,sha256=fjooc2jbvuBLdN6NVWJnZ8pREM60TUjtIdIXikNRwhw,7167
123
- gcore/resources/iam/users.py,sha256=H9JrqI5UcF5fnSrOV80wJYeO1Mmcy-9gVqmgwz5g98Y,23031
123
+ gcore/resources/iam/users.py,sha256=5wnKUvNWhE2dbHJ4_40LjC8cmMGYoMSfr2aax_XCp6k,23013
124
124
  gcore/resources/streaming/__init__.py,sha256=nKPOG1z1EZ6PBIvtJF2RIWuwwCpG-Yf5QNwFZINGxRs,5444
125
125
  gcore/resources/streaming/ai_tasks.py,sha256=RYB4zarK_urYoVJZ2QwXKuHG-AkM86YwKVAgNX9VQEY,57626
126
126
  gcore/resources/streaming/broadcasts.py,sha256=Df5zuE04bKuuETRZKmCGbN_Q4DSpuZ8PO3Oh0fr4VwY,22411
@@ -194,10 +194,10 @@ gcore/types/cloud/fixed_address.py,sha256=m0Igtrtmz97dw-36U3wNX2W6EfYQiBvaeM7Vue
194
194
  gcore/types/cloud/fixed_address_short.py,sha256=qGun0Ln1lKHfaE0P3xO0yfsvCMIw4rJldmUrmKvRMm0,667
195
195
  gcore/types/cloud/flavor_hardware_description.py,sha256=LkKEWoXmXNHSvGQzLwCv_lKnomos0fK3UjYfLKe5xp8,690
196
196
  gcore/types/cloud/floating_address.py,sha256=cntd-3PiECbzCWiYCdR25asaT-JleGYWVHcNxHbGcno,319
197
- gcore/types/cloud/floating_ip.py,sha256=qzr0EbyDvK1RIZQBQosHZX1KOMH2XDpj8kB_QaSz8Eg,2144
197
+ gcore/types/cloud/floating_ip.py,sha256=iQp8qUZ-9bjBlgAk6qVhrxzlLjK1LjBhhmCpBhjdc0Q,1871
198
198
  gcore/types/cloud/floating_ip_assign_params.py,sha256=8wwzcDjEkCNUv_768TIrYoMBwiHOeASpFcs2qOhzlaA,445
199
199
  gcore/types/cloud/floating_ip_create_params.py,sha256=zXZZ34RnTi_u_ctBxx-dnUoOHpUfShh5lUyQ8LPSQB8,1153
200
- gcore/types/cloud/floating_ip_detailed.py,sha256=fcj7IGUBiksyuVDa_OOfreWjJEtZ1mwktPhEoe_FlXg,5528
200
+ gcore/types/cloud/floating_ip_detailed.py,sha256=-3oLO53H9FGLr37WRXNRi2wp46KPCQT6Zt4o04CVmAo,5255
201
201
  gcore/types/cloud/floating_ip_list_params.py,sha256=Z_A17ki_sxxymffBvKNVkMvsHuo_68TRXxm7mEwAfuo,719
202
202
  gcore/types/cloud/floating_ip_status.py,sha256=5y_NNeP--pgXhI5GI0NuTySQZen5CK2GRLv0djI84f0,234
203
203
  gcore/types/cloud/gpu_baremetal_cluster.py,sha256=hSuPMDXGsUR497cP5qPugO5KMhcffrlx8xq0mQV06ew,3027
@@ -320,7 +320,7 @@ gcore/types/cloud/ssh_key_create_params.py,sha256=xZopfP9LhBQaXuJJcYss67GHpXe8Rt
320
320
  gcore/types/cloud/ssh_key_created.py,sha256=HiFJN6DJg44LLjQp2iA_bZG0FaT0UX1l-buCphoal-g,1502
321
321
  gcore/types/cloud/ssh_key_list_params.py,sha256=3n92oef9NX8CdFy_gGFFz5ESzzKob1als2zN3X1o3KI,530
322
322
  gcore/types/cloud/ssh_key_update_params.py,sha256=50fEtF-ArYDgoRT-_LYj8ZnMbnhKSkI0k_XdGeyJTK4,398
323
- gcore/types/cloud/subnet.py,sha256=t8U5ejaxL8FqL1cDi7SbQ6jBHhMgCOrpvYekX03_SD4,2253
323
+ gcore/types/cloud/subnet.py,sha256=L-f5gBML-WfGEvZQlG3qsAqt-NPw1dm1aZLWMZQAz4I,2256
324
324
  gcore/types/cloud/tag.py,sha256=p3Nk2KJa9pqeymhqvma16FBNYZT08U9Wo2aAi2OwJgY,413
325
325
  gcore/types/cloud/tag_update_map_param.py,sha256=AdmtYc6NTkCo4hNCKkYCNNA8pr1w1GWGOPWdKRmy614,287
326
326
  gcore/types/cloud/task.py,sha256=lqbjhC93rs4MBO8D_o1RllMH6UlHMbCZVGJnS2hzxNw,4936
@@ -787,7 +787,7 @@ gcore/types/waap/domains/api_discovery/__init__.py,sha256=6gvnvRbTHK16q0svXoe7BF
787
787
  gcore/types/waap/domains/api_discovery/scan_result_get_response.py,sha256=vQNdPURnTMklwljjF9XBxr-JvOTYpNPxQ8aNJWSBEuU,791
788
788
  gcore/types/waap/domains/api_discovery/scan_result_list_params.py,sha256=HAZ8uLzbdO_pDUJ5rDxazbeEU5t2BOAfaRIQX8vvnl4,1062
789
789
  gcore/types/waap/domains/api_discovery/scan_result_list_response.py,sha256=-io6EFtB4U7Qz_La5Fhm1lMmqS8I0UthJyVOLYxpLnY,793
790
- gcore-0.7.0.dist-info/METADATA,sha256=Z1CeUgVbUt5YRQPk4itZIfyDDAf8e42JbSK9mSfI9C0,15908
791
- gcore-0.7.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
792
- gcore-0.7.0.dist-info/licenses/LICENSE,sha256=2pZguB1aJ1XYFdGBG1gSFtWegXINirA9gVU0ouDbP_s,11335
793
- gcore-0.7.0.dist-info/RECORD,,
790
+ gcore-0.8.0.dist-info/METADATA,sha256=GosFzU6xRSLn7IMJk_RRk5nWaOG3WtlbnE_IdrpAjLQ,15908
791
+ gcore-0.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
792
+ gcore-0.8.0.dist-info/licenses/LICENSE,sha256=2pZguB1aJ1XYFdGBG1gSFtWegXINirA9gVU0ouDbP_s,11335
793
+ gcore-0.8.0.dist-info/RECORD,,
File without changes