Best Python database connectors for Postgresql, Microsoft SQL Server, MySQL and more

Figuring out which Python database connector package to use with which database can be tricky. There are many packages out there that work with each database, but some are much easier to use and better maintained than others. A generic search may turn up sub-par packages that are difficult to install and poorly documented.

From personal experience, these are the best Python packages to connect Python to Postgresql, Microsoft SQL Server and MySQL.  Each of these packages install via pip. Each package works on Windows, Linux and Mac OS operating systems, and each one is really well documented. 

Use these packages when you’re connecting to your database. You will spend less time trying to resolve obscure installation and OBDC errors, and you will get querying faster.

DatabasePython connector packageDocumentation
Postgresqlpsycopg2Documentation
Microsoft SQL serverpyodbcDocumentation
MySQLPyMySQLDocumentation
MongoDBPyMongoDocumentation