Coverage for src/metaclass_registry/__init__.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-02 00:58 +0000

1""" 

2metaclass-registry: Zero-boilerplate metaclass-driven plugin registry system. 

3 

4This package provides a generic metaclass infrastructure for automatic plugin 

5registration with lazy discovery, caching, and zero boilerplate. 

6""" 

7 

8__version__ = "0.2.2" 

9 

10from .cache import RegistryCacheManager 

11from .core import ( 

12 PRIMARY_KEY, 

13 AutoRegisterMeta, 

14 LazyDiscoveryDict, 

15 RegisteredEnumMeta, 

16 RegistryConfig, 

17 RegistryFamily, 

18 RegistryKeyAttribute, 

19 SecondaryRegistry, 

20 SecondaryRegistryDict, 

21 extract_key_from_backend_suffix, 

22 extract_key_from_class_name, 

23 extract_key_from_handler_suffix, 

24 make_suffix_extractor, 

25) 

26from .discovery import ( 

27 discover_registry_classes, 

28 discover_registry_classes_recursive, 

29 import_module_preserving_root_logging, 

30) 

31from .exceptions import CacheError, DiscoveryError, RegistryError 

32 

33__all__ = [ 

34 # Core 

35 "AutoRegisterMeta", 

36 "RegistryConfig", 

37 "RegistryFamily", 

38 "RegistryKeyAttribute", 

39 "RegisteredEnumMeta", 

40 "PRIMARY_KEY", 

41 "SecondaryRegistry", 

42 "LazyDiscoveryDict", 

43 "SecondaryRegistryDict", 

44 "extract_key_from_class_name", 

45 "extract_key_from_handler_suffix", 

46 "extract_key_from_backend_suffix", 

47 "make_suffix_extractor", 

48 # Discovery 

49 "discover_registry_classes", 

50 "discover_registry_classes_recursive", 

51 "import_module_preserving_root_logging", 

52 # Cache 

53 "RegistryCacheManager", 

54 # Exceptions 

55 "RegistryError", 

56 "DiscoveryError", 

57 "CacheError", 

58]