No project description provided
Project description
ClickHouse-Types
Converting ClickHouse types into other schemas' types
PyArrow
from clickhouse_types.pyarrow import dtype_from_string
dtype_from_string('Array(DateTime64(9, Asia/Shanghai))')
>>> list<item: timestamp[ns, tz=Asia/Shanghai]>
from clickhouse_types.pyarrow import field_from_string
field_from_string('HelloWorld Map(UInt128, DateTime64(9, Asia/Shanghai))')
>>> pyarrow.Field<HelloWorld: map<fixed_size_binary[16], timestamp[ns, tz=Asia/Shanghai]>>
from clickhouse_types.pyarrow import schema_from_string
schema_from_string('Hello FixedString(6), World Tuple(Int8, Int8)')
>>> Hello: fixed_size_binary[6]
>>> World: struct<f1: int8, f2: int8>
>>> child 0, f1: int8
>>> child 1, f2: int8
SQLAlchemy & ClickHouse-SQLAlchemy
from clickhouse_types.sqlalchemy import type_from_string
type_from_string('DateTime64(9,Asia/Shanghai)')
>>> DateTime64(9, 'Asia/Shanghai')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file clickhouse_types-0.1.0.tar.gz
.
File metadata
- Download URL: clickhouse_types-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.8.0-47-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97a39df31b123778e113346d56e7f032f17558b705dac0743df94e3d1d1a5ecb |
|
MD5 | d8926938ba58618d30e851dbdcc9c5d1 |
|
BLAKE2b-256 | d29ef04bbcb0a74946fa214161e8678952ca7b1d13aacf30bf85b8e5660c5337 |
File details
Details for the file clickhouse_types-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: clickhouse_types-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.8.0-47-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d5e08272b7dc126bf3a0d18210786b8d21b84b68dc3eaa6000896606b4ea1d8 |
|
MD5 | 8a54b46f06e0a637ec503b79b19afd4f |
|
BLAKE2b-256 | 542359c4e8b3f8090cd381e5cf4f2afaea442c637b18cf083afa348f52b7abff |