mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 15:58:48 +00:00
Refactor password manager modules
This commit is contained in:
19
src/seedpass/core/__init__.py
Normal file
19
src/seedpass/core/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# seedpass.core/__init__.py
|
||||
|
||||
"""Expose password manager components with lazy imports."""
|
||||
|
||||
from importlib import import_module
|
||||
|
||||
__all__ = ["PasswordManager", "ConfigManager", "Vault", "EntryType"]
|
||||
|
||||
|
||||
def __getattr__(name: str):
|
||||
if name == "PasswordManager":
|
||||
return import_module(".manager", __name__).PasswordManager
|
||||
if name == "ConfigManager":
|
||||
return import_module(".config_manager", __name__).ConfigManager
|
||||
if name == "Vault":
|
||||
return import_module(".vault", __name__).Vault
|
||||
if name == "EntryType":
|
||||
return import_module(".entry_types", __name__).EntryType
|
||||
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
Reference in New Issue
Block a user