gcore 0.1.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.

Files changed (437) hide show
  1. gcore/__init__.py +89 -0
  2. gcore/_base_client.py +1943 -0
  3. gcore/_client.py +493 -0
  4. gcore/_compat.py +219 -0
  5. gcore/_constants.py +16 -0
  6. gcore/_exceptions.py +108 -0
  7. gcore/_files.py +123 -0
  8. gcore/_models.py +803 -0
  9. gcore/_qs.py +150 -0
  10. gcore/_resource.py +43 -0
  11. gcore/_response.py +830 -0
  12. gcore/_streaming.py +333 -0
  13. gcore/_types.py +217 -0
  14. gcore/_utils/__init__.py +57 -0
  15. gcore/_utils/_logs.py +25 -0
  16. gcore/_utils/_proxy.py +65 -0
  17. gcore/_utils/_reflection.py +42 -0
  18. gcore/_utils/_resources_proxy.py +24 -0
  19. gcore/_utils/_streams.py +12 -0
  20. gcore/_utils/_sync.py +86 -0
  21. gcore/_utils/_transform.py +447 -0
  22. gcore/_utils/_typing.py +151 -0
  23. gcore/_utils/_utils.py +422 -0
  24. gcore/_version.py +4 -0
  25. gcore/lib/.keep +4 -0
  26. gcore/lib/polling.py +19 -0
  27. gcore/pagination.py +70 -0
  28. gcore/py.typed +0 -0
  29. gcore/resources/__init__.py +33 -0
  30. gcore/resources/cloud/__init__.py +327 -0
  31. gcore/resources/cloud/baremetal/__init__.py +61 -0
  32. gcore/resources/cloud/baremetal/baremetal.py +166 -0
  33. gcore/resources/cloud/baremetal/flavors.py +371 -0
  34. gcore/resources/cloud/baremetal/images.py +238 -0
  35. gcore/resources/cloud/baremetal/servers.py +1042 -0
  36. gcore/resources/cloud/billing_reservations.py +386 -0
  37. gcore/resources/cloud/cloud.py +774 -0
  38. gcore/resources/cloud/file_shares/__init__.py +33 -0
  39. gcore/resources/cloud/file_shares/access_rules.py +434 -0
  40. gcore/resources/cloud/file_shares/file_shares.py +994 -0
  41. gcore/resources/cloud/floating_ips.py +765 -0
  42. gcore/resources/cloud/gpu_baremetal_clusters/__init__.py +75 -0
  43. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +211 -0
  44. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +1493 -0
  45. gcore/resources/cloud/gpu_baremetal_clusters/images.py +785 -0
  46. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +175 -0
  47. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +1178 -0
  48. gcore/resources/cloud/inference/__init__.py +89 -0
  49. gcore/resources/cloud/inference/deployments/__init__.py +33 -0
  50. gcore/resources/cloud/inference/deployments/deployments.py +1493 -0
  51. gcore/resources/cloud/inference/deployments/logs.py +235 -0
  52. gcore/resources/cloud/inference/flavors.py +280 -0
  53. gcore/resources/cloud/inference/inference.py +295 -0
  54. gcore/resources/cloud/inference/models.py +289 -0
  55. gcore/resources/cloud/inference/registry_credentials.py +649 -0
  56. gcore/resources/cloud/inference/secrets.py +629 -0
  57. gcore/resources/cloud/instances/__init__.py +75 -0
  58. gcore/resources/cloud/instances/flavors.py +449 -0
  59. gcore/resources/cloud/instances/images.py +1297 -0
  60. gcore/resources/cloud/instances/instances.py +2821 -0
  61. gcore/resources/cloud/instances/interfaces.py +797 -0
  62. gcore/resources/cloud/instances/metrics.py +217 -0
  63. gcore/resources/cloud/ip_ranges.py +135 -0
  64. gcore/resources/cloud/load_balancers/__init__.py +103 -0
  65. gcore/resources/cloud/load_balancers/flavors.py +193 -0
  66. gcore/resources/cloud/load_balancers/l7_policies/__init__.py +33 -0
  67. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +1020 -0
  68. gcore/resources/cloud/load_balancers/l7_policies/rules.py +1036 -0
  69. gcore/resources/cloud/load_balancers/listeners.py +1089 -0
  70. gcore/resources/cloud/load_balancers/load_balancers.py +1583 -0
  71. gcore/resources/cloud/load_balancers/metrics.py +205 -0
  72. gcore/resources/cloud/load_balancers/pools/__init__.py +47 -0
  73. gcore/resources/cloud/load_balancers/pools/health_monitors.py +352 -0
  74. gcore/resources/cloud/load_balancers/pools/members.py +353 -0
  75. gcore/resources/cloud/load_balancers/pools/pools.py +1190 -0
  76. gcore/resources/cloud/load_balancers/statuses.py +260 -0
  77. gcore/resources/cloud/networks/__init__.py +47 -0
  78. gcore/resources/cloud/networks/networks.py +771 -0
  79. gcore/resources/cloud/networks/routers.py +875 -0
  80. gcore/resources/cloud/networks/subnets.py +865 -0
  81. gcore/resources/cloud/placement_groups.py +465 -0
  82. gcore/resources/cloud/projects.py +608 -0
  83. gcore/resources/cloud/quotas/__init__.py +33 -0
  84. gcore/resources/cloud/quotas/quotas.py +335 -0
  85. gcore/resources/cloud/quotas/requests.py +482 -0
  86. gcore/resources/cloud/regions.py +328 -0
  87. gcore/resources/cloud/registries/__init__.py +75 -0
  88. gcore/resources/cloud/registries/artifacts.py +277 -0
  89. gcore/resources/cloud/registries/registries.py +688 -0
  90. gcore/resources/cloud/registries/repositories.py +265 -0
  91. gcore/resources/cloud/registries/tags.py +190 -0
  92. gcore/resources/cloud/registries/users.py +701 -0
  93. gcore/resources/cloud/reserved_fixed_ips/__init__.py +33 -0
  94. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +965 -0
  95. gcore/resources/cloud/reserved_fixed_ips/vip.py +577 -0
  96. gcore/resources/cloud/secrets.py +797 -0
  97. gcore/resources/cloud/security_groups/__init__.py +33 -0
  98. gcore/resources/cloud/security_groups/rules.py +626 -0
  99. gcore/resources/cloud/security_groups/security_groups.py +863 -0
  100. gcore/resources/cloud/ssh_keys.py +635 -0
  101. gcore/resources/cloud/tasks.py +700 -0
  102. gcore/resources/cloud/users/__init__.py +33 -0
  103. gcore/resources/cloud/users/role_assignments.py +533 -0
  104. gcore/resources/cloud/users/users.py +102 -0
  105. gcore/resources/cloud/volumes.py +1710 -0
  106. gcore/resources/waap/__init__.py +33 -0
  107. gcore/resources/waap/domains/__init__.py +33 -0
  108. gcore/resources/waap/domains/domains.py +515 -0
  109. gcore/resources/waap/domains/settings.py +271 -0
  110. gcore/resources/waap/waap.py +102 -0
  111. gcore/types/__init__.py +3 -0
  112. gcore/types/cloud/__init__.py +199 -0
  113. gcore/types/cloud/allowed_address_pairs.py +15 -0
  114. gcore/types/cloud/aws_iam_data.py +13 -0
  115. gcore/types/cloud/aws_iam_data_param.py +15 -0
  116. gcore/types/cloud/baremetal/__init__.py +13 -0
  117. gcore/types/cloud/baremetal/baremetal_fixed_address.py +30 -0
  118. gcore/types/cloud/baremetal/baremetal_floating_address.py +15 -0
  119. gcore/types/cloud/baremetal/baremetal_server.py +178 -0
  120. gcore/types/cloud/baremetal/flavor_list_params.py +35 -0
  121. gcore/types/cloud/baremetal/flavor_list_suitable_params.py +22 -0
  122. gcore/types/cloud/baremetal/image_list_params.py +33 -0
  123. gcore/types/cloud/baremetal/server_create_params.py +370 -0
  124. gcore/types/cloud/baremetal/server_list_params.py +114 -0
  125. gcore/types/cloud/baremetal/server_rebuild_params.py +23 -0
  126. gcore/types/cloud/baremetal_flavor.py +58 -0
  127. gcore/types/cloud/baremetal_flavor_list.py +16 -0
  128. gcore/types/cloud/billing_reservation.py +153 -0
  129. gcore/types/cloud/billing_reservation_list_params.py +59 -0
  130. gcore/types/cloud/blackhole_port.py +66 -0
  131. gcore/types/cloud/capacity.py +13 -0
  132. gcore/types/cloud/console.py +18 -0
  133. gcore/types/cloud/container_probe.py +36 -0
  134. gcore/types/cloud/container_probe_config.py +16 -0
  135. gcore/types/cloud/container_probe_config_create_param.py +18 -0
  136. gcore/types/cloud/container_probe_create_param.py +38 -0
  137. gcore/types/cloud/container_probe_exec.py +12 -0
  138. gcore/types/cloud/container_probe_exec_create_param.py +13 -0
  139. gcore/types/cloud/container_probe_http_get.py +26 -0
  140. gcore/types/cloud/container_probe_http_get_create_param.py +25 -0
  141. gcore/types/cloud/container_probe_tcp_socket.py +10 -0
  142. gcore/types/cloud/container_probe_tcp_socket_create_param.py +12 -0
  143. gcore/types/cloud/container_scale.py +25 -0
  144. gcore/types/cloud/container_scale_trigger_rate.py +13 -0
  145. gcore/types/cloud/container_scale_trigger_sqs.py +33 -0
  146. gcore/types/cloud/container_scale_trigger_threshold.py +10 -0
  147. gcore/types/cloud/container_scale_triggers.py +36 -0
  148. gcore/types/cloud/ddos_profile.py +33 -0
  149. gcore/types/cloud/ddos_profile_field.py +31 -0
  150. gcore/types/cloud/ddos_profile_option_list.py +15 -0
  151. gcore/types/cloud/ddos_profile_status.py +13 -0
  152. gcore/types/cloud/ddos_profile_template.py +18 -0
  153. gcore/types/cloud/ddos_profile_template_field.py +23 -0
  154. gcore/types/cloud/deploy_status.py +13 -0
  155. gcore/types/cloud/file_share.py +111 -0
  156. gcore/types/cloud/file_share_create_params.py +104 -0
  157. gcore/types/cloud/file_share_list_params.py +24 -0
  158. gcore/types/cloud/file_share_resize_params.py +18 -0
  159. gcore/types/cloud/file_share_update_params.py +18 -0
  160. gcore/types/cloud/file_shares/__init__.py +7 -0
  161. gcore/types/cloud/file_shares/access_rule.py +21 -0
  162. gcore/types/cloud/file_shares/access_rule_create_params.py +21 -0
  163. gcore/types/cloud/file_shares/access_rule_list.py +16 -0
  164. gcore/types/cloud/fixed_address.py +38 -0
  165. gcore/types/cloud/fixed_address_short.py +24 -0
  166. gcore/types/cloud/flavor_hardware_description.py +27 -0
  167. gcore/types/cloud/floating_address.py +15 -0
  168. gcore/types/cloud/floating_ip.py +77 -0
  169. gcore/types/cloud/floating_ip_assign_params.py +20 -0
  170. gcore/types/cloud/floating_ip_create_params.py +40 -0
  171. gcore/types/cloud/floating_ip_detailed.py +222 -0
  172. gcore/types/cloud/floating_ip_list_params.py +35 -0
  173. gcore/types/cloud/floating_ip_status.py +7 -0
  174. gcore/types/cloud/gpu_baremetal_cluster.py +116 -0
  175. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +155 -0
  176. gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +28 -0
  177. gcore/types/cloud/gpu_baremetal_cluster_list_params.py +19 -0
  178. gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +26 -0
  179. gcore/types/cloud/gpu_baremetal_cluster_resize_params.py +16 -0
  180. gcore/types/cloud/gpu_baremetal_cluster_server.py +200 -0
  181. gcore/types/cloud/gpu_baremetal_cluster_server_list.py +16 -0
  182. gcore/types/cloud/gpu_baremetal_clusters/__init__.py +9 -0
  183. gcore/types/cloud/gpu_baremetal_clusters/flavor_list_params.py +21 -0
  184. gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +58 -0
  185. gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +253 -0
  186. gcore/types/cloud/gpu_baremetal_clusters/server_delete_params.py +21 -0
  187. gcore/types/cloud/gpu_baremetal_clusters/server_detach_interface_params.py +19 -0
  188. gcore/types/cloud/gpu_baremetal_flavor.py +133 -0
  189. gcore/types/cloud/gpu_baremetal_flavor_list.py +16 -0
  190. gcore/types/cloud/gpu_image.py +70 -0
  191. gcore/types/cloud/gpu_image_list.py +16 -0
  192. gcore/types/cloud/health_monitor.py +48 -0
  193. gcore/types/cloud/health_monitor_status.py +22 -0
  194. gcore/types/cloud/http_method.py +7 -0
  195. gcore/types/cloud/image.py +100 -0
  196. gcore/types/cloud/image_list.py +16 -0
  197. gcore/types/cloud/inference/__init__.py +25 -0
  198. gcore/types/cloud/inference/container.py +26 -0
  199. gcore/types/cloud/inference/deployment_create_params.py +222 -0
  200. gcore/types/cloud/inference/deployment_list_params.py +21 -0
  201. gcore/types/cloud/inference/deployment_update_params.py +215 -0
  202. gcore/types/cloud/inference/deployments/__init__.py +5 -0
  203. gcore/types/cloud/inference/deployments/log_list_params.py +28 -0
  204. gcore/types/cloud/inference/flavor_list_params.py +18 -0
  205. gcore/types/cloud/inference/inference.py +95 -0
  206. gcore/types/cloud/inference/inference_apikey_secret.py +15 -0
  207. gcore/types/cloud/inference/inference_flavor.py +34 -0
  208. gcore/types/cloud/inference/inference_log.py +21 -0
  209. gcore/types/cloud/inference/inference_registry_credential.py +19 -0
  210. gcore/types/cloud/inference/inference_registry_credential_full.py +22 -0
  211. gcore/types/cloud/inference/inference_secret.py +17 -0
  212. gcore/types/cloud/inference/mlcatalog_model_card.py +65 -0
  213. gcore/types/cloud/inference/mlcatalog_order_by_choices.py +7 -0
  214. gcore/types/cloud/inference/model_list_params.py +23 -0
  215. gcore/types/cloud/inference/registry_credential_create_params.py +24 -0
  216. gcore/types/cloud/inference/registry_credential_list_params.py +21 -0
  217. gcore/types/cloud/inference/registry_credential_replace_params.py +21 -0
  218. gcore/types/cloud/inference/secret_create_params.py +23 -0
  219. gcore/types/cloud/inference/secret_list_params.py +21 -0
  220. gcore/types/cloud/inference/secret_replace_params.py +20 -0
  221. gcore/types/cloud/inference_probes.py +19 -0
  222. gcore/types/cloud/ingress_opts_out.py +16 -0
  223. gcore/types/cloud/ingress_opts_param.py +18 -0
  224. gcore/types/cloud/instance.py +296 -0
  225. gcore/types/cloud/instance_action_params.py +32 -0
  226. gcore/types/cloud/instance_add_to_placement_group_params.py +16 -0
  227. gcore/types/cloud/instance_assign_security_group_params.py +28 -0
  228. gcore/types/cloud/instance_create_params.py +622 -0
  229. gcore/types/cloud/instance_delete_params.py +33 -0
  230. gcore/types/cloud/instance_get_console_params.py +16 -0
  231. gcore/types/cloud/instance_interface.py +40 -0
  232. gcore/types/cloud/instance_isolation.py +12 -0
  233. gcore/types/cloud/instance_list.py +16 -0
  234. gcore/types/cloud/instance_list_params.py +146 -0
  235. gcore/types/cloud/instance_metrics_time_unit.py +7 -0
  236. gcore/types/cloud/instance_resize_params.py +16 -0
  237. gcore/types/cloud/instance_unassign_security_group_params.py +28 -0
  238. gcore/types/cloud/instance_update_params.py +18 -0
  239. gcore/types/cloud/instances/__init__.py +19 -0
  240. gcore/types/cloud/instances/flavor_list_for_resize_params.py +16 -0
  241. gcore/types/cloud/instances/flavor_list_params.py +25 -0
  242. gcore/types/cloud/instances/flavor_list_suitable_params.py +56 -0
  243. gcore/types/cloud/instances/image_create_from_volume_params.py +53 -0
  244. gcore/types/cloud/instances/image_get_params.py +16 -0
  245. gcore/types/cloud/instances/image_list_params.py +33 -0
  246. gcore/types/cloud/instances/image_update_params.py +43 -0
  247. gcore/types/cloud/instances/image_upload_params.py +62 -0
  248. gcore/types/cloud/instances/instance_flavor.py +49 -0
  249. gcore/types/cloud/instances/instance_flavor_list.py +16 -0
  250. gcore/types/cloud/instances/interface_attach_params.py +253 -0
  251. gcore/types/cloud/instances/interface_detach_params.py +19 -0
  252. gcore/types/cloud/instances/metric_list_params.py +23 -0
  253. gcore/types/cloud/instances/metrics.py +52 -0
  254. gcore/types/cloud/instances/metrics_list.py +16 -0
  255. gcore/types/cloud/interface_ip_family.py +7 -0
  256. gcore/types/cloud/ip_assignment.py +13 -0
  257. gcore/types/cloud/ip_ranges.py +12 -0
  258. gcore/types/cloud/ip_version.py +7 -0
  259. gcore/types/cloud/laas_index_retention_policy.py +12 -0
  260. gcore/types/cloud/laas_index_retention_policy_param.py +13 -0
  261. gcore/types/cloud/lb_algorithm.py +7 -0
  262. gcore/types/cloud/lb_health_monitor_type.py +7 -0
  263. gcore/types/cloud/lb_listener_protocol.py +7 -0
  264. gcore/types/cloud/lb_pool_protocol.py +7 -0
  265. gcore/types/cloud/lb_session_persistence_type.py +7 -0
  266. gcore/types/cloud/listener_status.py +27 -0
  267. gcore/types/cloud/load_balancer.py +144 -0
  268. gcore/types/cloud/load_balancer_create_params.py +327 -0
  269. gcore/types/cloud/load_balancer_failover_params.py +16 -0
  270. gcore/types/cloud/load_balancer_flavor_detail.py +40 -0
  271. gcore/types/cloud/load_balancer_flavor_list.py +16 -0
  272. gcore/types/cloud/load_balancer_get_params.py +19 -0
  273. gcore/types/cloud/load_balancer_instance_role.py +7 -0
  274. gcore/types/cloud/load_balancer_l7_policy.py +86 -0
  275. gcore/types/cloud/load_balancer_l7_policy_list.py +16 -0
  276. gcore/types/cloud/load_balancer_l7_rule.py +72 -0
  277. gcore/types/cloud/load_balancer_l7_rule_list.py +16 -0
  278. gcore/types/cloud/load_balancer_list_params.py +53 -0
  279. gcore/types/cloud/load_balancer_listener_detail.py +97 -0
  280. gcore/types/cloud/load_balancer_listener_list.py +16 -0
  281. gcore/types/cloud/load_balancer_member_connectivity.py +7 -0
  282. gcore/types/cloud/load_balancer_metrics.py +32 -0
  283. gcore/types/cloud/load_balancer_metrics_list.py +16 -0
  284. gcore/types/cloud/load_balancer_operating_status.py +7 -0
  285. gcore/types/cloud/load_balancer_pool.py +87 -0
  286. gcore/types/cloud/load_balancer_pool_list.py +16 -0
  287. gcore/types/cloud/load_balancer_resize_params.py +16 -0
  288. gcore/types/cloud/load_balancer_statistics.py +22 -0
  289. gcore/types/cloud/load_balancer_status.py +38 -0
  290. gcore/types/cloud/load_balancer_status_list.py +16 -0
  291. gcore/types/cloud/load_balancer_update_params.py +43 -0
  292. gcore/types/cloud/load_balancers/__init__.py +15 -0
  293. gcore/types/cloud/load_balancers/flavor_list_params.py +16 -0
  294. gcore/types/cloud/load_balancers/l7_policies/__init__.py +6 -0
  295. gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +50 -0
  296. gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +43 -0
  297. gcore/types/cloud/load_balancers/l7_policy_create_params.py +54 -0
  298. gcore/types/cloud/load_balancers/l7_policy_replace_params.py +51 -0
  299. gcore/types/cloud/load_balancers/listener_create_params.py +72 -0
  300. gcore/types/cloud/load_balancers/listener_get_params.py +16 -0
  301. gcore/types/cloud/load_balancers/listener_list_params.py +19 -0
  302. gcore/types/cloud/load_balancers/listener_update_params.py +55 -0
  303. gcore/types/cloud/load_balancers/metric_list_params.py +21 -0
  304. gcore/types/cloud/load_balancers/pool_create_params.py +141 -0
  305. gcore/types/cloud/load_balancers/pool_list_params.py +25 -0
  306. gcore/types/cloud/load_balancers/pool_update_params.py +139 -0
  307. gcore/types/cloud/load_balancers/pools/__init__.py +6 -0
  308. gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +49 -0
  309. gcore/types/cloud/load_balancers/pools/member_add_params.py +44 -0
  310. gcore/types/cloud/logging.py +22 -0
  311. gcore/types/cloud/member.py +47 -0
  312. gcore/types/cloud/member_status.py +24 -0
  313. gcore/types/cloud/network.py +79 -0
  314. gcore/types/cloud/network_create_params.py +36 -0
  315. gcore/types/cloud/network_details.py +80 -0
  316. gcore/types/cloud/network_interface.py +78 -0
  317. gcore/types/cloud/network_interface_list.py +16 -0
  318. gcore/types/cloud/network_list_params.py +41 -0
  319. gcore/types/cloud/network_update_params.py +18 -0
  320. gcore/types/cloud/networks/__init__.py +14 -0
  321. gcore/types/cloud/networks/router.py +83 -0
  322. gcore/types/cloud/networks/router_attach_subnet_params.py +24 -0
  323. gcore/types/cloud/networks/router_create_params.py +75 -0
  324. gcore/types/cloud/networks/router_detach_subnet_params.py +16 -0
  325. gcore/types/cloud/networks/router_list.py +16 -0
  326. gcore/types/cloud/networks/router_list_params.py +19 -0
  327. gcore/types/cloud/networks/router_update_params.py +45 -0
  328. gcore/types/cloud/networks/subnet_create_params.py +82 -0
  329. gcore/types/cloud/networks/subnet_list_params.py +58 -0
  330. gcore/types/cloud/networks/subnet_update_params.py +47 -0
  331. gcore/types/cloud/placement_group.py +41 -0
  332. gcore/types/cloud/placement_group_create_params.py +19 -0
  333. gcore/types/cloud/placement_group_list.py +16 -0
  334. gcore/types/cloud/pool_status.py +31 -0
  335. gcore/types/cloud/project.py +47 -0
  336. gcore/types/cloud/project_create_params.py +22 -0
  337. gcore/types/cloud/project_list_params.py +27 -0
  338. gcore/types/cloud/project_replace_params.py +18 -0
  339. gcore/types/cloud/provisioning_status.py +9 -0
  340. gcore/types/cloud/quota_get_all_response.py +340 -0
  341. gcore/types/cloud/quota_get_by_region_response.py +288 -0
  342. gcore/types/cloud/quota_get_global_response.py +51 -0
  343. gcore/types/cloud/quotas/__init__.py +8 -0
  344. gcore/types/cloud/quotas/request_create_params.py +193 -0
  345. gcore/types/cloud/quotas/request_get_response.py +205 -0
  346. gcore/types/cloud/quotas/request_list_params.py +22 -0
  347. gcore/types/cloud/quotas/request_list_response.py +205 -0
  348. gcore/types/cloud/region.py +101 -0
  349. gcore/types/cloud/region_capacity.py +16 -0
  350. gcore/types/cloud/region_capacity_list.py +16 -0
  351. gcore/types/cloud/region_get_params.py +18 -0
  352. gcore/types/cloud/region_list_params.py +31 -0
  353. gcore/types/cloud/registries/__init__.py +14 -0
  354. gcore/types/cloud/registries/registry_artifact.py +35 -0
  355. gcore/types/cloud/registries/registry_artifact_list.py +16 -0
  356. gcore/types/cloud/registries/registry_repository.py +30 -0
  357. gcore/types/cloud/registries/registry_repository_list.py +16 -0
  358. gcore/types/cloud/registries/registry_user.py +28 -0
  359. gcore/types/cloud/registries/registry_user_created.py +31 -0
  360. gcore/types/cloud/registries/registry_user_list.py +16 -0
  361. gcore/types/cloud/registries/user_create_multiple_params.py +36 -0
  362. gcore/types/cloud/registries/user_create_params.py +30 -0
  363. gcore/types/cloud/registries/user_update_params.py +21 -0
  364. gcore/types/cloud/registry.py +33 -0
  365. gcore/types/cloud/registry_create_params.py +24 -0
  366. gcore/types/cloud/registry_list.py +16 -0
  367. gcore/types/cloud/registry_resize_params.py +16 -0
  368. gcore/types/cloud/registry_tag.py +27 -0
  369. gcore/types/cloud/reserved_fixed_ip.py +98 -0
  370. gcore/types/cloud/reserved_fixed_ip_create_params.py +107 -0
  371. gcore/types/cloud/reserved_fixed_ip_list_params.py +47 -0
  372. gcore/types/cloud/reserved_fixed_ips/__init__.py +12 -0
  373. gcore/types/cloud/reserved_fixed_ips/candidate_port.py +26 -0
  374. gcore/types/cloud/reserved_fixed_ips/candidate_port_list.py +16 -0
  375. gcore/types/cloud/reserved_fixed_ips/connected_port.py +26 -0
  376. gcore/types/cloud/reserved_fixed_ips/connected_port_list.py +16 -0
  377. gcore/types/cloud/reserved_fixed_ips/ip_with_subnet.py +17 -0
  378. gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +17 -0
  379. gcore/types/cloud/reserved_fixed_ips/vip_toggle_params.py +16 -0
  380. gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +17 -0
  381. gcore/types/cloud/route.py +16 -0
  382. gcore/types/cloud/secret.py +64 -0
  383. gcore/types/cloud/secret_create_params.py +66 -0
  384. gcore/types/cloud/secret_list_response.py +16 -0
  385. gcore/types/cloud/secret_upload_tls_certificate_params.py +39 -0
  386. gcore/types/cloud/security_group.py +45 -0
  387. gcore/types/cloud/security_group_copy_params.py +16 -0
  388. gcore/types/cloud/security_group_create_params.py +94 -0
  389. gcore/types/cloud/security_group_list_params.py +30 -0
  390. gcore/types/cloud/security_group_rule.py +83 -0
  391. gcore/types/cloud/security_group_update_params.py +83 -0
  392. gcore/types/cloud/security_groups/__init__.py +6 -0
  393. gcore/types/cloud/security_groups/rule_create_params.py +65 -0
  394. gcore/types/cloud/security_groups/rule_replace_params.py +72 -0
  395. gcore/types/cloud/session_persistence.py +22 -0
  396. gcore/types/cloud/ssh_key.py +39 -0
  397. gcore/types/cloud/ssh_key_create_params.py +31 -0
  398. gcore/types/cloud/ssh_key_created.py +53 -0
  399. gcore/types/cloud/ssh_key_list_params.py +21 -0
  400. gcore/types/cloud/ssh_key_update_params.py +15 -0
  401. gcore/types/cloud/subnet.py +87 -0
  402. gcore/types/cloud/tag.py +16 -0
  403. gcore/types/cloud/tag_update_map_param.py +10 -0
  404. gcore/types/cloud/task.py +191 -0
  405. gcore/types/cloud/task_acknowledge_all_params.py +16 -0
  406. gcore/types/cloud/task_id_list.py +12 -0
  407. gcore/types/cloud/task_list_params.py +104 -0
  408. gcore/types/cloud/users/__init__.py +9 -0
  409. gcore/types/cloud/users/role_assignment.py +33 -0
  410. gcore/types/cloud/users/role_assignment_create_params.py +22 -0
  411. gcore/types/cloud/users/role_assignment_list_params.py +25 -0
  412. gcore/types/cloud/users/role_assignment_update_delete.py +10 -0
  413. gcore/types/cloud/users/role_assignment_update_params.py +22 -0
  414. gcore/types/cloud/volume.py +141 -0
  415. gcore/types/cloud/volume_attach_to_instance_params.py +21 -0
  416. gcore/types/cloud/volume_change_type_params.py +18 -0
  417. gcore/types/cloud/volume_create_params.py +176 -0
  418. gcore/types/cloud/volume_delete_params.py +18 -0
  419. gcore/types/cloud/volume_detach_from_instance_params.py +18 -0
  420. gcore/types/cloud/volume_list_params.py +56 -0
  421. gcore/types/cloud/volume_resize_params.py +18 -0
  422. gcore/types/cloud/volume_update_params.py +18 -0
  423. gcore/types/waap/__init__.py +12 -0
  424. gcore/types/waap/domain_list_params.py +30 -0
  425. gcore/types/waap/domain_update_params.py +12 -0
  426. gcore/types/waap/domains/__init__.py +5 -0
  427. gcore/types/waap/domains/setting_update_params.py +41 -0
  428. gcore/types/waap/waap_api_urls.py +15 -0
  429. gcore/types/waap/waap_detailed_domain.py +37 -0
  430. gcore/types/waap/waap_domain_ddos_settings.py +31 -0
  431. gcore/types/waap/waap_domain_settings.py +15 -0
  432. gcore/types/waap/waap_domain_status.py +7 -0
  433. gcore/types/waap/waap_summary_domain.py +26 -0
  434. gcore-0.1.0.dist-info/METADATA +482 -0
  435. gcore-0.1.0.dist-info/RECORD +437 -0
  436. gcore-0.1.0.dist-info/WHEEL +4 -0
  437. gcore-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from ..._models import BaseModel
4
+ from .waap_api_urls import WaapAPIURLs
5
+ from .waap_domain_ddos_settings import WaapDomainDDOSSettings
6
+
7
+ __all__ = ["WaapDomainSettings"]
8
+
9
+
10
+ class WaapDomainSettings(BaseModel):
11
+ api: WaapAPIURLs
12
+ """API settings of a domain"""
13
+
14
+ ddos: WaapDomainDDOSSettings
15
+ """DDoS settings for a domain."""
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["WaapDomainStatus"]
6
+
7
+ WaapDomainStatus: TypeAlias = Literal["active", "bypass", "monitor", "locked"]
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+
6
+ from ..._models import BaseModel
7
+ from .waap_domain_status import WaapDomainStatus
8
+
9
+ __all__ = ["WaapSummaryDomain"]
10
+
11
+
12
+ class WaapSummaryDomain(BaseModel):
13
+ id: int
14
+ """The domain ID"""
15
+
16
+ created_at: datetime
17
+ """The date and time the domain was created in ISO 8601 format"""
18
+
19
+ custom_page_set: Optional[int] = None
20
+ """The ID of the custom page set"""
21
+
22
+ name: str
23
+ """The domain name"""
24
+
25
+ status: WaapDomainStatus
26
+ """The different statuses a domain can have"""
@@ -0,0 +1,482 @@
1
+ Metadata-Version: 2.3
2
+ Name: gcore
3
+ Version: 0.1.0
4
+ Summary: The official Python library for the gcore API
5
+ Project-URL: Homepage, https://github.com/G-Core/gcore-python
6
+ Project-URL: Repository, https://github.com/G-Core/gcore-python
7
+ Author-email: Gcore <support@gcore.com>
8
+ License: Apache-2.0
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Operating System :: Microsoft :: Windows
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.8
24
+ Requires-Dist: anyio<5,>=3.5.0
25
+ Requires-Dist: distro<2,>=1.7.0
26
+ Requires-Dist: httpx<1,>=0.23.0
27
+ Requires-Dist: pydantic<3,>=1.9.0
28
+ Requires-Dist: sniffio
29
+ Requires-Dist: typing-extensions<5,>=4.10
30
+ Description-Content-Type: text/markdown
31
+
32
+ # Gcore Python API library
33
+
34
+ [![PyPI version](https://img.shields.io/pypi/v/gcore.svg)](https://pypi.org/project/gcore/)
35
+
36
+ The Gcore Python library provides convenient access to the Gcore REST API from any Python 3.8+
37
+ application. The library includes type definitions for all request params and response fields,
38
+ and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
39
+
40
+ It is generated with [Stainless](https://www.stainless.com/).
41
+
42
+ ## Documentation
43
+
44
+ The REST API documentation can be found on [api.gcore.com](https://api.gcore.com/docs). The full API of this library can be found in [api.md](https://github.com/G-Core/gcore-python/tree/main/api.md).
45
+
46
+ ## Installation
47
+
48
+ ```sh
49
+ # install from PyPI
50
+ pip install gcore
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ The full API of this library can be found in [api.md](https://github.com/G-Core/gcore-python/tree/main/api.md).
56
+
57
+ ```python
58
+ import os
59
+ from gcore import Gcore
60
+
61
+ client = Gcore(
62
+ api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
63
+ )
64
+
65
+ project = client.cloud.projects.create(
66
+ name="New Project",
67
+ )
68
+ print(project.id)
69
+ ```
70
+
71
+ While you can provide an `api_key` keyword argument,
72
+ we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
73
+ to add `GCORE_API_KEY="My API Key"` to your `.env` file
74
+ so that your API Key is not stored in source control.
75
+
76
+ ## Async usage
77
+
78
+ Simply import `AsyncGcore` instead of `Gcore` and use `await` with each API call:
79
+
80
+ ```python
81
+ import os
82
+ import asyncio
83
+ from gcore import AsyncGcore
84
+
85
+ client = AsyncGcore(
86
+ api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
87
+ )
88
+
89
+
90
+ async def main() -> None:
91
+ project = await client.cloud.projects.create(
92
+ name="New Project",
93
+ )
94
+ print(project.id)
95
+
96
+
97
+ asyncio.run(main())
98
+ ```
99
+
100
+ Functionality between the synchronous and asynchronous clients is otherwise identical.
101
+
102
+ ## Using types
103
+
104
+ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
105
+
106
+ - Serializing back into JSON, `model.to_json()`
107
+ - Converting to a dictionary, `model.to_dict()`
108
+
109
+ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
110
+
111
+ ## Pagination
112
+
113
+ List methods in the Gcore API are paginated.
114
+
115
+ This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
116
+
117
+ ```python
118
+ from gcore import Gcore
119
+
120
+ client = Gcore()
121
+
122
+ all_projects = []
123
+ # Automatically fetches more pages as needed.
124
+ for project in client.cloud.projects.list(
125
+ limit=10,
126
+ offset=0,
127
+ ):
128
+ # Do something with project here
129
+ all_projects.append(project)
130
+ print(all_projects)
131
+ ```
132
+
133
+ Or, asynchronously:
134
+
135
+ ```python
136
+ import asyncio
137
+ from gcore import AsyncGcore
138
+
139
+ client = AsyncGcore()
140
+
141
+
142
+ async def main() -> None:
143
+ all_projects = []
144
+ # Iterate through items across all pages, issuing requests as needed.
145
+ async for project in client.cloud.projects.list(
146
+ limit=10,
147
+ offset=0,
148
+ ):
149
+ all_projects.append(project)
150
+ print(all_projects)
151
+
152
+
153
+ asyncio.run(main())
154
+ ```
155
+
156
+ Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:
157
+
158
+ ```python
159
+ first_page = await client.cloud.projects.list(
160
+ limit=10,
161
+ offset=0,
162
+ )
163
+ if first_page.has_next_page():
164
+ print(f"will fetch next page using these details: {first_page.next_page_info()}")
165
+ next_page = await first_page.get_next_page()
166
+ print(f"number of items we just fetched: {len(next_page.results)}")
167
+
168
+ # Remove `await` for non-async usage.
169
+ ```
170
+
171
+ Or just work directly with the returned data:
172
+
173
+ ```python
174
+ first_page = await client.cloud.projects.list(
175
+ limit=10,
176
+ offset=0,
177
+ )
178
+ for project in first_page.results:
179
+ print(project.id)
180
+
181
+ # Remove `await` for non-async usage.
182
+ ```
183
+
184
+ ## Nested params
185
+
186
+ Nested parameters are dictionaries, typed using `TypedDict`, for example:
187
+
188
+ ```python
189
+ from gcore import Gcore
190
+
191
+ client = Gcore()
192
+
193
+ task_id_list = client.cloud.instances.create(
194
+ project_id=1,
195
+ region_id=1,
196
+ flavor="g2-standard-4-8",
197
+ interfaces=[{"type": "external"}],
198
+ volumes=[
199
+ {
200
+ "source": "image",
201
+ "image_id": "your-image-uuid",
202
+ "size": 50,
203
+ "type_name": "ssd_hiiops",
204
+ "boot_index": 0,
205
+ },
206
+ {
207
+ "source": "new-volume",
208
+ "size": 100,
209
+ "type_name": "ssd_hiiops",
210
+ },
211
+ ],
212
+ user_data="IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8sIFdvcmxkISIgPj4gL3RtcC9jbG91ZC1pbml0Lm91dAo=",
213
+ name="my-instance",
214
+ )
215
+ print(task_id_list.tasks)
216
+ ```
217
+
218
+ ## Handling errors
219
+
220
+ When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `gcore.APIConnectionError` is raised.
221
+
222
+ When the API returns a non-success status code (that is, 4xx or 5xx
223
+ response), a subclass of `gcore.APIStatusError` is raised, containing `status_code` and `response` properties.
224
+
225
+ All errors inherit from `gcore.APIError`.
226
+
227
+ ```python
228
+ import gcore
229
+ from gcore import Gcore
230
+
231
+ client = Gcore()
232
+
233
+ try:
234
+ client.cloud.projects.create(
235
+ name="New Project",
236
+ )
237
+ except gcore.APIConnectionError as e:
238
+ print("The server could not be reached")
239
+ print(e.__cause__) # an underlying Exception, likely raised within httpx.
240
+ except gcore.RateLimitError as e:
241
+ print("A 429 status code was received; we should back off a bit.")
242
+ except gcore.APIStatusError as e:
243
+ print("Another non-200-range status code was received")
244
+ print(e.status_code)
245
+ print(e.response)
246
+ ```
247
+
248
+ Error codes are as follows:
249
+
250
+ | Status Code | Error Type |
251
+ | ----------- | -------------------------- |
252
+ | 400 | `BadRequestError` |
253
+ | 401 | `AuthenticationError` |
254
+ | 403 | `PermissionDeniedError` |
255
+ | 404 | `NotFoundError` |
256
+ | 429 | `RateLimitError` |
257
+ | >=500 | `InternalServerError` |
258
+ | N/A | `APIConnectionError` |
259
+
260
+ ### Retries
261
+
262
+ Certain errors are automatically retried 2 times by default, with a short exponential backoff.
263
+ Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
264
+ 429 Rate Limit, and >=500 Internal errors are all retried by default.
265
+
266
+ You can use the `max_retries` option to configure or disable retry settings:
267
+
268
+ ```python
269
+ from gcore import Gcore
270
+
271
+ # Configure the default for all requests:
272
+ client = Gcore(
273
+ # default is 2
274
+ max_retries=0,
275
+ )
276
+
277
+ # Or, configure per-request:
278
+ client.with_options(max_retries=5).cloud.projects.create(
279
+ name="New Project",
280
+ )
281
+ ```
282
+
283
+ ### Timeouts
284
+
285
+ By default requests time out after 1 minute. You can configure this with a `timeout` option,
286
+ which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
287
+
288
+ ```python
289
+ from gcore import Gcore
290
+
291
+ # Configure the default for all requests:
292
+ client = Gcore(
293
+ # 20 seconds (default is 1 minute)
294
+ timeout=20.0,
295
+ )
296
+
297
+ # More granular control:
298
+ client = Gcore(
299
+ timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
300
+ )
301
+
302
+ # Override per-request:
303
+ client.with_options(timeout=5.0).cloud.projects.create(
304
+ name="New Project",
305
+ )
306
+ ```
307
+
308
+ On timeout, an `APITimeoutError` is thrown.
309
+
310
+ Note that requests that time out are [retried twice by default](https://github.com/G-Core/gcore-python/tree/main/#retries).
311
+
312
+ ## Advanced
313
+
314
+ ### Logging
315
+
316
+ We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
317
+
318
+ You can enable logging by setting the environment variable `GCORE_LOG` to `info`.
319
+
320
+ ```shell
321
+ $ export GCORE_LOG=info
322
+ ```
323
+
324
+ Or to `debug` for more verbose logging.
325
+
326
+ ### How to tell whether `None` means `null` or missing
327
+
328
+ In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:
329
+
330
+ ```py
331
+ if response.my_field is None:
332
+ if 'my_field' not in response.model_fields_set:
333
+ print('Got json like {}, without a "my_field" key present at all.')
334
+ else:
335
+ print('Got json like {"my_field": null}.')
336
+ ```
337
+
338
+ ### Accessing raw response data (e.g. headers)
339
+
340
+ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
341
+
342
+ ```py
343
+ from gcore import Gcore
344
+
345
+ client = Gcore()
346
+ response = client.cloud.projects.with_raw_response.create(
347
+ name="New Project",
348
+ )
349
+ print(response.headers.get('X-My-Header'))
350
+
351
+ project = response.parse() # get the object that `cloud.projects.create()` would have returned
352
+ print(project.id)
353
+ ```
354
+
355
+ These methods return an [`APIResponse`](https://github.com/G-Core/gcore-python/tree/main/src/gcore/_response.py) object.
356
+
357
+ The async client returns an [`AsyncAPIResponse`](https://github.com/G-Core/gcore-python/tree/main/src/gcore/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
358
+
359
+ #### `.with_streaming_response`
360
+
361
+ The above interface eagerly reads the full response body when you make the request, which may not always be what you want.
362
+
363
+ To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
364
+
365
+ ```python
366
+ with client.cloud.projects.with_streaming_response.create(
367
+ name="New Project",
368
+ ) as response:
369
+ print(response.headers.get("X-My-Header"))
370
+
371
+ for line in response.iter_lines():
372
+ print(line)
373
+ ```
374
+
375
+ The context manager is required so that the response will reliably be closed.
376
+
377
+ ### Making custom/undocumented requests
378
+
379
+ This library is typed for convenient access to the documented API.
380
+
381
+ If you need to access undocumented endpoints, params, or response properties, the library can still be used.
382
+
383
+ #### Undocumented endpoints
384
+
385
+ To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
386
+ http verbs. Options on the client will be respected (such as retries) when making this request.
387
+
388
+ ```py
389
+ import httpx
390
+
391
+ response = client.post(
392
+ "/foo",
393
+ cast_to=httpx.Response,
394
+ body={"my_param": True},
395
+ )
396
+
397
+ print(response.headers.get("x-foo"))
398
+ ```
399
+
400
+ #### Undocumented request params
401
+
402
+ If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request
403
+ options.
404
+
405
+ #### Undocumented response properties
406
+
407
+ To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You
408
+ can also get all the extra fields on the Pydantic model as a dict with
409
+ [`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).
410
+
411
+ ### Configuring the HTTP client
412
+
413
+ You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:
414
+
415
+ - Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
416
+ - Custom [transports](https://www.python-httpx.org/advanced/transports/)
417
+ - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
418
+
419
+ ```python
420
+ import httpx
421
+ from gcore import Gcore, DefaultHttpxClient
422
+
423
+ client = Gcore(
424
+ # Or use the `GCORE_BASE_URL` env var
425
+ base_url="http://my.test.server.example.com:8083",
426
+ http_client=DefaultHttpxClient(
427
+ proxy="http://my.test.proxy.example.com",
428
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
429
+ ),
430
+ )
431
+ ```
432
+
433
+ You can also customize the client on a per-request basis by using `with_options()`:
434
+
435
+ ```python
436
+ client.with_options(http_client=DefaultHttpxClient(...))
437
+ ```
438
+
439
+ ### Managing HTTP resources
440
+
441
+ By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
442
+
443
+ ```py
444
+ from gcore import Gcore
445
+
446
+ with Gcore() as client:
447
+ # make requests here
448
+ ...
449
+
450
+ # HTTP client is now closed
451
+ ```
452
+
453
+ ## Versioning
454
+
455
+ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
456
+
457
+ 1. Changes that only affect static types, without breaking runtime behavior.
458
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
459
+ 3. Changes that we do not expect to impact the vast majority of users in practice.
460
+
461
+ We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
462
+
463
+ We are keen for your feedback; please open an [issue](https://www.github.com/G-Core/gcore-python/issues) with questions, bugs, or suggestions.
464
+
465
+ ### Determining the installed version
466
+
467
+ 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.
468
+
469
+ You can determine the version that is being used at runtime with:
470
+
471
+ ```py
472
+ import gcore
473
+ print(gcore.__version__)
474
+ ```
475
+
476
+ ## Requirements
477
+
478
+ Python 3.8 or higher.
479
+
480
+ ## Contributing
481
+
482
+ See [the contributing documentation](https://github.com/G-Core/gcore-python/tree/main/./CONTRIBUTING.md).