Skip to content

Commit

Permalink
Add warning about missing module
Browse files Browse the repository at this point in the history
  • Loading branch information
kesmit13 committed Feb 9, 2024
1 parent 1f3e19e commit 5f7436c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions singlestoredb/alchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
from sqlalchemy_singlestoredb import * # noqa: F403, F401
has_sqlalchemy = True
except ImportError:
import warnings
warnings.warn(
'sqlalchemy_singlestoredb must be installed to use this module',
RuntimeWarning,
)
has_sqlalchemy = False

from ..connection import build_params
Expand Down

0 comments on commit 5f7436c

Please sign in to comment.