Python 3.9 is now generally available.

Module: google.appengine.datastore.datastore_index_xml

Directly processes text of datastore-indexes.xml.

IndexesXmlParser is called with an XML string to produce an IndexXml object containing the data from the XML.

  • IndexesXmlParser converts XML to Index object.
  • Index describes a single index specified in datastore-indexes.xml.


class IndexesXmlParser: Provides logic for walking down XML tree and pulling data.


IndexesXmlToIndexDefinitions(...): Converts a <datastore-indexes> XML string into an IndexDefinitions objects.

IsAutoGenerated(...): Tests if the given datastore-indexes.xml string implies auto-generation.

BAD_DIRECTION ('<property> tag attribute "direction" must have value "asc" or "desc", given ' '"%s"')
BAD_MODE '<property> tag attribute "mode" must have value "geospatial", given "%s"'
MISSING_KIND '<datastore-index> node has missing attribute "kind".'
MODE_AND_ANCESTOR_SPECIFIED '<property> tag attribute "mode" cannot be specifed with "ancestor"'
MODE_AND_DIRECTION_SPECIFIED '<datastore-index> node has both direction and mode specfied'
NAME_MISSING ('<datastore-index> node with kind "%s" needs to have a name attribute ' 'specified for its <property> node')