ledisdb/client/ledis-py/ledis/utils.py

11 lines
307 B
Python
Raw Normal View History

2014-06-30 06:56:32 +04:00
def from_url(url, db=None, **kwargs):
"""
2014-07-01 06:40:56 +04:00
Returns an active Ledis client generated from the given database URL.
2014-06-30 06:56:32 +04:00
Will attempt to extract the database id from the path url fragment, if
none is provided.
"""
2014-07-01 06:40:56 +04:00
from ledis.client import Ledis
return Ledis.from_url(url, db, **kwargs)