-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be79592
commit fcb7642
Showing
3 changed files
with
94 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import asyncio | ||
from asyncdb.drivers.clickhouse import clickhouse | ||
from pprint import pprint | ||
|
||
|
||
async def connect(db): | ||
async with await db.connection() as conn: | ||
print('HERE >>') | ||
pprint(await conn.test_connection()) | ||
print('END >>') | ||
|
||
if __name__ == "__main__": | ||
loop = asyncio.get_event_loop() | ||
params = { | ||
"url": "http://localhost:8123/", | ||
"user": "default", | ||
"password": "u69ebsZQ", | ||
"database": "default" | ||
} | ||
driver = clickhouse(params=params, loop=loop) | ||
print('DRV > ', driver) | ||
loop.run_until_complete(connect(driver)) |