Skip to content

Commit

Permalink
Merge branch 'main' into update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cojenco authored May 7, 2024
2 parents 1cfb286 + 6ed22ee commit 5d5858f
Show file tree
Hide file tree
Showing 14 changed files with 280 additions and 85 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:a8a80fc6456e433df53fc2a0d72ca0345db0ddefb409f1b75b118dfd1babd952
# created: 2024-03-15T16:25:47.905264637Z
digest: sha256:5a4c19d17e597b92d786e569be101e636c9c2817731f80a5adec56b2aa8fe070
# created: 2024-04-12T11:35:58.922854369Z
5 changes: 5 additions & 0 deletions .github/auto-label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@
# limitations under the License.
requestsize:
enabled: true

path:
pullrequest: true
paths:
samples: "samples"
17 changes: 17 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Blunderbuss config
#
# This file controls who is assigned for pull requests and issues.
# Note: This file is autogenerated. To make changes to the assignee
# team, please update `codeowner_team` in `.repo-metadata.json`.
assign_issues:
- googleapis/cloud-storage-dpe

assign_issues_by:
- labels:
- "samples"
to:
- googleapis/python-samples-reviewers
- googleapis/cloud-storage-dpe

assign_prs:
- googleapis/cloud-storage-dpe
6 changes: 3 additions & 3 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ googleapis-common-protos==1.61.0 \
--hash=sha256:22f1915393bb3245343f6efe87f6fe868532efc12aa26b391b15132e1279f1c0 \
--hash=sha256:8a64866a97f6304a7179873a465d6eee97b7a24ec6cfd78e0f575e96b821240b
# via google-api-core
idna==3.4 \
--hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \
--hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
idna==3.7 \
--hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \
--hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0
# via requests
importlib-metadata==6.8.0 \
--hash=sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb \
Expand Down
5 changes: 5 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ Changelog
:maxdepth: 2

changelog

.. toctree::
:hidden:

summary_overview.md
22 changes: 22 additions & 0 deletions docs/summary_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
This is a templated file. Adding content to this file may result in it being
reverted. Instead, if you want to place additional content, create an
"overview_content.md" file in `docs/` directory. The Sphinx tool will
pick up on the content and merge the content.
]: #

# Google Cloud Storage API

Overview of the APIs available for Google Cloud Storage API.

## All entries

Classes, methods and properties & attributes for
Google Cloud Storage API.

[classes](https://cloud.google.com/python/docs/reference/storage/latest/summary_class.html)

[methods](https://cloud.google.com/python/docs/reference/storage/latest/summary_method.html)

[properties and
attributes](https://cloud.google.com/python/docs/reference/storage/latest/summary_property.html)
139 changes: 65 additions & 74 deletions google/cloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,13 @@ def delete(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:raises: :class:`google.cloud.exceptions.NotFound`
(propagated from
Expand Down Expand Up @@ -2769,26 +2775,17 @@ def upload_from_file(
"md5", "crc32c" and None. The default is None.
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry: (Optional) How to retry the RPC. A None value will disable
retries. A google.api_core.retry.Retry value will enable retries,
and the object will define retriable response codes and errors and
configure backoff and timeout options.
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
Retry object and activates it only if certain conditions are met.
This class exists to provide safe defaults for RPC calls that are
not technically safe to retry normally (due to potential data
duplication or other side-effects) but become safe to retry if a
condition such as if_generation_match is set.
See the retry.py source code and docstrings in this package
(google.cloud.storage.retry) for information on retry types and how
to configure them.
:param retry: (Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
Media operations (downloads and uploads) do not support non-default
predicates in a Retry object. The default will always be used. Other
configuration changes for Retry objects such as delays and deadlines
are respected.
predicates in a Retry object. Other configuration changes for Retry objects
such as delays and deadlines are respected.
:raises: :class:`~google.cloud.exceptions.GoogleCloudError`
if the upload response returns an error status.
Expand Down Expand Up @@ -2934,26 +2931,17 @@ def upload_from_filename(
"md5", "crc32c" and None. The default is None.
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry: (Optional) How to retry the RPC. A None value will disable
retries. A google.api_core.retry.Retry value will enable retries,
and the object will define retriable response codes and errors and
configure backoff and timeout options.
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
Retry object and activates it only if certain conditions are met.
This class exists to provide safe defaults for RPC calls that are
not technically safe to retry normally (due to potential data
duplication or other side-effects) but become safe to retry if a
condition such as if_generation_match is set.
See the retry.py source code and docstrings in this package
(google.cloud.storage.retry) for information on retry types and how
to configure them.
:param retry: (Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
Media operations (downloads and uploads) do not support non-default
predicates in a Retry object. The default will always be used. Other
configuration changes for Retry objects such as delays and deadlines
are respected.
predicates in a Retry object. Other configuration changes for Retry objects
such as delays and deadlines are respected.
"""

self._handle_filename_and_upload(
Expand Down Expand Up @@ -3063,26 +3051,17 @@ def upload_from_string(
"md5", "crc32c" and None. The default is None.
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry: (Optional) How to retry the RPC. A None value will disable
retries. A google.api_core.retry.Retry value will enable retries,
and the object will define retriable response codes and errors and
configure backoff and timeout options.
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
Retry object and activates it only if certain conditions are met.
This class exists to provide safe defaults for RPC calls that are
not technically safe to retry normally (due to potential data
duplication or other side-effects) but become safe to retry if a
condition such as if_generation_match is set.
See the retry.py source code and docstrings in this package
(google.cloud.storage.retry) for information on retry types and how
to configure them.
:param retry: (Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
Media operations (downloads and uploads) do not support non-default
predicates in a Retry object. The default will always be used. Other
configuration changes for Retry objects such as delays and deadlines
are respected.
predicates in a Retry object. Other configuration changes for Retry objects
such as delays and deadlines are respected.
"""
data = _to_bytes(data, encoding="utf-8")
string_buffer = BytesIO(data)
Expand Down Expand Up @@ -3209,23 +3188,17 @@ def create_resumable_upload_session(
(Optional) See :ref:`using-if-metageneration-not-match`
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry: (Optional) How to retry the RPC. A None value will disable
retries. A google.api_core.retry.Retry value will enable retries,
and the object will define retriable response codes and errors and
configure backoff and timeout options.
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
Retry object and activates it only if certain conditions are met.
This class exists to provide safe defaults for RPC calls that are
not technically safe to retry normally (due to potential data
duplication or other side-effects) but become safe to retry if a
condition such as if_generation_match is set.
See the retry.py source code and docstrings in this package
(google.cloud.storage.retry) for information on retry types and how
to configure them.
:param retry: (Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
Media operations (downloads and uploads) do not support non-default
predicates in a Retry object. The default will always be used. Other
configuration changes for Retry objects such as delays and deadlines
are respected.
predicates in a Retry object. Other configuration changes for Retry objects
such as delays and deadlines are respected.
:rtype: str
:returns: The resumable upload session URL. The upload can be
Expand Down Expand Up @@ -3631,7 +3604,13 @@ def compose(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
"""
sources_len = len(sources)
client = self._require_client(client)
Expand Down Expand Up @@ -3793,7 +3772,13 @@ def rewrite(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:rtype: tuple
:returns: ``(token, bytes_rewritten, total_bytes)``, where ``token``
Expand Down Expand Up @@ -3953,7 +3938,13 @@ def update_storage_class(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
"""
# Update current blob's storage class prior to rewrite
self._patch_property("storageClass", new_class)
Expand Down
32 changes: 28 additions & 4 deletions google/cloud/storage/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,13 @@ def delete_blob(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:raises: :class:`google.cloud.exceptions.NotFound` Raises a NotFound
if the blob isn't found. To suppress
Expand Down Expand Up @@ -1757,7 +1763,13 @@ def delete_blobs(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:raises: :class:`~google.cloud.exceptions.NotFound` (if
`on_error` is not passed).
Expand Down Expand Up @@ -1902,7 +1914,13 @@ def copy_blob(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:rtype: :class:`google.cloud.storage.blob.Blob`
:returns: The new Blob.
Expand Down Expand Up @@ -2049,7 +2067,13 @@ def rename_blob(
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
:param retry:
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
(Optional) How to retry the RPC.
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
policy which will only enable retries if ``if_generation_match`` or ``generation``
is set, in order to ensure requests are idempotent before retrying them.
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
to enable retries regardless of generation precondition setting.
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:rtype: :class:`Blob`
:returns: The newly-renamed blob.
Expand Down
4 changes: 2 additions & 2 deletions samples/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
google-cloud-pubsub==2.21.0
google-cloud-pubsub==2.21.1
google-cloud-storage==2.16.0
pandas===1.3.5; python_version == '3.7'
pandas===2.0.3; python_version == '3.8'
pandas==2.2.1; python_version >= '3.9'
pandas==2.2.2; python_version >= '3.9'
Loading

0 comments on commit 5d5858f

Please sign in to comment.