Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 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.

Classes

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

Functions

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')