Skip to content
Open
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.33.0"
".": "0.34.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 645
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-06555b1b7559c234823e37c3970ba3ea9f11ed14270b872b22761f6be8692e74.yml
openapi_spec_hash: 619bca59fafad89221a4b35f797f14f1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-691d7fc7d687ca367474bc78eb880f6f964454dc82259cdbb75fb90bd92c67ec.yml
openapi_spec_hash: 97a4cbc8d7b05b1dc58319331717e8e7
config_hash: bc578a7de14c42e33b7d4bd4502218f2
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.34.0 (2026-02-18)

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

### Features

* **api:** aggregated API specs update ([34d65c1](https://github.com/G-Core/gcore-python/commit/34d65c17e2438ba6ab5d60907936eb5d12181a31))
* **api:** aggregated API specs update ([079e24c](https://github.com/G-Core/gcore-python/commit/079e24cd6522792e9d841a2e0f408e21e617e05e))
* **api:** aggregated API specs update ([9255354](https://github.com/G-Core/gcore-python/commit/925535479aea739b6abbd1fa76ea892d342fc355))


### Bug Fixes

* **storage:** update storage type and ignore deprecation in examples ([df7fbed](https://github.com/G-Core/gcore-python/commit/df7fbed9dca33894eaf3111bf7d87b0a1aa16977))

## 0.33.0 (2026-02-16)

Full Changelog: [v0.32.0...v0.33.0](https://github.com/G-Core/gcore-python/compare/v0.32.0...v0.33.0)
Expand Down
8 changes: 4 additions & 4 deletions examples/storage/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def main() -> None:
def create_storage(*, client: Gcore) -> int:
print("\n=== CREATE STORAGE ===")
name = f"example-s3-storage-{int(time.time())}"
storage = client.storage.create(
storage = client.storage.create( # pyright: ignore[reportDeprecated]
name=name,
type="s3",
type="s3_compatible",
location="s-ed1",
)
print(f"Created Storage: ID={storage.id}, Name={storage.name}, Type={storage.type}, Location={storage.location}")
Expand Down Expand Up @@ -57,7 +57,7 @@ def get_storage(*, client: Gcore, storage_id: int) -> None:

def update_storage(*, client: Gcore, storage_id: int) -> None:
print("\n=== UPDATE STORAGE ===")
storage = client.storage.update(
storage = client.storage.update( # pyright: ignore[reportDeprecated]
storage_id=storage_id,
expires="30 days",
)
Expand All @@ -67,7 +67,7 @@ def update_storage(*, client: Gcore, storage_id: int) -> None:

def delete_storage(*, client: Gcore, storage_id: int) -> None:
print("\n=== DELETE STORAGE ===")
client.storage.delete(storage_id=storage_id)
client.storage.delete(storage_id=storage_id) # pyright: ignore[reportDeprecated]
print(f"Storage {storage_id} deleted successfully")
print("======================")

Expand Down
8 changes: 4 additions & 4 deletions examples/storage/basic_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ async def main() -> None:
async def create_storage(*, client: AsyncGcore) -> int:
print("\n=== CREATE STORAGE ===")
name = f"example-s3-storage-{int(time.time())}"
storage = await client.storage.create(
storage = await client.storage.create( # pyright: ignore[reportDeprecated]
name=name,
type="s3",
type="s3_compatible",
location="s-ed1",
)
print(f"Created Storage: ID={storage.id}, Name={storage.name}, Type={storage.type}, Location={storage.location}")
Expand Down Expand Up @@ -60,7 +60,7 @@ async def get_storage(*, client: AsyncGcore, storage_id: int) -> None:

async def update_storage(*, client: AsyncGcore, storage_id: int) -> None:
print("\n=== UPDATE STORAGE ===")
storage = await client.storage.update(
storage = await client.storage.update( # pyright: ignore[reportDeprecated]
storage_id=storage_id,
expires="30 days",
)
Expand All @@ -70,7 +70,7 @@ async def update_storage(*, client: AsyncGcore, storage_id: int) -> None:

async def delete_storage(*, client: AsyncGcore, storage_id: int) -> None:
print("\n=== DELETE STORAGE ===")
await client.storage.delete(storage_id=storage_id)
await client.storage.delete(storage_id=storage_id) # pyright: ignore[reportDeprecated]
print(f"Storage {storage_id} deleted successfully")
print("======================")

Expand Down
16 changes: 8 additions & 8 deletions examples/storage/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def main() -> None:
def create_s3_storage(*, client: Gcore) -> int:
print("\n=== CREATE S3 STORAGE ===")
s3_name = f"s3-creds-example-{int(time.time())}"
storage = client.storage.create(
storage = client.storage.create( # pyright: ignore[reportDeprecated]
name=s3_name,
type="s3",
type="s3_compatible",
location="s-ed1",
)
print(f"Created Storage: ID={storage.id}, Name={storage.name}, Type={storage.type}, Location={storage.location}")
Expand All @@ -47,7 +47,7 @@ def create_s3_storage(*, client: Gcore) -> int:
def create_sftp_storage(*, client: Gcore) -> int:
print("\n=== CREATE SFTP STORAGE ===")
sftp_name = f"sftp-ex-{int(time.time()) % 1000000}"
storage = client.storage.create(
storage = client.storage.create( # pyright: ignore[reportDeprecated]
name=sftp_name,
type="sftp",
location="ams",
Expand Down Expand Up @@ -90,7 +90,7 @@ def get_storage(*, client: Gcore, storage_id: int) -> None:

def generate_s3_keys(*, client: Gcore, s3_storage_id: int) -> None:
print("\n=== GENERATE S3 KEYS ===")
storage = client.storage.credentials.recreate(
storage = client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=s3_storage_id,
generate_s3_keys=True,
)
Expand All @@ -103,7 +103,7 @@ def generate_s3_keys(*, client: Gcore, s3_storage_id: int) -> None:

def generate_sftp_password(*, client: Gcore, sftp_storage_id: int) -> None:
print("\n=== GENERATE SFTP PASSWORD ===")
storage = client.storage.credentials.recreate(
storage = client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=sftp_storage_id,
generate_sftp_password=True,
)
Expand All @@ -115,7 +115,7 @@ def generate_sftp_password(*, client: Gcore, sftp_storage_id: int) -> None:
def set_custom_sftp_password(*, client: Gcore, sftp_storage_id: int) -> None:
print("\n=== SET CUSTOM SFTP PASSWORD ===")
custom_password = "MyNewSecurePassword456!"
client.storage.credentials.recreate(
client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=sftp_storage_id,
sftp_password=custom_password,
)
Expand All @@ -125,7 +125,7 @@ def set_custom_sftp_password(*, client: Gcore, sftp_storage_id: int) -> None:

def delete_sftp_password(*, client: Gcore, sftp_storage_id: int) -> None:
print("\n=== DELETE SFTP PASSWORD ===")
client.storage.credentials.recreate(
client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=sftp_storage_id,
delete_sftp_password=True,
)
Expand All @@ -136,7 +136,7 @@ def delete_sftp_password(*, client: Gcore, sftp_storage_id: int) -> None:
def delete_storage(*, client: Gcore, storage_id: int) -> None:
"""Delete a single storage"""
print("\n=== DELETE STORAGE ===")
client.storage.delete(storage_id=storage_id)
client.storage.delete(storage_id=storage_id) # pyright: ignore[reportDeprecated]
print(f"Storage {storage_id} deleted successfully")
print("======================")

Expand Down
16 changes: 8 additions & 8 deletions examples/storage/credentials_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ async def main() -> None:
async def create_s3_storage(*, client: AsyncGcore) -> int:
print("\n=== CREATE S3 STORAGE ===")
s3_name = f"s3-creds-example-{int(time.time())}"
storage = await client.storage.create(
storage = await client.storage.create( # pyright: ignore[reportDeprecated]
name=s3_name,
type="s3",
type="s3_compatible",
location="s-ed1",
)
print(f"Created Storage: ID={storage.id}, Name={storage.name}, Type={storage.type}, Location={storage.location}")
Expand All @@ -48,7 +48,7 @@ async def create_s3_storage(*, client: AsyncGcore) -> int:
async def create_sftp_storage(*, client: AsyncGcore) -> int:
print("\n=== CREATE SFTP STORAGE ===")
sftp_name = f"sftp-ex-{int(time.time()) % 1000000}"
storage = await client.storage.create(
storage = await client.storage.create( # pyright: ignore[reportDeprecated]
name=sftp_name,
type="sftp",
location="ams",
Expand Down Expand Up @@ -91,7 +91,7 @@ async def get_storage(*, client: AsyncGcore, storage_id: int) -> None:

async def generate_s3_keys(*, client: AsyncGcore, s3_storage_id: int) -> None:
print("\n=== GENERATE S3 KEYS ===")
storage = await client.storage.credentials.recreate(
storage = await client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=s3_storage_id,
generate_s3_keys=True,
)
Expand All @@ -104,7 +104,7 @@ async def generate_s3_keys(*, client: AsyncGcore, s3_storage_id: int) -> None:

async def generate_sftp_password(*, client: AsyncGcore, sftp_storage_id: int) -> None:
print("\n=== GENERATE SFTP PASSWORD ===")
storage = await client.storage.credentials.recreate(
storage = await client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=sftp_storage_id,
generate_sftp_password=True,
)
Expand All @@ -116,7 +116,7 @@ async def generate_sftp_password(*, client: AsyncGcore, sftp_storage_id: int) ->
async def set_custom_sftp_password(*, client: AsyncGcore, sftp_storage_id: int) -> None:
print("\n=== SET CUSTOM SFTP PASSWORD ===")
custom_password = "MyNewSecurePassword456!"
await client.storage.credentials.recreate(
await client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=sftp_storage_id,
sftp_password=custom_password,
)
Expand All @@ -126,7 +126,7 @@ async def set_custom_sftp_password(*, client: AsyncGcore, sftp_storage_id: int)

async def delete_sftp_password(*, client: AsyncGcore, sftp_storage_id: int) -> None:
print("\n=== DELETE SFTP PASSWORD ===")
await client.storage.credentials.recreate(
await client.storage.credentials.recreate( # pyright: ignore[reportDeprecated]
storage_id=sftp_storage_id,
delete_sftp_password=True,
)
Expand All @@ -137,7 +137,7 @@ async def delete_sftp_password(*, client: AsyncGcore, sftp_storage_id: int) -> N
async def delete_storage(*, client: AsyncGcore, storage_id: int) -> None:
"""Delete a single storage"""
print("\n=== DELETE STORAGE ===")
await client.storage.delete(storage_id=storage_id)
await client.storage.delete(storage_id=storage_id) # pyright: ignore[reportDeprecated]
print(f"Storage {storage_id} deleted successfully")
print("======================")

Expand Down
18 changes: 9 additions & 9 deletions examples/storage/s3_buckets.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def main() -> None:
def create_s3_storage(*, client: Gcore) -> int:
print("\n=== CREATE S3 STORAGE ===")
storage_name = f"s3-bucket-example-{int(time.time())}"
storage = client.storage.create(
storage = client.storage.create( # pyright: ignore[reportDeprecated]
name=storage_name,
type="s3",
type="s3_compatible",
location="s-ed1",
)
print(f"Created Storage: ID={storage.id}, Name={storage.name}, Type={storage.type}, Location={storage.location}")
Expand Down Expand Up @@ -66,7 +66,7 @@ def create_bucket(*, client: Gcore, storage_id: int) -> str:
print("\n=== CREATE BUCKET ===")
timestamp = int(time.time())
bucket_name = f"example-bucket-{timestamp}"
client.storage.buckets.create(
client.storage.buckets.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
)
Expand All @@ -77,7 +77,7 @@ def create_bucket(*, client: Gcore, storage_id: int) -> str:

def list_buckets(*, client: Gcore, storage_id: int) -> None:
print("\n=== LIST BUCKETS ===")
buckets = client.storage.buckets.list(storage_id=storage_id)
buckets = client.storage.buckets.list(storage_id=storage_id) # pyright: ignore[reportDeprecated]
for count, bucket in enumerate(buckets, 1):
lifecycle_info = f", Lifecycle: {bucket.lifecycle} days" if bucket.lifecycle and bucket.lifecycle > 0 else ""
print(f" {count}. Bucket: Name={bucket.name}{lifecycle_info}")
Expand All @@ -86,7 +86,7 @@ def list_buckets(*, client: Gcore, storage_id: int) -> None:

def set_bucket_lifecycle(*, client: Gcore, storage_id: int, bucket_name: str) -> None:
print("\n=== SET BUCKET LIFECYCLE ===")
client.storage.buckets.lifecycle.create(
client.storage.buckets.lifecycle.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
expiration_days=30,
Expand All @@ -97,7 +97,7 @@ def set_bucket_lifecycle(*, client: Gcore, storage_id: int, bucket_name: str) ->

def set_bucket_cors(*, client: Gcore, storage_id: int, bucket_name: str) -> None:
print("\n=== SET BUCKET CORS ===")
client.storage.buckets.cors.create(
client.storage.buckets.cors.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
allowed_origins=["*"],
Expand All @@ -108,7 +108,7 @@ def set_bucket_cors(*, client: Gcore, storage_id: int, bucket_name: str) -> None

def set_bucket_policy(*, client: Gcore, storage_id: int, bucket_name: str) -> None:
print("\n=== SET BUCKET POLICY ===")
client.storage.buckets.policy.create(
client.storage.buckets.policy.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
)
Expand All @@ -118,7 +118,7 @@ def set_bucket_policy(*, client: Gcore, storage_id: int, bucket_name: str) -> No

def delete_bucket(*, client: Gcore, storage_id: int, bucket_name: str) -> None:
print("\n=== DELETE BUCKET ===")
client.storage.buckets.delete(
client.storage.buckets.delete( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
)
Expand All @@ -128,7 +128,7 @@ def delete_bucket(*, client: Gcore, storage_id: int, bucket_name: str) -> None:

def delete_storage(*, client: Gcore, storage_id: int) -> None:
print("\n=== DELETE STORAGE ===")
client.storage.delete(storage_id=storage_id)
client.storage.delete(storage_id=storage_id) # pyright: ignore[reportDeprecated]
print(f"Storage {storage_id} deleted successfully")
print("======================")

Expand Down
18 changes: 9 additions & 9 deletions examples/storage/s3_buckets_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ async def main() -> None:
async def create_s3_storage(*, client: AsyncGcore) -> int:
print("\n=== CREATE S3 STORAGE ===")
storage_name = f"s3-bucket-example-{int(time.time())}"
storage = await client.storage.create(
storage = await client.storage.create( # pyright: ignore[reportDeprecated]
name=storage_name,
type="s3",
type="s3_compatible",
location="s-ed1",
)
print(f"Created Storage: ID={storage.id}, Name={storage.name}, Type={storage.type}, Location={storage.location}")
Expand Down Expand Up @@ -65,7 +65,7 @@ async def create_bucket(*, client: AsyncGcore, storage_id: int) -> str:
print("\n=== CREATE BUCKET ===")
timestamp = int(time.time())
bucket_name = f"example-bucket-{timestamp}"
await client.storage.buckets.create(
await client.storage.buckets.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
)
Expand All @@ -77,7 +77,7 @@ async def create_bucket(*, client: AsyncGcore, storage_id: int) -> str:
async def list_buckets(*, client: AsyncGcore, storage_id: int) -> None:
print("\n=== LIST BUCKETS ===")
count = 1
async for bucket in client.storage.buckets.list(storage_id=storage_id):
async for bucket in client.storage.buckets.list(storage_id=storage_id): # pyright: ignore[reportDeprecated]
lifecycle_info = f", Lifecycle: {bucket.lifecycle} days" if bucket.lifecycle and bucket.lifecycle > 0 else ""
print(f" {count}. Bucket: Name={bucket.name}{lifecycle_info}")
count += 1
Expand All @@ -86,7 +86,7 @@ async def list_buckets(*, client: AsyncGcore, storage_id: int) -> None:

async def set_bucket_lifecycle(*, client: AsyncGcore, storage_id: int, bucket_name: str) -> None:
print("\n=== SET BUCKET LIFECYCLE ===")
await client.storage.buckets.lifecycle.create(
await client.storage.buckets.lifecycle.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
expiration_days=30,
Expand All @@ -97,7 +97,7 @@ async def set_bucket_lifecycle(*, client: AsyncGcore, storage_id: int, bucket_na

async def set_bucket_cors(*, client: AsyncGcore, storage_id: int, bucket_name: str) -> None:
print("\n=== SET BUCKET CORS ===")
await client.storage.buckets.cors.create(
await client.storage.buckets.cors.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
allowed_origins=["*"],
Expand All @@ -108,7 +108,7 @@ async def set_bucket_cors(*, client: AsyncGcore, storage_id: int, bucket_name: s

async def set_bucket_policy(*, client: AsyncGcore, storage_id: int, bucket_name: str) -> None:
print("\n=== SET BUCKET POLICY ===")
await client.storage.buckets.policy.create(
await client.storage.buckets.policy.create( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
)
Expand All @@ -118,7 +118,7 @@ async def set_bucket_policy(*, client: AsyncGcore, storage_id: int, bucket_name:

async def delete_bucket(*, client: AsyncGcore, storage_id: int, bucket_name: str) -> None:
print("\n=== DELETE BUCKET ===")
await client.storage.buckets.delete(
await client.storage.buckets.delete( # pyright: ignore[reportDeprecated]
bucket_name=bucket_name,
storage_id=storage_id,
)
Expand All @@ -128,7 +128,7 @@ async def delete_bucket(*, client: AsyncGcore, storage_id: int, bucket_name: str

async def delete_storage(*, client: AsyncGcore, storage_id: int) -> None:
print("\n=== DELETE STORAGE ===")
await client.storage.delete(storage_id=storage_id)
await client.storage.delete(storage_id=storage_id) # pyright: ignore[reportDeprecated]
print(f"Storage {storage_id} deleted successfully")
print("======================")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gcore"
version = "0.33.0"
version = "0.34.0"
description = "The official Python library for the gcore API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/gcore/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "gcore"
__version__ = "0.33.0" # x-release-please-version
__version__ = "0.34.0" # x-release-please-version
Loading
Loading