clickpy-client
Client for clickpy.clickhouse.com database.



Quick start
pip install clickpy-client
import asyncio
from clickpy import ClickPyClient
async def main():
clickpy = ClickPyClient()
tables = await clickpy.get_tables()
for table in tables:
print(f'Database: {table.database}; table: {table.name} rows: {table.total_rows}')
keywords = await clickpy.get_keywords_by_releases()
for keyword in keywords:
print(f'Database: {keyword.name}; releases: {keyword.releases}')
asyncio.run(main())
Config
The client uses a public connection. But if you have your own DB instance with a similar structure, you can override the access parameters via environment variables.
CLICKPY_HOST='https://clickpy-clickhouse.clickhouse.com'
CLICKPY_SECURE=True
CLICKPY_USERNAME='play'
CLICKPY_PASSWORD=''
Client Methods
get_tables
Get all tables in github
and pypi
databases.
get_keywords_by_releases
Get all keywords based on project description. Sorted by number of releases.
Contribute
Issue Tracker: https://gitlab.com/rocshers/python/clickpy-client/-/issues
Source Code: https://gitlab.com/rocshers/python/clickpy-client
Before adding changes:
make install-dev
After changes:
make format test