Files
Joe SpadolaandGitHub 55dcd7db4c Replace pylint with ruff for linting and formatting (#703)
* migrate from pylint to ruff

* ruff format/lint switch over

* add formatting commit

* update changelog
2026-04-02 16:09:59 -07:00

30 lines
721 B
Python

from clickhouse_connect.dbapi.connection import Connection
apilevel = "2.0" # PEP 249 DB API level
threadsafety = 2 # PEP 249 Threads may share the module and connections.
paramstyle = "pyformat" # PEP 249 Python extended format codes, e.g. ...WHERE name=%(name)s
class Error(Exception):
pass
def connect(
host: str | None = None,
database: str | None = None,
username: str | None = "",
password: str | None = "",
port: int | None = None,
**kwargs,
):
secure = kwargs.pop("secure", False)
return Connection(
host=host,
database=database,
username=username,
password=password,
port=port,
secure=secure,
**kwargs,
)