Skip to content

Commit

Permalink
Add DB API 2.0 connect parameters examples
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Oct 21, 2020
1 parent a217f96 commit 78cec4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clickhouse_driver/dbapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def connect(dsn=None, user=None, password=None, host=None, port=None,
"""
Create a new database connection.
The connection parameters can be specified via DSN:
The connection can be specified via DSN:
``conn = clickhouse_driver.connect("clickhouse://localhost/test")``
``conn = connect("clickhouse://localhost/test?param1=value1&...")``
or using database and credentials arguments:
``conn = clickhouse_driver.connect(database="test", user="default",
password="default", host="localhost")``
``conn = connect(database="test", user="default", password="default",
host="localhost", **kwargs)``
The basic connection parameters are:
Expand Down

0 comments on commit 78cec4f

Please sign in to comment.