This API is in the google.appengine.ext.ndb.metadata
module,
typically used via
from google.appengine.ext.ndb import metadata
.
Functions
- get_entity_group_version(key)
- Return the version of the entity group containing key.
This version is
guaranteed to increase on every change to the entity group. The version may
increase even in the absence of user-visible changes to the entity
group. May return
None
if the entity group was never written to.Warning: The behavior of entity group metadata is now different. The entity group version can increase independently of user updates. Previously, the entity group version increased only on user update. To maintain legacy behavior, use the entity group version workaround.
Arguments
- key
- key for an entity group.
- get_namespaces(start=None, end=None)
- Returns a list of namespace names.
Arguments
- start
- Don't return namespace names before this in alphabetical order.
- end
- Don't return namespace names after this in alphabetical order.
- get_kinds(start=None, end=None):
- Returns a list of kind names in the current namespace.
Arguments
- start
- Don't return kind names before this in alphabetical order.
- end
- Don't return kind names after this in alphabetical order.
- get_properties_of_kind(kind, start=None, end=None):
- Returns a list of property names for the given kind name
in the current namespace.
Arguments
- kind
- Which kind's properties to list.
- start
- Don't return property names before this in alphabetical order.
- end
- Don't return property names after this in alphabetical order.
- get_representations_of_kind(kind, start=None, end=None)
- Returns a
dict
mapping property names for the given kind name to lists of representation names such as 'STRING', 'BOOLEAN' or 'INT64'. Only looks in the current namespace. For a complete list of these types, see Representation Types- Returns a list of property names for the given kind name.
Arguments
- kind
- Which kind's properties to list.
- start
- Don't return property names before this in alphabetical order.
- end
- Don't return property names after this in alphabetical order.
- Returns a list of property names for the given kind name.
Representation Types
Property Class | Representation |
---|---|
StringProperty | STRING |
BooleanProperty | BOOLEAN |
IntegerProperty | INT64 |
FloatProperty | DOUBLE |
DateTimeProperty DateProperty TimeProperty |
INT64 |
UserProperty | USER |
BlobProperty | STRING |
BlobKeyProperty | STRING |
TextProperty | STRING |
GeoPtProperty | POINT |
GenericProperty | (Depends on what value is stored.) |
ComputedProperty | (Depends on what value is stored.) |
JsonProperty | STRING |
PickleProperty | STRING |
StructuredProperty |
(When you get representation types, StructuredProperty
properties won't be returned. Instead, it shows values for the
subproperties corresponding to their property types.)
|
LocalStructuredProperty | STRING |
KeyProperty | REFERENCE |