druid-io / pydruid

A Python connector for Druid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version 0.6.3 is broken if you don't already have sqlalchemy installed

scottbelden opened this issue · comments

With a fresh python environment, if you do pip install pydruid and then do python -c "from pydruid.db import connect" you get ModuleNotFoundError: No module named 'sqlalchemy'.

This is because sqlalchemy is not a required dependency (only an extra):

pydruid/setup.py

Lines 7 to 12 in 893506b

extras_require = {
"pandas": ["pandas"],
"async": ["tornado"],
"sqlalchemy": ["sqlalchemy"],
"cli": ["pygments", "prompt_toolkit>=2.0.0", "tabulate"],
}

However, pydruid.db.exceptions does an import of it without checking if it is installed:

from sqlalchemy.exc import CompileError