you can just do:

    def __init__(self, project, id):
        self.project = project
        self.connection = project.connection