diff --git a/pydase_service_base/database/__init__.py b/pydase_service_base/database/__init__.py index a540e40..bba7fc3 100644 --- a/pydase_service_base/database/__init__.py +++ b/pydase_service_base/database/__init__.py @@ -16,6 +16,20 @@ except ImportError: ) +try: + import influxdb # noqa + + from .influxdbv1_session import InfluxDBv1Session # type: ignore +except ImportError: + + class InfluxDBv1Session: # type: ignore + def __init__(self) -> None: + raise OptionalDependencyError( + "InfluxDBSession requires the 'influxdbv2' extra. " + "Please refer to https://gitlab.phys.ethz.ch/tiqi-projects/qchub/icon-services/pydase_service_base." + ) + + try: import sqlmodel # noqa @@ -30,4 +44,4 @@ except ImportError: ) -__all__ = ["InfluxDBSession", "PostgresDatabaseSession"] +__all__ = ["InfluxDBSession", "InfluxDBv1Session", "PostgresDatabaseSession"] diff --git a/pyproject.toml b/pyproject.toml index 23cda88..4542c98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pydase-service-base" -version = "0.2.0" +version = "0.2.1" description = "Repository storing the code that is common to all pydase services." authors = ["Mose Mueller "] license = "MIT"