Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .agents/skills/release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ We're excited to announce version {VERSION}!
changes. Skip noise.
- **Omit `codegen metadata` and `aggregated API specs update`** entries unless
they introduce a specific user-visible change visible in the diff.
- **Omit doc-only changes** — if a diff only updates comments, docstrings, or
descriptions (e.g., `"IPv4"` → `"IPv4 or IPv6"` in a docstring, or adding a
description to a service/resource for Terraform enablement) with no API
behavioral change (no new fields, methods, types, or changed signatures),
do **not** surface it in Part 1. These are internal metadata updates, not
user-facing SDK changes.

Display the generated Part 1 to the user. Ask if they want to edit or approve.

Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.42.0"
".": "0.43.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 657
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-e8141952a77a5faabf98feca4f964baaef5b84aa66d785c8b35357e48928df9c.yml
openapi_spec_hash: a5ff6021de586dafea9df886214ceb2c
config_hash: 0b9fe3822aef92ebe43ad609b931bfc8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-ba1eb162beed31f03386720005830bdaad3be08b9e08a07b2f10a2dd124648b8.yml
openapi_spec_hash: 416a4779f456d266b805fef5a54cfbc7
config_hash: d2defa3f4caff86ec6f4b8890f74b295
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## 0.43.0 (2026-04-22)

Full Changelog: [v0.42.0...v0.43.0](https://github.com/G-Core/gcore-python/compare/v0.42.0...v0.43.0)

### Features

* **api:** aggregated API specs update ([7d70fe4](https://github.com/G-Core/gcore-python/commit/7d70fe4b2ef3fc2ba54cb8f2a195a5b0f09514bc))
* **api:** aggregated API specs update ([2e269b6](https://github.com/G-Core/gcore-python/commit/2e269b6f17a504250715f6f33316818e25ce6d70))
* **api:** aggregated API specs update ([96cd4c9](https://github.com/G-Core/gcore-python/commit/96cd4c96ff40b2d2bfc0d220309eadbc88b0dbb3))
* **api:** aggregated API specs update ([8b6d277](https://github.com/G-Core/gcore-python/commit/8b6d2777aa8967ba88788145440b9e6e94c7c7f7))
* **cloud:** add examples for GPU baremetal cluster images ([7279536](https://github.com/G-Core/gcore-python/commit/7279536d11b4163c445e270180da5de8582709ee))
* **cloud:** add polling methods for K8s clusters and pools ([76bd4c9](https://github.com/G-Core/gcore-python/commit/76bd4c9a97c4da20f7dcf4f04f87e195278527a0))
* **cloud:** add runnable K8s cluster example ([030f335](https://github.com/G-Core/gcore-python/commit/030f335f902c3cb2b29792b22b9e9c0a2f6f6de7))
* **storage:** support Terraform generation for locations ([063f1f4](https://github.com/G-Core/gcore-python/commit/063f1f40ee0d10153f5437a69f227936516cf8e7))


### Bug Fixes

* add rule to omit doc-only changes from release notes ([45bae59](https://github.com/G-Core/gcore-python/commit/45bae593f219bc62fd3773b97db603b4859500d7))


### Performance Improvements

* **client:** optimize file structure copying in multipart requests ([2fd1bcb](https://github.com/G-Core/gcore-python/commit/2fd1bcbd057214f9fb494484e99d203a24c04c29))


### Chores

* suppress deprecation warning on IAM api_tokens.create usage ([9b2f4a4](https://github.com/G-Core/gcore-python/commit/9b2f4a4ff19039df9dc1aac3dfdc5eba000de025))
* **tests:** bump steady to v0.22.1 ([6ac2648](https://github.com/G-Core/gcore-python/commit/6ac2648d93f24b1f23544dac36d979575c763f3c))

## 0.42.0 (2026-04-17)

Full Changelog: [v0.41.0...v0.42.0](https://github.com/G-Core/gcore-python/compare/v0.41.0...v0.42.0)
Expand Down
91 changes: 91 additions & 0 deletions examples/cloud/gpu_baremetal_cluster_images.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
from typing import List

from gcore import Gcore
from gcore.types.cloud.gpu_image import GPUImage


def main() -> None:
# TODO set API key before running
# api_key = os.environ["GCORE_API_KEY"]
# TODO set cloud project ID before running
# cloud_project_id = os.environ["GCORE_CLOUD_PROJECT_ID"]
# TODO set cloud region ID before running
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = Gcore(
# No need to explicitly pass to Gcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
# cloud_region_id=cloud_region_id,
)

# List existing images
list_images(client=gcore)

# Upload a new image
image = upload_image(client=gcore)

# Get the newly uploaded image
get_image(client=gcore, image_id=image.id)

# Delete the image
delete_image(client=gcore, image_id=image.id)


def list_images(*, client: Gcore) -> List[GPUImage]:
print("\n=== LIST GPU BAREMETAL CLUSTER IMAGES ===")
images = client.cloud.gpu_baremetal.clusters.images.list()
_print_image_details(images.results)
print(f"Total GPU baremetal cluster images: {len(images.results)}")
print("========================")
return images.results


def upload_image(*, client: Gcore) -> GPUImage:
print("\n=== UPLOAD GPU BAREMETAL CLUSTER IMAGE ===")
image = client.cloud.gpu_baremetal.clusters.images.upload_and_poll(
name="gcore-python-example-gpu-baremetal-image",
url="http://mirror.noris.net/cirros/0.4.0/cirros-0.4.0-x86_64-disk.img",
architecture="x86_64",
os_type="linux",
ssh_key="allow",
tags={"name": "gcore-python-example"},
)
print(f"Uploaded image: ID={image.id}, name={image.name}, status={image.status}")
print("========================")
return image


def get_image(*, client: Gcore, image_id: str) -> GPUImage:
print("\n=== GET GPU BAREMETAL CLUSTER IMAGE ===")
image = client.cloud.gpu_baremetal.clusters.images.get(image_id=image_id)
print(f"Image: ID={image.id}, name={image.name}, status={image.status}")
print(f"OS type: {image.os_type}, architecture: {image.architecture}")
print(f"Min RAM: {image.min_ram} MB, Min Disk: {image.min_disk} GB")
print(f"Visibility: {image.visibility}")
print("========================")
return image


def delete_image(*, client: Gcore, image_id: str) -> None:
print("\n=== DELETE GPU BAREMETAL CLUSTER IMAGE ===")
client.cloud.gpu_baremetal.clusters.images.delete_and_poll(image_id=image_id)
print(f"Deleted image: ID={image_id}")
print("========================")


def _print_image_details(images: List[GPUImage]) -> None:
display_count = 3
if len(images) < display_count:
display_count = len(images)

for i in range(display_count):
img = images[i]
print(f" {i + 1}. Image ID: {img.id}, name: {img.name}, OS type: {img.os_type}, status: {img.status}")

if len(images) > display_count:
print(f" ... and {len(images) - display_count} more images")


if __name__ == "__main__":
main()
92 changes: 92 additions & 0 deletions examples/cloud/gpu_baremetal_cluster_images_async.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import asyncio
from typing import List

from gcore import AsyncGcore
from gcore.types.cloud.gpu_image import GPUImage


async def main() -> None:
# TODO set API key before running
# api_key = os.environ["GCORE_API_KEY"]
# TODO set cloud project ID before running
# cloud_project_id = os.environ["GCORE_CLOUD_PROJECT_ID"]
# TODO set cloud region ID before running
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = AsyncGcore(
# No need to explicitly pass to AsyncGcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
# cloud_region_id=cloud_region_id,
)

# List existing images
await list_images(client=gcore)

# Upload a new image
image = await upload_image(client=gcore)

# Get the newly uploaded image
await get_image(client=gcore, image_id=image.id)

# Delete the image
await delete_image(client=gcore, image_id=image.id)


async def list_images(*, client: AsyncGcore) -> List[GPUImage]:
print("\n=== LIST GPU BAREMETAL CLUSTER IMAGES ===")
images = await client.cloud.gpu_baremetal.clusters.images.list()
_print_image_details(images.results)
print(f"Total GPU baremetal cluster images: {len(images.results)}")
print("========================")
return images.results


async def upload_image(*, client: AsyncGcore) -> GPUImage:
print("\n=== UPLOAD GPU BAREMETAL CLUSTER IMAGE ===")
image = await client.cloud.gpu_baremetal.clusters.images.upload_and_poll(
name="gcore-python-example-gpu-baremetal-image",
url="http://mirror.noris.net/cirros/0.4.0/cirros-0.4.0-x86_64-disk.img",
architecture="x86_64",
os_type="linux",
ssh_key="allow",
tags={"name": "gcore-python-example"},
)
print(f"Uploaded image: ID={image.id}, name={image.name}, status={image.status}")
print("========================")
return image


async def get_image(*, client: AsyncGcore, image_id: str) -> GPUImage:
print("\n=== GET GPU BAREMETAL CLUSTER IMAGE ===")
image = await client.cloud.gpu_baremetal.clusters.images.get(image_id=image_id)
print(f"Image: ID={image.id}, name={image.name}, status={image.status}")
print(f"OS type: {image.os_type}, architecture: {image.architecture}")
print(f"Min RAM: {image.min_ram} MB, Min Disk: {image.min_disk} GB")
print(f"Visibility: {image.visibility}")
print("========================")
return image


async def delete_image(*, client: AsyncGcore, image_id: str) -> None:
print("\n=== DELETE GPU BAREMETAL CLUSTER IMAGE ===")
await client.cloud.gpu_baremetal.clusters.images.delete_and_poll(image_id=image_id)
print(f"Deleted image: ID={image_id}")
print("========================")


def _print_image_details(images: List[GPUImage]) -> None:
display_count = 3
if len(images) < display_count:
display_count = len(images)

for i in range(display_count):
img = images[i]
print(f" {i + 1}. Image ID: {img.id}, name: {img.name}, OS type: {img.os_type}, status: {img.status}")

if len(images) > display_count:
print(f" ... and {len(images) - display_count} more images")


if __name__ == "__main__":
asyncio.run(main())
Loading
Loading