Python abstraction for repositories