google.appengine.api.datastore_entities.GdKind

A base class for gd namespace kinds.

Inherits From: Entity, expected_type

This class contains common logic for all gd namespace kinds. For example, this class translates datastore (app id, kind, key) tuples to tag: URIs appropriate for use in tags.

kind String
title String
kind_properties List of strings
contact_properties List of string

Methods

FromPb

View source

Static factory method. Returns the Entity representation of the given protocol buffer (datastore_pb.Entity).

Args
pb datastore_pb.Entity or str encoding of a datastore_pb.Entity
validate_reserved_properties deprecated
default_kind str, the kind to use if the pb has no key.

Returns
Entity the Entity representation of pb

ToPb

View source

Converts this Entity to its protocol buffer representation.

Returns
entity_pb2.Entity

ToXml

View source

Returns an XML representation of this entity, as a string.

app

View source

Returns the name of the application that created this entity, a string or None if not set.

clear

D.clear() -> None. Remove all items from D.

copy

View source

The copy method is not supported.

entity_group

View source

Returns this entity's entity group as a Key.

Note that the returned Key will be incomplete if this is a a root entity and its key is incomplete.

fromkeys

Create a new dictionary with keys from iterable and values set to value.

get

Return the value for key if key is in the dictionary, else default.

is_projection

View source

Returns if this entity is a projection from full entity.

Projected entities:

  • may not contain all properties from the original entity;
  • only contain single values for lists;
  • may not contain values with the same type as the original entity.

is_saved

View source

Returns if this entity has been saved to the datastore.

items

D.items() -> a set-like object providing a view on D's items

key

View source

Returns this entity's primary key, a Key instance.

keys

D.keys() -> a set-like object providing a view on D's keys

kind

View source

Returns this entity's kind, a string.

namespace

View source

Returns the namespace of this entity, a string or None.

parent

View source

Returns this entity's parent, as a Key. If this entity has no parent, returns None.

pop

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

set_unindexed_properties

View source

setdefault

View source

If the property exists, returns its value. Otherwise sets it to value.

If the property name is the empty string or not a string, raises BadPropertyError. If the value is not a supported type, raises BadValueError.

unindexed_properties

View source

Returns this entity's unindexed properties, as a frozenset of strings.

update

View source

Updates this entity's properties from the values in other.

If any property name is the empty string or not a string, raises BadPropertyError. If any value is not a supported type, raises BadValueError.

values

D.values() -> an object providing a view on D's values

__contains__

True if the dictionary has the specified key, else False.

__eq__

Return self==value.

__ge__

Return self>=value.

__getitem__

x.getitem(y) <==> x[y]

__gt__

Return self>value.

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__ne__

Return self!=value.

__or__

Return self|value.

__ror__

Return value|self.

FOOTER '\n</entry>'
HEADER ("<entry xmlns:gd='http://schemas.google.com/g/2005'>\n" " <category scheme='http://schemas.google.com/g/2005#kind'\n" " term='http://schemas.google.com/g/2005#%s' />")