ldappr/ldappr/api.py

9 lines
253 B
Python

from connection import Connection, AuthConnection
def connect_to(server, *args, **kwargs):
if args or 'bind_dn' and 'password' in kwargs:
#if args:
return AuthConnection(server, *args, **kwargs)
return Connection(server, **kwargs)