---
title: "Integrating ClickHouse with Python"
description: "HTTP client with NumPy/Pandas/Arrow/Polars integration and async support. The default for new Python projects."
category: "LANGUAGE_CLIENT"
support: "CORE"
docs: "https://clickhouse.com/docs/integrations/python"
---

# Python

### Installation
```
pip install clickhouse-connect
```
###Examples
#### Basic query
```python
import clickhouse_connect

client = clickhouse_connect.get_client(host='<host>', port=8443, username='default', password='<password>')
query_result = client.query('SELECT * FROM system.tables')
print (query_result.result_set)
```
#### Simple 'command' without a result
```python
import clickhouse_connect

client = clickhouse_connect.get_client()
client.command ('CREATE TABLE test_table (key UInt16, value String) ENGINE Memory')
```
#### Bulk insert of a matrix of rows and columns
```python
data = [[100, 'value1'], [200, 'value2']]
client.insert('test_table', data)
print(client.query('SELECT * FROM test_table').result_set)
->  [(100, 'value1'), (200, 'value2')]
```