Python 3.9 is now generally available.

google.appengine.ext.db.SelfReference

Create a self reference.

Function for declaring a self referencing property on a model.

Example:

class HtmlNode(db.Model): parent = db.SelfReferenceProperty('Parent', 'children')

verbose_name User friendly name of property.
collection_name Name of collection on model.

ConfigurationError if reference_class provided as parameter.