Skip to content
Closed
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a7e8864
Fix #133: preserve PB namespace in Key.from_protobuf.
tseaver Sep 24, 2014
a077d7d
Add docstrings for API method of g.datastore.key.Key.
tseaver Sep 24, 2014
0e625da
Fix #134: enforce contract that *args must be pairs.
tseaver Sep 24, 2014
fe1450b
Propose a contract for Key.parent.
tseaver Sep 24, 2014
c8f6aa4
Fix #135: enforce contract for Key.parent().
tseaver Sep 24, 2014
f107fda
Incorporate feedback from @dhermes.
tseaver Sep 25, 2014
7076c4d
Merge branch 'add_key_docstrings' into 133-key.from_protobuf-preserve…
tseaver Sep 25, 2014
19c6382
Merge branch 'add_key_docstrings' into 134-key-from_path-contract
tseaver Sep 25, 2014
4500f5e
Merge branch 'add_key_docstrings' into 135-key-parent-contract
tseaver Sep 25, 2014
37dd328
Incorporate feedback from @dhermes.
tseaver Sep 25, 2014
d1280f3
Incorporate feedback from @dhermes.
tseaver Sep 25, 2014
8ce18c9
Merge branch 'add_key_docstrings' into 135-key-parent-contract
tseaver Sep 25, 2014
e6ad297
Fix #137: default key based on filename.
tseaver Sep 26, 2014
fb756b2
Fix #138: clear existing (local) ACL when saving ACL to server.
tseaver Sep 26, 2014
2f93065
Added bucket method to upload files from a file object.
Sep 21, 2014
e19cf86
Fix #139: clear existing (local) ACL when saving defaultObjectACL to…
tseaver Sep 26, 2014
ccd8a5e
Fix #140: make 'path' required for Connection.api_request.
tseaver Sep 26, 2014
e346282
Fix #141: remove spurious *args / **kwargs from API methods.
tseaver Sep 26, 2014
be6e9b7
Fix #143: off-by-one range in iterator.KeyIterator.get_headers.
tseaver Sep 26, 2014
0a5fe6b
Merge pull request #184 from tseaver/add_key_docstrings
silvolu Sep 29, 2014
5c3d8ae
Merge pull request #198 from dhermes/datastore-cnxn-inherit-generic
silvolu Sep 29, 2014
62e887d
Merge pull request #145 from kleyow/files
silvolu Sep 30, 2014
60887ab
Merge pull request #191 from tseaver/137-upload_file-guess_key_based_…
silvolu Sep 30, 2014
23fc80f
Merge pull request #192 from tseaver/138-save_acl-clear_existing_loca…
silvolu Sep 30, 2014
d8b4e36
Merge pull request #193 from tseaver/139-save_default_object_acl-clea…
silvolu Sep 30, 2014
3bd6bd8
Merge pull request #194 from tseaver/140-connection.api_request-handl…
silvolu Sep 30, 2014
bc53038
Merge pull request #196 from tseaver/143-storage.iterator.KeyDataIter…
silvolu Sep 30, 2014
77e5f0b
Merge pull request #183 from tseaver/133-key.from_protobuf-preserve-n…
silvolu Sep 30, 2014
1bb281c
Merge pull request #185 from tseaver/134-key-from_path-contract
silvolu Sep 30, 2014
9af7d1b
Merge pull request #186 from tseaver/135-key-parent-contract
silvolu Sep 30, 2014
b848468
Fix #141: remove spurious *args / **kwargs from API methods.
tseaver Sep 26, 2014
0ba7398
Merge branch '141-connection.get_bucket-spurious_args_kwargs' of gith…
tseaver Oct 1, 2014
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
10 changes: 5 additions & 5 deletions gcloud/datastore/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _clone(self):

@classmethod
def from_protobuf(cls, pb, dataset=None):
"""Factory method for creating an key based on a protobuf.
"""Factory method for creating a key based on a protobuf.

The protobuf should be one returned from the Cloud Datastore Protobuf API.

Expand Down Expand Up @@ -111,7 +111,7 @@ def to_protobuf(self):

@classmethod
def from_path(cls, *args, **kwargs):
"""Factory method for creating an key based on a path.
"""Factory method for creating a key based on a path.

:type args: :class:`tuple
:param args: sequence of even length, where the first of each
Expand Down Expand Up @@ -140,10 +140,10 @@ def from_path(cls, *args, **kwargs):
return cls(**kwargs)

def is_partial(self):
"""Boolen test: is the key fully mapped onto a backend entity?
"""Boolean test: is the key fully mapped onto a backend entity?

:rtype: :class:`bool`
:returns: True if the last element of the key's path has either an 'id'
:returns: True if the last element of the key's path has neither an 'id'
or a 'name'.
"""
return (self.id_or_name() is None)
Expand All @@ -155,7 +155,7 @@ def dataset(self, dataset=None):
:param dataset: A dataset instance for the key.

:rtype: :class:`Key` (for setter); or
:class:`gcloud.datastore.dataset.Dataset` (for getter)
:class:`gcloud.datastore.dataset.Dataset` (for getter)
:returns: a new key, cloned from self., with the given dataset (setter);
or self's dataset (getter).
"""
Expand Down