-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy path__init__.py
35 lines (28 loc) · 1.1 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
# Load modules from other classes
from .base import (
InRamConfigurationStore,
InRamPlainKeyStore,
InRamEncryptedKeyStore,
SqliteConfigurationStore,
SqlitePlainKeyStore,
SqliteEncryptedKeyStore,
)
from .sqlite import SQLiteFile, SQLiteCommon
__all__ = ["interfaces", "masterpassword", "base", "sqlite", "ram"]
def get_default_config_store(*args, **kwargs):
"""This method returns the default **configuration** store
that uses an SQLite database internally.
:params str appname: The appname that is used internally to distinguish
different SQLite files
"""
kwargs["appname"] = kwargs.get("appname", "graphene")
return SqliteConfigurationStore(*args, **kwargs)
def get_default_key_store(*args, config, **kwargs):
"""This method returns the default **key** store
that uses an SQLite database internally.
:params str appname: The appname that is used internally to distinguish
different SQLite files
"""
kwargs["appname"] = kwargs.get("appname", "graphene")
return SqliteEncryptedKeyStore(config=config, **kwargs)