h2integrate.core.supported_models#

class h2integrate.core.supported_models._ModelRegistry#

A dict subclass that imports model classes on first access.

Stores entries as "ClassName": "relative.module.path:ClassName" strings, where the module path is relative to the h2integrate package (the h2integrate. prefix is prepended automatically). On first __getitem__, get, or iteration over values, the class is imported, cached, and returned. This avoids importing every model module (and their heavy transitive dependencies) at package-load time, reducing computational cost of imports and running tests.

_PKG_PREFIX = 'h2integrate.'#
_resolve(key)#

Import and cache the class for key, returning the resolved class.

get(key, default=None)#

Return the model class for key, or default if not present.

copy()#

Return a new _ModelRegistry with the same (still-deferred) entries.