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)

  • 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
Time + + datetime.timedelta
Time64 + + datetime.timedelta
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,datetime.date,datetime.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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

nativelib-0.2.2.2-cp314-cp314-win_amd64.whl (541.7 kB view details)

Uploaded CPython 3.14Windows x86-64

nativelib-0.2.2.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

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

nativelib-0.2.2.2-cp314-cp314-macosx_11_0_arm64.whl (575.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nativelib-0.2.2.2-cp314-cp314-macosx_10_15_x86_64.whl (560.9 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nativelib-0.2.2.2-cp313-cp313-win_amd64.whl (525.8 kB view details)

Uploaded CPython 3.13Windows x86-64

nativelib-0.2.2.2-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.2.2-cp313-cp313-macosx_11_0_arm64.whl (571.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nativelib-0.2.2.2-cp313-cp313-macosx_10_14_x86_64.whl (560.1 kB view details)

Uploaded CPython 3.13macOS 10.14+ x86-64

nativelib-0.2.2.2-cp312-cp312-win_amd64.whl (534.6 kB view details)

Uploaded CPython 3.12Windows x86-64

nativelib-0.2.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

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

nativelib-0.2.2.2-cp312-cp312-macosx_11_0_arm64.whl (581.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nativelib-0.2.2.2-cp312-cp312-macosx_10_14_x86_64.whl (569.8 kB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

nativelib-0.2.2.2-cp311-cp311-win_amd64.whl (528.4 kB view details)

Uploaded CPython 3.11Windows x86-64

nativelib-0.2.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

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

nativelib-0.2.2.2-cp311-cp311-macosx_11_0_arm64.whl (578.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nativelib-0.2.2.2-cp311-cp311-macosx_10_14_x86_64.whl (560.9 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

nativelib-0.2.2.2-cp310-cp310-win_amd64.whl (527.6 kB view details)

Uploaded CPython 3.10Windows x86-64

nativelib-0.2.2.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.1 MB view details)

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

nativelib-0.2.2.2-cp310-cp310-macosx_11_0_arm64.whl (580.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

nativelib-0.2.2.2-cp310-cp310-macosx_10_14_x86_64.whl (563.4 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

File details

Details for the file nativelib-0.2.2.2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 bf18f9f4c910fb110ed539fc9c3d392bb91e716d7a033ef98ff7a2c6fd11c14b
MD5 1610bad0edc1d5a93e4937ee88378147
BLAKE2b-256 9f2e8bc372ac4e1319893a9102055d184c6e57d52ce659a25b3d463ecd2ce79c

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14a46f3c3b466bd784d81291cfd4086c28e93fc57e27b7481bb785d427036bd6
MD5 8bc37a74e0f9f48c581e3f999daf323f
BLAKE2b-256 e35106a3eb76c21f94789d7cbae22d3e2e7e488cee5fbdcec11d64dc8e0e6ee9

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.2-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 010196f438280c80f1367761ba169fc32cc1059fdff5281dcacfa6826af2d3f8
MD5 41534ebe5a8b15deaaabfe1afd56b1ee
BLAKE2b-256 6a475fe22076625212be0fd6ec620b76ea611da00393f324befb3358aed45f31

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.2-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2313f177fa250fb91a64535464a271c91fd53a9841965f9ef3771d0df6fa58dc
MD5 775fa4d4ddafea8027820834a8722933
BLAKE2b-256 386376fb03e834b4053807885dccdf395e6adf956342b8ed596f74f9c6aa0622

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e3add710d1a04ef5d21a4d31e2a28ae886de167bbbd7d553cfe09a6db99ae743
MD5 58ffa2aa1c612b42a6e95d7252ca626d
BLAKE2b-256 e044c6b98ab1d2de8c3f4ff746e8b5ee0d67852c8118d81211951326d4e93c61

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.2-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.2.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2e87f1b01c67394b23127e3ff3759d7b1ecca8c13c690e7ea7fcc6b90d94106c
MD5 22f8f3902038e8ab23c81f16ed07ca68
BLAKE2b-256 ae4d71174d595b92317105e36fd24d71f64e2c232824bc0652168ba90d1d3f26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 032b5e4c96c30625a36595b736f0f1f9b185e05885a8378077027387092ca60f
MD5 b6fb84bb0513ef3d488efe4253fe601e
BLAKE2b-256 e90f7c62e0feb1e8e991eb55143197d9bf90edaade57e05f0764c3ffbe3b6e80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fb1d694c63d053a0dd8657223b594b917f432e445d8b52123f51b0b7dfb157c6
MD5 5b124438301870300db34f26c70cea64
BLAKE2b-256 8650edf7cfef82f82404b10fd5076fa022c113d915a14b52684e1709f2535c87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6f0d037919ab964323a344ed48c7997062919c4bf8df497c3d6d3359e8215eb0
MD5 b3fddd27caec2f383d04e52412263f74
BLAKE2b-256 1f7b24e27db4d5b0d494c432e30657ceb5418eca592dd042ee20dca79781ab92

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.2-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.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06e41a76512f04c568f783365d65f31c8e707bb4e65bf69f7b118b5caa0d30ec
MD5 e708cb5d3a62a959a9d75716570b72ec
BLAKE2b-256 15b1859e3803146b8f173b853e41b07159c8131c1e11bc17a90fc1f5cb32371e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f421f3d5a4a2bfdf71bc8867fb5e8733e82868e233639f9ec184ff1c80701ea
MD5 9a293741d5b4bee9de4212df4f8605fe
BLAKE2b-256 eb256eaaef50f11fd5bc764cb2d5f736a86417596aaad063ea075a35a6c184db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c2b76a9cd95f09db2edcf69b7c2b67e27e9c2a236fac1a21b793e2e0e55df271
MD5 7a606f739ec8b460d844b5bf902dbdb2
BLAKE2b-256 682ab074af68b0adaffcae2beaf9ecc37ef1f4a1d58d632a4699f5cc2f3ca920

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 394c2147679432a893feacded3a98dbce5c40243c76b3eefd6c26e4929ca1840
MD5 4903f187f634b7f44c6950715200e29f
BLAKE2b-256 2d4c64898bc28670618b7c8fafa243596ec7f44b2b79b0603a2591dfeb6a6905

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.2-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.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d1593c45f40ea5ec9f8da2333de8d1d147e5448d5896398e78a319715deb535
MD5 933d5cb6d2c054b7ccead2001f39b0b7
BLAKE2b-256 fda7f3cea51bfd7c62ca8967a3aeab17a9c9fbe7a711cd554d3df0dfcc0c37c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c072ea067e99cc9a702a8d019f5e4bd59acc056ed54513f8c35b373956f5b739
MD5 e5339779b30b81b9d70ed18de9b627af
BLAKE2b-256 ba0cecb49cd47ac2373984ea576ee1150778a862f21ce855ed02015e45ff5dd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a89cd20798019874d86000277c790728e52809ba65c00e7287e06e265793dbca
MD5 f237151ae0efc46413e4f628873d28ef
BLAKE2b-256 688429422d0a9f77d617f33a6a6f36ac845d22ee3f9cd202be6b763f1d9ff80d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7a68525c0f9b31f1b1b8f63d12821702da58690ec361f885eba40976c4eb3f7a
MD5 990e906c1d62a2ae1aab97b146fc5b77
BLAKE2b-256 bed0bbf011ec4b39a475d0715918082016e0b7f3eed9e7c002c87300c45fe368

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.2-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.2.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b8751a4400c7b73df9127eefbba4e94adb995f45b81cd44e977173b855d64ab3
MD5 a18a47f38bd074d95946ca2f1c21cf0f
BLAKE2b-256 e9bd3ca2dd1342bb3d953d7b3599e162615e7f25a49a0b15ae84f5cd772dee88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 123f0820dff2aeec7da91df9daa17b2c3f7e90781e243edde94a404e9dd1e3b6
MD5 cf0d17d9ddf6f761d25883ce32a76c82
BLAKE2b-256 fbd72869941a195d367f831a3ec4d6d4163930c1af924ab9086a0733126f3939

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.2-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fe70867f72c8f4a3e019c9f8f22bf5e6392668871f5562f5ad174db3536572ef
MD5 5e4f6faa32cbc3aa35c9e71a17998abd
BLAKE2b-256 d68c9490580ed762ea9eb825bf7ad37c6e51d7b388f65440875015e9fb6d79ba

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