Install the package:
$ pip install pymssql
import pymssql
SERVER = "servername"
USER = "username"
PASSWORD = "password"
DATABASE = "dbname"
connection = pymssql.connect(server=SERVER, user=USER,
password=PASSWORD, database=DATABASE...