Skip to main content

Library for read and write clickhouse native format.

Project description

NativeLib

Library for working with Clickhouse Native Format

Description of the format on the official website:

The most efficient format. Data is written and read by blocks in binary format.
For each block, the number of rows, number of columns, column names and types,
and parts of columns in this block are recorded one after another. In other words,
this format is “columnar” – it does not convert columns to rows.
This is the format used in the native interface for interaction between servers,
for using the command-line client, and for C++ clients.

You can use this format to quickly generate dumps that can only be read by the ClickHouse DBMS.
It does not make sense to work with this format yourself.

This library allows for data exchange between Clickhouse Native Format and python/pandas.DataFrame/polars.DataFrame.

Unsupported data types (at the moment)

  • Time
  • Time64
  • Tuple # Tuple(T1, T2, ...).
  • Map # Map(K, V).
  • Variant # Variant(T1, T2, ...).
  • AggregateFunction # (name, types_of_arguments...) — parametric data type.
  • SimpleAggregateFunction # (name, types_of_arguments...) data type stores current value (intermediate state) of the aggregate function.
  • Point # stored as a Tuple(Float64, Float64).
  • Ring # stored as an array of points: Array(Point).
  • LineString # stored as an array of points: Array(Point).
  • MultiLineString # is multiple lines stored as an array of LineString: Array(LineString).
  • Polygon # stored as an array of rings: Array(Ring).
  • MultiPolygon # stored as an array of polygons: Array(Polygon).
  • Expression # used for representing lambdas in high-order functions.
  • Set # Used for the right half of an IN expression.
  • Domains # You can use domains anywhere corresponding base type can be used.
  • Nested # Nested(name1 Type1, Name2 Type2, ...).
  • Dynamic # This type allows to store values of any type inside it without knowing all of them in advance.
  • JSON # Stores JavaScript Object Notation (JSON) documents in a single column.

Supported data types

Clickhouse data type Read Write Python data type (Read/Write)
UInt8 + + int
UInt16 + + int
UInt32 + + int
UInt64 + + int
UInt128 + + int
UInt256 + + int
Int8 + + int
Int16 + + int
Int32 + + int
Int64 + + int
Int128 + + int
Int256 + + int
Float32 + + float
Float64 + + float
BFloat16 + + float
Decimal(P, S) + + decimal.Decimal
String + + str
FixedString(N) + + str
Date + + datetime.date
Date32 + + datetime.date
DateTime + + datetime.datetime
DateTime64 + + datetime.datetime
Enum + + str/Union[int, enum.Enum, str]
Bool + + bool
UUID + + uuid.UUID
IPv4 + + ipaddress.IPv4Address
IPv6 + + ipaddress.IPv6Address
Array(T) + + list[T*]
LowCardinality(T) + + Union[str,date,datetime,int,float]
Nullable(T) + + Optional[T*]
Nothing + + None

*T - any simple data type from those listed in the table

Installation

From pip

pip install nativelib

From local directory

pip install .

From git

pip install git+https://github.com/0xMihalich/nativelib

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nativelib-0.2.1.1.tar.gz (25.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nativelib-0.2.1.1-cp313-cp313-win_amd64.whl (508.0 kB view details)

Uploaded CPython 3.13Windows x86-64

nativelib-0.2.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nativelib-0.2.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

nativelib-0.2.1.1-cp313-cp313-macosx_11_0_arm64.whl (558.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nativelib-0.2.1.1-cp313-cp313-macosx_10_14_x86_64.whl (546.2 kB view details)

Uploaded CPython 3.13macOS 10.14+ x86-64

nativelib-0.2.1.1-cp312-cp312-win_amd64.whl (518.7 kB view details)

Uploaded CPython 3.12Windows x86-64

nativelib-0.2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nativelib-0.2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

nativelib-0.2.1.1-cp312-cp312-macosx_11_0_arm64.whl (571.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nativelib-0.2.1.1-cp312-cp312-macosx_10_14_x86_64.whl (558.8 kB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

nativelib-0.2.1.1-cp311-cp311-win_amd64.whl (513.5 kB view details)

Uploaded CPython 3.11Windows x86-64

nativelib-0.2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nativelib-0.2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

nativelib-0.2.1.1-cp311-cp311-macosx_11_0_arm64.whl (569.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nativelib-0.2.1.1-cp311-cp311-macosx_10_14_x86_64.whl (551.2 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

nativelib-0.2.1.1-cp310-cp310-win_amd64.whl (512.2 kB view details)

Uploaded CPython 3.10Windows x86-64

nativelib-0.2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nativelib-0.2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

nativelib-0.2.1.1-cp310-cp310-macosx_11_0_arm64.whl (563.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

nativelib-0.2.1.1-cp310-cp310-macosx_10_14_x86_64.whl (546.6 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

File details

Details for the file nativelib-0.2.1.1.tar.gz.

File metadata

  • Download URL: nativelib-0.2.1.1.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for nativelib-0.2.1.1.tar.gz
Algorithm Hash digest
SHA256 0a7e7857a7cb03f7a182b890607d5d2023d18ee27d0a050836a62fc9d220b80e
MD5 c4d3a390c82af8d67f5af0b5ce42d871
BLAKE2b-256 659075fb6fe5070bdd04bf2801ed07b321c68db451f157d7abe2ed55c165be88

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: nativelib-0.2.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 508.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for nativelib-0.2.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b2f2d6c7e390c8c8367141854e2bf5ff74a9265c6ae767e2e9caa2b8ad83cb17
MD5 2808127f6000f69aa7a49dcb5bb2f787
BLAKE2b-256 7b6bd7405a1057594ca34046aee1559097b389168ecfd849110438759d2a8022

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bf8a1d9b15cb8e2f1a2decd96ab59e238e402e663174583df66a618467f18b03
MD5 ffe80d1b5a62916f70591bfe4fc58e54
BLAKE2b-256 a154c6fc99b10526d71b2dd0af5851315cbe185b31c0548c04153eb951a18006

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f91cf339385aa3c7b4debd2a68306ec7b0a97ae61cf3652d51efddf4e242c11b
MD5 b4ba5ee8646f000f29591e168254a930
BLAKE2b-256 3742ebb3fe4a591f06bce4d2110f3d9a2eedc6de3e3e1d7ccb48e3e4644b2db9

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75cdc8248cd1759551437b878ee56153ddad131c9dff777048c7af9cbc32e80b
MD5 942bc3eea1f7d024fb88549c1788c03c
BLAKE2b-256 3383ee13a0cc624e1baaa1f5e61dcd7e23c9251d62218ee0af32303030deca6c

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp313-cp313-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 41c7ffecf9e391b4a4e915516792656aab4af0f05cb85c0c4aa7279a09112022
MD5 05a1a9a379f2634a257b570a1783ac6c
BLAKE2b-256 f1e9b27e1ff059146c426b5a87833caa8b85c0667266ed80743e18627e34797b

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: nativelib-0.2.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 518.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for nativelib-0.2.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c2593bf5feebfb036fbd0323da257d1a113d34e518b58ff7f97565d7d1b008b1
MD5 e532b16cca6c9f9cd6fadb904c26c67a
BLAKE2b-256 3908246bfebcc8237543b3a703491283e109740834c8e5598187bdef3bb08895

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8de364f02011778428b2445e1ff6dfc338f5f473268a83ed9c8097709af16b5a
MD5 9eee1f029773d65c3052d3d3bd3d778f
BLAKE2b-256 7cd4882d54da582282a04d46344febfd014cc05864fe6fc1986b9d567769e323

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 05140a819e46af1dcba8f0a5358cdf7197f7808511c5fbe8c06b4556eca648ba
MD5 f23dcc0de769b9e0cff17a78b280cc1d
BLAKE2b-256 6e61504a5207601237553fa2469e92fa77f0ea3c547d4856a7d6328a867812c2

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4548cd161bffdf3bec80fad31b7b355c139b1becfa13c52fc53a091256ea3f86
MD5 9bb046e6cfa0a024fe6f38f85e0a4418
BLAKE2b-256 7136d58a6bc9eb73133c0a758d92d756bf66bf37c1e5b3cf1d5b7dc93d815632

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp312-cp312-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8f30903c25c16ff544f6ee273628bc48646e7899ee05a17156e28a19f6122af5
MD5 de3d119019cd2874925431e77bd842e7
BLAKE2b-256 73d73f3ec9e0b04872a7de0ea7626556f565e4c24e18f6d8150d1fbfd80fb27d

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: nativelib-0.2.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 513.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for nativelib-0.2.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fc3e4e1a6b8e11c0b49f4c4ea59fa06f6ce431a6f6a328acc4c5f1fc8bf29d24
MD5 be62500a700506f6eac63c0247ce9e62
BLAKE2b-256 8cd0796ff7e466345fcfa4ad177b0ed50179126fc1b694ac6affb21bdf0cff31

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 40bf14c6fb62e5f04b2e9009dc798f2fbfe8077efda20f640d2dc07979192446
MD5 e63eeed1379c79fd2e8783c75b1b8dc0
BLAKE2b-256 5c115ba809d17305517d0b10bff8a0bd2521fa74b3fcad0a46b6c92e563b6488

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3c46ac2d795cff7c0fb34517bdfc8d349157e453a76c2abecae6d0e9aec9e9e2
MD5 a8114568b58748e3215f48da717d46ca
BLAKE2b-256 f50139717b195e815e7bb3809e9c6f6624e7399f7fd362417746e37c712a2629

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7009792db6bc0a1534551f18aa457b4cd572eca6458261295e78187ed1823e1
MD5 f47c44de6db961fffa263ed80cad00d6
BLAKE2b-256 e2c23d8001f19c59d0db9ce09b7a5ddc96feabf39892795b5998803626aa9ac8

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9616e30876a15b48cdc9958d5af9344446e967f1080edd14cfef1e6060a8ca56
MD5 41a8eb58430fc21fef3c7f5f83cd630f
BLAKE2b-256 0ab429891344eee7e8a289b5dd0a1ed6524949d728f0032c09df086840477a8c

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: nativelib-0.2.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 512.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for nativelib-0.2.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1fab9876146722a28925b4579a0140a616de1271981dc7d6841081daa56e2477
MD5 5b6894051daf6339be5884d982aba430
BLAKE2b-256 c5762a186aefc0d720ff289bd80821ea4b516b4e98b594d7b4a8a506b845ad80

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d46667918923a5515a5979b185c5a4b5e92f212c50e707a4472e7cd00670d54d
MD5 f58afa5336fb296ae2ba7f19c38385ce
BLAKE2b-256 f24dc791982aac2728a6c47902e8be81ec1d6dc6ef2dd6e3dde36a4e57dc26dd

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 edc460cff6c612c9d31e534d31d1be2eb2800022abb91d29d06e442038434796
MD5 5c29e45919e87639cd8cc654680932ae
BLAKE2b-256 71cf973fb0ddbc053e0910b215949851eaab4d2cd906b561a884791e13ac84ba

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4fc1aab32fce51dfe5f498076d45ba363c4bc2ee3de620c7ea261223422ce08a
MD5 fdac18ae7c28021574adf8e199909fbc
BLAKE2b-256 ca77706bb83cbbeccd5c42f96cee32c8fe70191eaf18faf8ace5e2cb5478b266

See more details on using hashes here.

File details

Details for the file nativelib-0.2.1.1-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.1.1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b726432a374682c87a0ea3575c79ded1ef2dbc7f65a3642b9e7d298917e1bf54
MD5 6f4d2c6abc07a0aaa929d4fb7951c51d
BLAKE2b-256 d2b827b6e6a6b2b84016e9f60fe8c9d18a4c90093253ea587e3a0db65e7c89ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page