class myParent(object):

    def __init__(self, parentId):
        self.id = parentId
self.children = []

def createChild(self, name):
    self.children.append(myChild(name, self))

def getChildren(self):
    return self.children


class myChild(object):

    def __init__(self, childId, parent):
        self.id = childId
self.parent = parent

def getParentId(self):
    return self.parent.id
p = myParent('parent01')
p.createChild('child01')
print(p.getChildren()[0].getParentId())
Python: Getting baseclass values from derived class