Skip to content

Commit

Permalink
docs(storage): add documentation for blob and bucket name property (#89)
Browse files Browse the repository at this point in the history
Fixes #82
  • Loading branch information
HemangChothani committed Apr 16, 2020
1 parent 9550dad commit cecc7ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions google/cloud/storage/blob.py
Expand Up @@ -174,6 +174,10 @@ def __init__(
kms_key_name=None,
generation=None,
):
"""
property :attr:`name`
Get the blob's name.
"""
name = _bytes_to_unicode(name)
super(Blob, self).__init__(name=name)

Expand Down
4 changes: 4 additions & 0 deletions google/cloud/storage/bucket.py
Expand Up @@ -505,6 +505,10 @@ class Bucket(_PropertyMixin):
"""Allowed values for :attr:`location_type`."""

def __init__(self, client, name=None, user_project=None):
"""
property :attr:`name`
Get the bucket's name.
"""
name = _validate_name(name)
super(Bucket, self).__init__(name=name)
self._client = client
Expand Down

0 comments on commit cecc7ac

Please sign in to comment.