__init__.py 574 字节
Newer Older
S
slguan 已提交
1 2 3 4 5 6 7 8 9 10

from .connection import TDengineConnection
from .cursor import TDengineCursor

# Globals
threadsafety = 0
paramstyle = 'pyformat'

__all__ = ['connection', 'cursor']

11

S
slguan 已提交
12 13 14 15 16 17 18 19 20 21 22 23
def connect(*args, **kwargs):
    """ Function to return a TDengine connector object

    Current supporting keyword parameters:
    @dsn: Data source name as string
    @user: Username as string(optional)
    @password: Password as string(optional)
    @host: Hostname(optional)
    @database: Database name(optional)

    @rtype: TDengineConnector
    """
24
    return TDengineConnection(*args, **kwargs)