Core API

dbapix.create_engine(driver, *args, **kwargs)[source]

Build an Engine for the given driver:

engine = create_engine('postgres',
    host='localhost',
    database='example',
)
Parameters

driver (str) – The name of the database driver to use

The name can be either a specific implementation (e.g. "psycopg2"), or it can be generic. Generic names will be resolved to the first availible specific implementation (e.g. "mysql" resolves to the first of "mysqldb" or "pymysql" to exist.)

All args and kwargs are passed to the engine constructor, which are generally passed to the driver’s connect function.

An exception is tunnel; see SocketEngine for more.