From 92b411beb373aa82f5b5b87d75cf712310e2bc40 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 2 Jul 2025 21:07:13 -0400 Subject: [PATCH] Add EntryType enum --- src/password_manager/__init__.py | 4 +++- src/password_manager/entry_types.py | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/password_manager/entry_types.py diff --git a/src/password_manager/__init__.py b/src/password_manager/__init__.py index 97b0288..fd7cf15 100644 --- a/src/password_manager/__init__.py +++ b/src/password_manager/__init__.py @@ -4,7 +4,7 @@ from importlib import import_module -__all__ = ["PasswordManager", "ConfigManager", "Vault"] +__all__ = ["PasswordManager", "ConfigManager", "Vault", "EntryType"] def __getattr__(name: str): @@ -14,4 +14,6 @@ def __getattr__(name: str): 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}'") diff --git a/src/password_manager/entry_types.py b/src/password_manager/entry_types.py new file mode 100644 index 0000000..bfdc5c5 --- /dev/null +++ b/src/password_manager/entry_types.py @@ -0,0 +1,13 @@ +# password_manager/entry_types.py +"""Enumerations for entry types used by SeedPass.""" + +from enum import Enum + + +class EntryType(str, Enum): + """Enumeration of different entry types supported by the manager.""" + + PASSWORD = "password" + TOTP = "totp" + SSH = "ssh" + SEED = "seed"