The import for this class and for EncryptionKeyRepository should be consistent. If they're public facing they should be imported in the module's __init__.py file and them by imported from the outside as "from openpassword import EncryptionKeyRepository" otherwise, both should be absent from __init__.py and imported as they do in here.