Library for writing class-based declarative model systems

Think Django models but for anything.