Created
December 4, 2014 14:49
-
-
Save bryanyang0528/5a266013cd06440f5e15 to your computer and use it in GitHub Desktop.
path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_entity(self, key_or_path): | |
if isinstance(key_or_path, Key): | |
entities = self.get_entities([key_or_path]) | |
else: | |
key = Key.from_path(*key_or_path) | |
entities = self.get_entities([key]) | |
if entities: | |
return entities[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment