0

I need to write a python application with use both of the mysql and sql server is there a general python module or library that can access both mysql and sql server as DBI with perl or should i use 2 libraries and if yes which libraries do you recommend .

3 Answers 3

3

I guess you are looking for SQLAlchemy. You will probably need some time getting into it, but it is invaluable once you have covered the basics.

SQLAlchemy acts as a frontend to other, database-specific libraries using the Python DB-API -- but beyond this, it provides a query builder library that abstracts out differences between databases' SQL syntax and permits programmatic query construction while still offering the full power of SQL.

Sign up to request clarification or add additional context in comments.

Comments

0

Python RDBMS modules implement DB-API.

1 Comment

Could you provide me which RDBMS modules are they and if they supported on windows ?
0

If you are looking for which connection drivers to use, I believe the only one that well work for both [MySQL (driver here) and SQLServer (native to windows/FreeTDS for linux) is pyodbc. @igor has the right idea, though, use SQLAlchemy, you can connect to each database using different engines, but use the same code to interact with both.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.