msticpy/data/drivers/__init__.py
def import_driver(data_environment: DataEnvironment) -> type:
    """Import driver class for a data environment."""
    mod_name, cls_name = _ENVIRONMENT_DRIVERS.get(data_environment, (None, None))

    if not (mod_name and cls_name):
        raise ValueError(
            f"No driver available for environment {data_environment.name}.",
            "Possible values are:",
            ", ".join(env.name for env in _ENVIRONMENT_DRIVERS),
        )

    imp_module = importlib.import_module(
        f"msticpy.data.drivers.{mod_name}", package="msticpy"
    )
    return getattr(imp_module, cls_name)
Import driver class for a data environment.
Import driver class for a data environment.
Import driver class for a data environment .
def import_driver(data_environment: DataEnvironment) -> type:
    mod_name, cls_name = _ENVIRONMENT_DRIVERS.get(data_environment, (None, None))
    if not (mod_name and cls_name):
        raise ValueError(
            f"No driver available for environment {data_environment.name}.",
            "Possible values are:",
            ", ".join(env.name for env in _ENVIRONMENT_DRIVERS),
        )
    imp_module = importlib.import_module(
        f"msticpy.data.drivers.{mod_name}", package="msticpy"
    )
    return getattr(imp_module, cls_name)
def import_driver ( data_environment : DataEnvironment ) -> type : mod_name , cls_name = _ENVIRONMENT_DRIVERS . get ( data_environment , ( None , None ) ) if not ( mod_name and cls_name ) : raise ValueError ( f"No driver available for environment {data_environment.name}." , "Possible values are:" , ", " . join ( env . name for env in _ENVIRONMENT_DRIVERS ) , ) imp_module = importlib . import_module ( f"msticpy.data.drivers.{mod_name}" , package = "msticpy" ) return getattr ( imp_module , cls_name )
Import driver class for a data environment.
Import driver class for a data environment .
"""Import driver class for a data environment."""
data_environment
DataEnvironment