Implementation of a mail storage api in python