from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session,registry
from sqlalchemy import sql,Table,select,MetaData
import urllib

def getEngine(database):
    server = 'bi-dsa-udv\dsa' # to specify an alternate port
    username = 'admindenker' 
    password = 'biadmin#kode4rm2'


    connection_string = "DRIVER={SQL Server};Database="+database+";SERVER="+server
    connection_string = urllib.parse.quote_plus(connection_string) 
    connection_string = "mssql+pyodbc:///?odbc_connect=%s" % connection_string
    engine = create_engine(connection_string,  echo = True)
    return engine
