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 .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ branchProtectionRules:
- 'Kokoro'
- 'cla/google'
- 'Kokoro system-3.14'
- 'Kokoro system-3.9'
- 'Kokoro system-3.10'
- 'OwlBot Post Processor'
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "system-3.9"
value: "system-3.10"
}

# Credentials needed to test universe domain.
Expand Down
7 changes: 2 additions & 5 deletions .librarian/generator-input/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.14"
SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.14"]
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
SYSTEM_TEST_PYTHON_VERSIONS = ["3.10", "3.14"]
UNIT_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
CONFORMANCE_TEST_PYTHON_VERSIONS = ["3.12"]

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
Expand All @@ -44,9 +44,6 @@
"lint",
"lint_setup_py",
"system",
# TODO(https://github.com/googleapis/python-storage/issues/1499):
# Remove or restore testing for Python 3.7/3.8
"unit-3.9",
"unit-3.10",
"unit-3.11",
"unit-3.12",
Expand Down
3 changes: 0 additions & 3 deletions .librarian/generator-input/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
243 changes: 243 additions & 0 deletions google/cloud/storage/abstracts/base_blob.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The abstract for python-storage Blob."""

import abc


class BaseBlob(abc.ABC):
"""The abstract for python-storage Blob"""

@property
@abc.abstractmethod
def encryption_key(self):
"""Retrieve the customer-supplied encryption key for the object."""
raise NotImplementedError("Not Yet Implemented")

@encryption_key.setter
@abc.abstractmethod
def encryption_key(self, value):
"""Set the blob's encryption key."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def chunk_size(self):
"""Get the blob's default chunk size."""
raise NotImplementedError("Not Yet Implemented")

@chunk_size.setter
@abc.abstractmethod
def chunk_size(self, value):
"""Set the blob's default chunk size."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def metadata(self):
"""Retrieve arbitrary/application specific metadata for the object."""
raise NotImplementedError("Not Yet Implemented")

@metadata.setter
@abc.abstractmethod
def metadata(self, value):
"""Update arbitrary/application specific metadata for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def kms_key_name(self):
"""Resource name of Cloud KMS key used to encrypt the blob's contents."""
raise NotImplementedError("Not Yet Implemented")

@kms_key_name.setter
@abc.abstractmethod
def kms_key_name(self, value):
"""Set KMS encryption key for object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def custom_time(self):
"""Retrieve the custom time for the object."""
raise NotImplementedError("Not Yet Implemented")

@custom_time.setter
@abc.abstractmethod
def custom_time(self, value):
"""Set the custom time for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def bucket(self):
"""Bucket which contains the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def acl(self):
"""Create our ACL on demand."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def path(self):
"""Getter property for the URL path to this Blob."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def client(self):
"""The client bound to this blob."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def user_project(self):
"""Project ID billed for API requests made via this blob."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def public_url(self):
"""The public URL for this blob."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def component_count(self):
"""Number of underlying components that make up this object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def etag(self):
"""Retrieve the ETag for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def generation(self):
"""Retrieve the generation for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def id(self):
"""Retrieve the ID for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def media_link(self):
"""Retrieve the media download URI for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def metageneration(self):
"""Retrieve the metageneration for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def owner(self):
"""Retrieve info about the owner of the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def retention_expiration_time(self):
"""Retrieve timestamp at which the object's retention period expires."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def self_link(self):
"""Retrieve the URI for the object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def size(self):
"""Size of the object, in bytes."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def time_deleted(self):
"""Retrieve the timestamp at which the object was deleted."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def time_created(self):
"""Retrieve the timestamp at which the object was created."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def updated(self):
"""Retrieve the timestamp at which the object was updated."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def retention(self):
"""Retrieve the retention configuration for this object."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def soft_delete_time(self):
"""If this object has been soft-deleted, returns the time at which it became soft-deleted."""
raise NotImplementedError("Not Yet Implemented")

@property
@abc.abstractmethod
def hard_delete_time(self):
"""If this object has been soft-deleted, returns the time at which it will be permanently deleted."""
raise NotImplementedError("Not Yet Implemented")

@abc.abstractmethod
def reload(
self,
client=None,
projection="noAcl",
if_etag_match=None,
if_etag_not_match=None,
if_generation_match=None,
if_generation_not_match=None,
if_metageneration_match=None,
if_metageneration_not_match=None,
timeout=None,
retry=None,
soft_deleted=None,
):
raise NotImplementedError("Not Yet Implemented.")

@abc.abstractmethod
def open(
self,
mode="r",
chunk_size=None,
ignore_flush=None,
encoding=None,
errors=None,
newline=None,
**kwargs,
):
"""Create a file handler for file-like I/O to or from this blob."""
raise NotImplementedError("Not Yet Implemented")
Loading