Skip to content

Commit

Permalink
Accept engine_kwargs kwarg in connect call
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanw committed Jan 31, 2014
1 parent cd1d3a1 commit 77025ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__all__ = ['Database', 'Table', 'freeze', 'connect']


def connect(url=None, schema=None, reflectMetadata=True):
def connect(url=None, schema=None, reflectMetadata=True, engine_kwargs=None):
"""
Opens a new connection to a database. *url* can be any valid `SQLAlchemy engine URL`_.
If *url* is not defined it will try to use *DATABASE_URL* from environment variable.
Expand All @@ -31,4 +31,5 @@ def connect(url=None, schema=None, reflectMetadata=True):
if url.startswith("sqlite://"):
sqlite_datetime_fix()

return Database(url, schema=schema, reflectMetadata=reflectMetadata)
return Database(url, schema=schema, reflectMetadata=reflectMetadata,
engine_kwargs=engine_kwargs)

0 comments on commit 77025ce

Please sign in to comment.