pdstools.utils.namespaces¶
Attributes¶
Exceptions¶
Missing dependencies exception. |
Classes¶
Lazy namespace meta. |
|
Lazy namespace. |
Functions¶
|
Decorator that triggers dependency checking before invoking |
Module Contents¶
- logger¶
- require_dependencies(func)¶
Decorator that triggers dependency checking before invoking
func.
- class LazyNamespace¶
Lazy namespace.
Subclasses declare
dependencies(a list of import names) and optionallydependency_group(the matchingpdstools[<extra>]extras group). Method calls trigger a lazy dependency check that raisesMissingDependenciesExceptionwith a friendly install hint when a required package is missing.Attribute access on missing methods (e.g.
ns.some_methodwithout calling) also triggers the dependency check, so introspection (hasattr,dir) surfaces missing-dep errors uniformly instead of returning a confusingAttributeError.- check_dependencies()¶
Check dependencies.