title: SQLAlchemy - SQL Server connection
body: <p>I have used postgresql with SQLAlchemy without issue but am trying to get at database that's in Azure running on SQL Server. I am unable to connect and can't really figure out why. I have searched quite a bit and have come across most articles pointing me towards using the <code>create_engine</code> but I can't seem to get that to work with using ORM. Here is my current code:</p>
  
  <p><strong>EXCEPTION</strong> </p>
  
  <blockquote>
    <p>sqlalchemy.exc.NoSuchModuleError: Can't load plugin:
    sqlalchemy.dialects:sqlserver</p>
  </blockquote>
  
  <pre><code>from flask import Flask
  from models import db, People
  
  app = Flask(__name__)
  app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlserver://&lt;connectionString&gt;'
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
  db.init_app(app)
  
  @app.route('/')
  def hello_world():
      #Exception here
      people = People.query.filter_by(birthYear=12).all()
      return 'Hello World!'
  
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>Azure offers me 4 different connection strings:</p>
  
  <ul>
  <li>ADO.NET</li>
  <li>JDBC</li>
  <li>ODBC</li>
  <li>PHP (not an option for me since i'm not using PHP)</li>
  </ul>
  
  <p>Is there any way to make SQLAlchemy work with SQL Server?</p>
  
  <p><a href="https://docs.sqlalchemy.org/en/latest/dialects/mssql.html" rel="nofollow noreferrer">https://docs.sqlalchemy.org/en/latest/dialects/mssql.html</a></p>