cancel
Showing results for 
Search instead for 
Did you mean: 

sqlalchemy-sqlany with python 3.3

Former Member
4,510

Hi, is possible to use sqlalchemy-sqlany with python 3.3? It would be wonderful if it is possible. Particularly I need to use it with pyramid framework and few other dependencies that require python 3.

Updated Thanks a lot for quick response. Maybe I am not using it correctly, here what I get when try to connect:

Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin 
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
>>> from sqlalchemy import create_engine
>>> from sqlalchemy.dialects import registry
>>> registry.register('sqlalchemy_sqlany', 'sqlalchemy_sqlany.base', 'SQLAnyDialect')
>>> engine = create_engine('sqlalchemy_sqlany://admin:admin@10.211.55.5', echo=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/athli/Devel/jesse/ChartPoint/pyramid/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/engine/__init__.py", line 332, in create_engine
return strategy.create(*args, **kwargs)
File "/Users/athli/Devel/jesse/ChartPoint/pyramid/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/engine/strategies.py", line 50, in create
dialect_cls = u.get_dialect()
File "/Users/athli/Devel/jesse/ChartPoint/pyramid/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/engine/url.py", line 107, in get_dialect
cls = registry.load(name)
File "/Users/athli/Devel/jesse/ChartPoint/pyramid/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/util/langhelpers.py", line 91, in load
return self.impls[name]()
File "/Users/athli/Devel/jesse/ChartPoint/pyramid/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/util/langhelpers.py", line 116, in load
mod = __import__(modulepath)
File "/Users/athli/Devel/jesse/ChartPoint/pyramid/lib/python3.3/site-packages/sqlalchemy_sqlany/__init__.py", line 11, in <module>
from base import CHAR, VARCHAR, TIME, NCHAR, NVARCHAR,\\
ImportError: No module named 'base'

Accepted Solutions (1)

Accepted Solutions (1)

graeme_perrow
Advisor
Advisor

The SQLAlchemy driver currently only supports Python 2.x. I will investigate adding Python 3 support, but I have no estimate for when this might happen.

Version 1.0.1 of the sqlalchemy-sqlany driver has been posted. This version has been tested with Python 3.4. It requires version 1.0.6 of the sqlanydb python driver, also posted today.

Former Member
0 Kudos

Graeme, thanks a lot for looking into it. Very appreciated.

Former Member
0 Kudos

Thanks a lot!

Answers (0)