Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

storage-kernel-provider-gcp-storage

GCP Cloud Storage provider for Storage Kernel.

This provider maps StorageLocation.bucket to a Cloud Storage bucket and StorageLocation.prefix to an object-name namespace.

Install

uv add storage-kernel-contracts storage-kernel-provider-gcp-storage

Usage

from storage_kernel.contracts import StorageClientOptions, StorageLocation, StoragePath
from storage_kernel.provider_gcp_storage import (
    GcpStorageProviderOptions,
    create_gcp_storage_client,
)

storage = create_gcp_storage_client(
    StorageClientOptions(location=StorageLocation(bucket="my-bucket", prefix="prod")),
    GcpStorageProviderOptions(project_id="my-project"),
)

await storage.send_content(StoragePath("docs/readme.txt"), "Hello")

The provider uses google-cloud-storage behind the provider boundary. When credentials and client are omitted, authentication follows Google Application Default Credentials. An injected client is caller-owned and may be used for custom SDK configuration or tests.

Provider Options

Option Purpose
project_id GCP project used by the SDK factory
credentials Explicit credentials dictionary passed to the SDK factory
public_base_url Optional CDN/custom base URL for get_public_url
client Optional caller-owned Google Storage client

Capabilities

  • full binary and text reads/writes
  • blob read streams
  • resumable writable upload streams
  • prefix-based directory listing and recursive deletion
  • same-provider native copy
  • Cloud Storage signed URLs
  • public URLs through public_base_url or the blob public URL

Provider SDK errors are normalized into Storage Kernel errors such as path not found, permission denied and provider error.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file storage_kernel_provider_gcp_storage-0.1.0a1.tar.gz.

File metadata

File hashes

Hashes for storage_kernel_provider_gcp_storage-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 f9e94fa2eb423f9271085bb1de0727c8b70d9340ee5216335b5bf4ea1c88b6e1
MD5 7514a066474fa03612de643be2bcbbf6
BLAKE2b-256 07fa23a67ff28a07ba56bd96fc8040f3fff57d00beabe2cc0f34d11b917cae04

See more details on using hashes here.

File details

Details for the file storage_kernel_provider_gcp_storage-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for storage_kernel_provider_gcp_storage-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 0efa31895813f787779d8e9bf1af248dee1db179a0174496209ab51432c726b6
MD5 bcb653c8eb1ea2355a019ce0cc3ef19a
BLAKE2b-256 7c6715ca5836c69773da9ba096508aa262e9c4cde6bac6c0ffb7425ed4710098

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page