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
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.16.0"
".": "0.17.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 607
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-69cdddee2436ba596d5c966a54c73d4ed4081564ec1c09282e3736bdb9ec6e20.yml
openapi_spec_hash: 33a4d60dd35c4e8ae937a9b079a25cad
config_hash: ba133b9b8d6b270153eb6a24c4280262
configured_endpoints: 609
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-56132999d4ac773438df4415a4bb56c8cf7f067c3c340d80424bf968074f66dc.yml
openapi_spec_hash: c33cea043ddbfe20778e0774313fa7e6
config_hash: bb4a27712c30f7a2b52e1f3b31766f24
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## 0.17.0 (2025-10-21)

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

### ⚠ BREAKING CHANGES

* **cloud:** rename to projects update
* **cloud:** use new PATCH files shares endpoint

### Features

* **api:** aggregated API specs update ([c9d6195](https://github.com/G-Core/gcore-python/commit/c9d6195649fd18c9c32107a978e0d40032b285be))
* **cdn:** add methods to list aws and alibaba regions ([0d1d290](https://github.com/G-Core/gcore-python/commit/0d1d290d11626ac0128329c005d048f0ab2f25dc))
* **client:** add client opt for cloud polling timeout ([bad7ecb](https://github.com/G-Core/gcore-python/commit/bad7ecbb58f0decc31e4091c5bdb0585b7471b09))
* **cloud:** add polling_timeout_seconds parameter to polling methods ([8b556ae](https://github.com/G-Core/gcore-python/commit/8b556aefc279caddaad9782747b2d6f65a523067))
* **cloud:** enable TF for placement groups ([63abaa7](https://github.com/G-Core/gcore-python/commit/63abaa7156d2a79bf27f9ba0d3fa2abb3a31aafd))
* **cloud:** support polling timeout in tasks.poll() ([3f8a419](https://github.com/G-Core/gcore-python/commit/3f8a419a48677e5f443248c963e045dd5169979a))


### Chores

* bump `httpx-aiohttp` version to 0.1.9 ([e906ee6](https://github.com/G-Core/gcore-python/commit/e906ee6224833181a4618bcd63671d9a131bca94))
* **cloud:** fix file shares examples ([c5cc6fa](https://github.com/G-Core/gcore-python/commit/c5cc6fa74b5678d08d1ed750872e424edd6f5377))
* **cloud:** rename to projects update ([f3f52da](https://github.com/G-Core/gcore-python/commit/f3f52da58998f8ce2637b99d1c944fd692861b48))
* **cloud:** use new PATCH files shares endpoint ([2ac6bce](https://github.com/G-Core/gcore-python/commit/2ac6bce8afbe4783620060964359d01ab105979e))


### Refactors

* **spec:** remove CDN deprecated endpoints ([193a257](https://github.com/G-Core/gcore-python/commit/193a257bcf3e00d85179809e63fa47b021323f65))

## 0.16.0 (2025-10-17)

Full Changelog: [v0.15.0...v0.16.0](https://github.com/G-Core/gcore-python/compare/v0.15.0...v0.16.0)
Expand Down
22 changes: 16 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ from gcore.types.cloud import Project
Methods:

- <code title="post /cloud/v1/projects">client.cloud.projects.<a href="./src/gcore/resources/cloud/projects.py">create</a>(\*\*<a href="src/gcore/types/cloud/project_create_params.py">params</a>) -> <a href="./src/gcore/types/cloud/project.py">Project</a></code>
- <code title="put /cloud/v1/projects/{project_id}">client.cloud.projects.<a href="./src/gcore/resources/cloud/projects.py">update</a>(\*, project_id, \*\*<a href="src/gcore/types/cloud/project_update_params.py">params</a>) -> <a href="./src/gcore/types/cloud/project.py">Project</a></code>
- <code title="get /cloud/v1/projects">client.cloud.projects.<a href="./src/gcore/resources/cloud/projects.py">list</a>(\*\*<a href="src/gcore/types/cloud/project_list_params.py">params</a>) -> <a href="./src/gcore/types/cloud/project.py">SyncOffsetPage[Project]</a></code>
- <code title="delete /cloud/v1/projects/{project_id}">client.cloud.projects.<a href="./src/gcore/resources/cloud/projects.py">delete</a>(\*, project_id) -> <a href="./src/gcore/types/cloud/task_id_list.py">TaskIDList</a></code>
- <code title="get /cloud/v1/projects/{project_id}">client.cloud.projects.<a href="./src/gcore/resources/cloud/projects.py">get</a>(\*, project_id) -> <a href="./src/gcore/types/cloud/project.py">Project</a></code>
- <code title="put /cloud/v1/projects/{project_id}">client.cloud.projects.<a href="./src/gcore/resources/cloud/projects.py">replace</a>(\*, project_id, \*\*<a href="src/gcore/types/cloud/project_replace_params.py">params</a>) -> <a href="./src/gcore/types/cloud/project.py">Project</a></code>

## Tasks

Expand Down Expand Up @@ -725,7 +725,7 @@ from gcore.types.cloud import FileShare
Methods:

- <code title="post /cloud/v1/file_shares/{project_id}/{region_id}">client.cloud.file_shares.<a href="./src/gcore/resources/cloud/file_shares/file_shares.py">create</a>(\*, project_id, region_id, \*\*<a href="src/gcore/types/cloud/file_share_create_params.py">params</a>) -> <a href="./src/gcore/types/cloud/task_id_list.py">TaskIDList</a></code>
- <code title="patch /cloud/v1/file_shares/{project_id}/{region_id}/{file_share_id}">client.cloud.file_shares.<a href="./src/gcore/resources/cloud/file_shares/file_shares.py">update</a>(file_share_id, \*, project_id, region_id, \*\*<a href="src/gcore/types/cloud/file_share_update_params.py">params</a>) -> <a href="./src/gcore/types/cloud/file_share.py">FileShare</a></code>
- <code title="patch /cloud/v3/file_shares/{project_id}/{region_id}/{file_share_id}">client.cloud.file_shares.<a href="./src/gcore/resources/cloud/file_shares/file_shares.py">update</a>(file_share_id, \*, project_id, region_id, \*\*<a href="src/gcore/types/cloud/file_share_update_params.py">params</a>) -> <a href="./src/gcore/types/cloud/task_id_list.py">TaskIDList</a></code>
- <code title="get /cloud/v1/file_shares/{project_id}/{region_id}">client.cloud.file_shares.<a href="./src/gcore/resources/cloud/file_shares/file_shares.py">list</a>(\*, project_id, region_id, \*\*<a href="src/gcore/types/cloud/file_share_list_params.py">params</a>) -> <a href="./src/gcore/types/cloud/file_share.py">SyncOffsetPage[FileShare]</a></code>
- <code title="delete /cloud/v1/file_shares/{project_id}/{region_id}/{file_share_id}">client.cloud.file_shares.<a href="./src/gcore/resources/cloud/file_shares/file_shares.py">delete</a>(file_share_id, \*, project_id, region_id) -> <a href="./src/gcore/types/cloud/task_id_list.py">TaskIDList</a></code>
- <code title="get /cloud/v1/file_shares/{project_id}/{region_id}/{file_share_id}">client.cloud.file_shares.<a href="./src/gcore/resources/cloud/file_shares/file_shares.py">get</a>(file_share_id, \*, project_id, region_id) -> <a href="./src/gcore/types/cloud/file_share.py">FileShare</a></code>
Expand Down Expand Up @@ -2082,15 +2082,25 @@ Methods:
Types:

```python
from gcore.types.cdn import CdnAccount, CdnAccountLimits, CdnAvailableFeatures, PurgeStatus
from gcore.types.cdn import (
AlibabaRegions,
AwsRegions,
CdnAccount,
CdnAccountLimits,
CdnAvailableFeatures,
PurgeStatus,
CdnListPurgeStatusesResponse,
)
```

Methods:

- <code title="get /cdn/clients/me/limits">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">get_account_limits</a>() -> <a href="./src/gcore/types/cdn/cdn_account_limits.py">CdnAccountLimits</a></code>
- <code title="get /cdn/clients/me">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">get_account_overview</a>() -> <a href="./src/gcore/types/cdn/cdn_account.py">CdnAccount</a></code>
- <code title="get /cdn/clients/me/features">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">get_available_features</a>() -> <a href="./src/gcore/types/cdn/cdn_available_features.py">CdnAvailableFeatures</a></code>
- <code title="get /cdn/purge_statuses">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">list_purge_statuses</a>(\*\*<a href="src/gcore/types/cdn/cdn_list_purge_statuses_params.py">params</a>) -> <a href="./src/gcore/types/cdn/purge_status.py">SyncOffsetPageCdn[PurgeStatus]</a></code>
- <code title="get /cdn/alibaba_regions">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">list_alibaba_regions</a>() -> <a href="./src/gcore/types/cdn/alibaba_regions.py">AlibabaRegions</a></code>
- <code title="get /cdn/aws_regions">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">list_aws_regions</a>() -> <a href="./src/gcore/types/cdn/aws_regions.py">AwsRegions</a></code>
- <code title="get /cdn/purge_statuses">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">list_purge_statuses</a>(\*\*<a href="src/gcore/types/cdn/cdn_list_purge_statuses_params.py">params</a>) -> <a href="./src/gcore/types/cdn/cdn_list_purge_statuses_response.py">CdnListPurgeStatusesResponse</a></code>
- <code title="patch /cdn/clients/me">client.cdn.<a href="./src/gcore/resources/cdn/cdn.py">update_account</a>(\*\*<a href="src/gcore/types/cdn/cdn_update_account_params.py">params</a>) -> <a href="./src/gcore/types/cdn/cdn_account.py">CdnAccount</a></code>

## Resources
Expand Down Expand Up @@ -2247,8 +2257,8 @@ from gcore.types.cdn import CdnLogEntry

Methods:

- <code title="get /cdn/advanced/v1/logs">client.cdn.logs.<a href="./src/gcore/resources/cdn/logs/logs.py">list</a>(\*\*<a href="src/gcore/types/cdn/log_list_params.py">params</a>) -> SyncOffsetPageCdnLogs[Data]</code>
- <code title="get /cdn/advanced/v1/logs/download">client.cdn.logs.<a href="./src/gcore/resources/cdn/logs/logs.py">download</a>(\*\*<a href="src/gcore/types/cdn/log_download_params.py">params</a>) -> BinaryAPIResponse</code>
- <code title="get /cdn/advanced/v1/logs">client.cdn.logs.<a href="./src/gcore/resources/cdn/logs.py">list</a>(\*\*<a href="src/gcore/types/cdn/log_list_params.py">params</a>) -> SyncOffsetPageCdnLogs[Data]</code>
- <code title="get /cdn/advanced/v1/logs/download">client.cdn.logs.<a href="./src/gcore/resources/cdn/logs.py">download</a>(\*\*<a href="src/gcore/types/cdn/log_download_params.py">params</a>) -> BinaryAPIResponse</code>

## LogsUploader

Expand Down
1 change: 0 additions & 1 deletion examples/cloud/audit_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def main() -> None:
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = Gcore(
timeout=60.0,
# No need to explicitly pass to Gcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/audit_logs_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ async def main() -> None:
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = AsyncGcore(
timeout=60.0,
# No need to explicitly pass to AsyncGcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/baremetal.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def main() -> None:
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = Gcore(
timeout=1800.0,
# No need to explicitly pass to Gcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/baremetal_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ async def main() -> None:
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = AsyncGcore(
timeout=1800.0,
# No need to explicitly pass to AsyncGcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
3 changes: 1 addition & 2 deletions examples/cloud/file_shares.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def main() -> None:
cloud_network_id = os.environ["GCORE_CLOUD_NETWORK_ID"]

gcore = Gcore(
timeout=180.0,
# No need to explicitly pass to Gcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down Expand Up @@ -71,7 +70,7 @@ def get_file_share(*, client: Gcore, file_share_id: str) -> None:

def update_file_share(*, client: Gcore, file_share_id: str) -> None:
print("\n=== UPDATE FILE SHARE ===")
file_share = client.cloud.file_shares.update( # pyright: ignore[reportDeprecated]
file_share = client.cloud.file_shares.update_and_poll(
file_share_id=file_share_id,
name="gcore-go-example-updated",
)
Expand Down
3 changes: 1 addition & 2 deletions examples/cloud/file_shares_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ async def main() -> None:
cloud_network_id = os.environ["GCORE_CLOUD_NETWORK_ID"]

gcore = AsyncGcore(
timeout=180.0,
# No need to explicitly pass to AsyncGcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down Expand Up @@ -75,7 +74,7 @@ async def get_file_share(*, client: AsyncGcore, file_share_id: str) -> None:

async def update_file_share(*, client: AsyncGcore, file_share_id: str) -> None:
print("\n=== UPDATE FILE SHARE ===")
file_share = await client.cloud.file_shares.update( # pyright: ignore[reportDeprecated]
file_share = await client.cloud.file_shares.update_and_poll(
file_share_id=file_share_id,
name="gcore-go-example-updated",
)
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def main() -> None:
cloud_inference_flavor_name = os.environ["GCORE_CLOUD_INFERENCE_FLAVOR_NAME"]

gcore = Gcore(
timeout=180.0,
# No need to explicitly pass to Gcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/inference_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ async def main() -> None:
cloud_inference_flavor_name = os.environ["GCORE_CLOUD_INFERENCE_FLAVOR_NAME"]

gcore = AsyncGcore(
timeout=180.0,
# No need to explicitly pass to AsyncGcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def main() -> None:
placement_group_id = os.environ.get("GCORE_CLOUD_PLACEMENT_GROUP_ID")

gcore = Gcore(
timeout=180.0,
# No need to explicitly pass to Gcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/instances_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ async def main() -> None:
placement_group_id = os.environ.get("GCORE_CLOUD_PLACEMENT_GROUP_ID")

gcore = AsyncGcore(
timeout=180.0,
# No need to explicitly pass to AsyncGcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/load_balancers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def main() -> None:
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = Gcore(
timeout=180.0,
# No need to explicitly pass to Gcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
1 change: 0 additions & 1 deletion examples/cloud/load_balancers_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ async def main() -> None:
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]

gcore = AsyncGcore(
timeout=180.0,
# No need to explicitly pass to AsyncGcore constructor if using environment variables
# api_key=api_key,
# cloud_project_id=cloud_project_id,
Expand Down
2 changes: 1 addition & 1 deletion examples/cloud/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_project_by_id(*, client: Gcore, project_id: int) -> Project:

def update_project(*, client: Gcore, project_id: int) -> Project:
print("\n=== UPDATE PROJECT ===")
updated_project = client.cloud.projects.replace(project_id=project_id, name="gcore-go-example-updated")
updated_project = client.cloud.projects.update(project_id=project_id, name="gcore-go-example-updated")
print(f"Project ID: {updated_project.id}, name: {updated_project.name}")
print("=======================")
return updated_project
Expand Down
2 changes: 1 addition & 1 deletion examples/cloud/projects_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async def get_project_by_id(*, client: AsyncGcore, project_id: int) -> Project:

async def update_project(*, client: AsyncGcore, project_id: int) -> Project:
print("\n=== UPDATE PROJECT ===")
updated_project = await client.cloud.projects.replace(project_id=project_id, name="gcore-go-example-updated")
updated_project = await client.cloud.projects.update(project_id=project_id, name="gcore-go-example-updated")
print(f"Project ID: {updated_project.id}, name: {updated_project.name}")
print("=======================")
return updated_project
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gcore"
version = "0.16.0"
version = "0.17.0"
description = "The official Python library for the gcore API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -39,7 +39,7 @@ Homepage = "https://github.com/G-Core/gcore-python"
Repository = "https://github.com/G-Core/gcore-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[tool.rye]
managed = true
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ httpx==0.28.1
# via gcore
# via httpx-aiohttp
# via respx
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via gcore
idna==3.4
# via anyio
Expand Down
2 changes: 1 addition & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via gcore
# via httpx-aiohttp
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via gcore
idna==3.4
# via anyio
Expand Down
Loading
Loading