{"id":13609004,"url":"https://github.com/mymarilyn/clickhouse-driver","last_synced_at":"2025-05-12T13:26:57.537Z","repository":{"id":38272734,"uuid":"90912724","full_name":"mymarilyn/clickhouse-driver","owner":"mymarilyn","description":"ClickHouse Python Driver with native interface support","archived":false,"fork":false,"pushed_at":"2024-11-11T16:26:14.000Z","size":1473,"stargazers_count":1255,"open_issues_count":71,"forks_count":219,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-05-04T09:23:48.369Z","etag":null,"topics":["clickhouse","database","driver","native","yandex"],"latest_commit_sha":null,"homepage":"https://clickhouse-driver.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mymarilyn.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"xzkostyan"}},"created_at":"2017-05-10T22:13:04.000Z","updated_at":"2025-05-03T10:59:08.000Z","dependencies_parsed_at":"2022-07-12T17:22:18.248Z","dependency_job_id":"bd42015d-e555-479e-8e23-edcf845ce838","html_url":"https://github.com/mymarilyn/clickhouse-driver","commit_stats":{"total_commits":520,"total_committers":66,"mean_commits":7.878787878787879,"dds":0.1711538461538461,"last_synced_commit":"2d5b1aac70285ab108b73af62fddd3b37c713eab"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mymarilyn%2Fclickhouse-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mymarilyn%2Fclickhouse-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mymarilyn%2Fclickhouse-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mymarilyn%2Fclickhouse-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mymarilyn","download_url":"https://codeload.github.com/mymarilyn/clickhouse-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253127317,"owners_count":21858225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clickhouse","database","driver","native","yandex"],"created_at":"2024-08-01T19:01:31.653Z","updated_at":"2025-05-12T13:26:57.517Z","avatar_url":"https://github.com/mymarilyn.png","language":"Python","funding_links":["https://patreon.com/xzkostyan"],"categories":["数据库 Drivers","Python","数据库驱动程序","Database Drivers","Language bindings","Database Drivers [🔝](#readme)"],"sub_categories":["Python","ASGI Servers"],"readme":"ClickHouse Python Driver\n========================\n\n.. image:: https://img.shields.io/pypi/v/clickhouse-driver.svg\n    :target: https://pypi.org/project/clickhouse-driver\n\n.. image:: https://coveralls.io/repos/github/mymarilyn/clickhouse-driver/badge.svg?branch=master\n    :target: https://coveralls.io/github/mymarilyn/clickhouse-driver?branch=master\n\n.. image:: https://img.shields.io/pypi/l/clickhouse-driver.svg\n    :target: https://pypi.org/project/clickhouse-driver\n\n.. image:: https://img.shields.io/pypi/pyversions/clickhouse-driver.svg\n    :target: https://pypi.org/project/clickhouse-driver\n\n.. image:: https://img.shields.io/pypi/dm/clickhouse-driver.svg\n    :target: https://pypi.org/project/clickhouse-driver\n\n.. image:: https://github.com/mymarilyn/clickhouse-driver/actions/workflows/actions.yml/badge.svg\n   :target: https://github.com/mymarilyn/clickhouse-driver/actions/workflows/actions.yml\n\nClickHouse Python Driver with native (TCP) interface support.\n\nAsynchronous wrapper is available here: https://github.com/mymarilyn/aioch\n\nFeatures\n========\n\n- External data for query processing.\n\n- Query settings.\n\n- Compression support.\n\n- TLS support.\n\n- Types support:\n\n  * Float32/64\n  * [U]Int8/16/32/64/128/256\n  * Date/Date32/DateTime('timezone')/DateTime64('timezone')\n  * String/FixedString(N)\n  * Enum8/16\n  * Array(T)\n  * Nullable(T)\n  * Bool\n  * UUID\n  * Decimal\n  * IPv4/IPv6\n  * LowCardinality(T)\n  * SimpleAggregateFunction(F, T)\n  * Tuple(T1, T2, ...)\n  * Nested\n  * Map(key, value)\n\n- Query progress information.\n\n- Block by block results streaming.\n\n- Reading query profile info.\n\n- Receiving server logs.\n\n- Multiple hosts support.\n\n- Python DB API 2.0 specification support.\n\n- Optional NumPy arrays support.\n\nDocumentation\n=============\n\nDocumentation is available at https://clickhouse-driver.readthedocs.io.\n\nUsage\n=====\n\nThere are two ways to communicate with server:\n\n- using pure Client;\n- using DB API.\n\nPure Client example:\n\n    .. code-block:: python\n\n        \u003e\u003e\u003e from clickhouse_driver import Client\n        \u003e\u003e\u003e\n        \u003e\u003e\u003e client = Client('localhost')\n        \u003e\u003e\u003e\n        \u003e\u003e\u003e client.execute('SHOW TABLES')\n        [('test',)]\n        \u003e\u003e\u003e client.execute('DROP TABLE IF EXISTS test')\n        []\n        \u003e\u003e\u003e client.execute('CREATE TABLE test (x Int32) ENGINE = Memory')\n        []\n        \u003e\u003e\u003e client.execute(\n        ...     'INSERT INTO test (x) VALUES',\n        ...     [{'x': 100}]\n        ... )\n        1\n        \u003e\u003e\u003e client.execute('INSERT INTO test (x) VALUES', [[200]])\n        1\n        \u003e\u003e\u003e client.execute(\n        ...     'INSERT INTO test (x) '\n        ...     'SELECT * FROM system.numbers LIMIT %(limit)s',\n        ...     {'limit': 3}\n        ... )\n        []\n        \u003e\u003e\u003e client.execute('SELECT sum(x) FROM test')\n        [(303,)]\n\nDB API example:\n\n    .. code-block:: python\n\n        \u003e\u003e\u003e from clickhouse_driver import connect\n        \u003e\u003e\u003e\n        \u003e\u003e\u003e conn = connect('clickhouse://localhost')\n        \u003e\u003e\u003e cursor = conn.cursor()\n        \u003e\u003e\u003e\n        \u003e\u003e\u003e cursor.execute('SHOW TABLES')\n        \u003e\u003e\u003e cursor.fetchall()\n        [('test',)]\n        \u003e\u003e\u003e cursor.execute('DROP TABLE IF EXISTS test')\n        \u003e\u003e\u003e cursor.fetchall()\n        []\n        \u003e\u003e\u003e cursor.execute('CREATE TABLE test (x Int32) ENGINE = Memory')\n        \u003e\u003e\u003e cursor.fetchall()\n        []\n        \u003e\u003e\u003e cursor.executemany(\n        ...     'INSERT INTO test (x) VALUES',\n        ...     [{'x': 100}]\n        ... )\n        \u003e\u003e\u003e cursor.rowcount\n        1\n        \u003e\u003e\u003e cursor.executemany('INSERT INTO test (x) VALUES', [[200]])\n        \u003e\u003e\u003e cursor.rowcount\n        1\n        \u003e\u003e\u003e cursor.execute(\n        ...     'INSERT INTO test (x) '\n        ...     'SELECT * FROM system.numbers LIMIT %(limit)s',\n        ...     {'limit': 3}\n        ... )\n        \u003e\u003e\u003e cursor.rowcount\n        0\n        \u003e\u003e\u003e cursor.execute('SELECT sum(x) FROM test')\n        \u003e\u003e\u003e cursor.fetchall()\n        [(303,)]\n\nLicense\n=======\n\nClickHouse Python Driver is distributed under the `MIT license\n\u003chttp://www.opensource.org/licenses/mit-license.php\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmymarilyn%2Fclickhouse-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmymarilyn%2Fclickhouse-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmymarilyn%2Fclickhouse-driver/lists"}