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.6-cp314-cp314-win_amd64.whl (541.7 kB view details)

Uploaded CPython 3.14Windows x86-64

nativelib-0.2.2.6-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.6-cp314-cp314-macosx_11_0_arm64.whl (574.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nativelib-0.2.2.6-cp314-cp314-macosx_10_15_x86_64.whl (559.5 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nativelib-0.2.2.6-cp313-cp313-win_amd64.whl (525.5 kB view details)

Uploaded CPython 3.13Windows x86-64

nativelib-0.2.2.6-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.6-cp313-cp313-macosx_11_0_arm64.whl (569.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nativelib-0.2.2.6-cp313-cp313-macosx_10_14_x86_64.whl (558.7 kB view details)

Uploaded CPython 3.13macOS 10.14+ x86-64

nativelib-0.2.2.6-cp312-cp312-win_amd64.whl (534.5 kB view details)

Uploaded CPython 3.12Windows x86-64

nativelib-0.2.2.6-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.6-cp312-cp312-macosx_11_0_arm64.whl (580.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nativelib-0.2.2.6-cp312-cp312-macosx_10_14_x86_64.whl (568.5 kB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

nativelib-0.2.2.6-cp311-cp311-win_amd64.whl (528.3 kB view details)

Uploaded CPython 3.11Windows x86-64

nativelib-0.2.2.6-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.6-cp311-cp311-macosx_11_0_arm64.whl (577.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nativelib-0.2.2.6-cp311-cp311-macosx_10_14_x86_64.whl (560.1 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

nativelib-0.2.2.6-cp310-cp310-win_amd64.whl (527.4 kB view details)

Uploaded CPython 3.10Windows x86-64

nativelib-0.2.2.6-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.6-cp310-cp310-macosx_11_0_arm64.whl (579.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

nativelib-0.2.2.6-cp310-cp310-macosx_10_14_x86_64.whl (562.8 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3e4390e9bbf8d7670b04c1fed7f4b3c0bfff2b415d7423fdfcf3e167ee4018a6
MD5 ef36a1ad248dcef241b7d330aa69f0c7
BLAKE2b-256 66ce8417410d431d716172cacb20fb7f3ff676a75f5dc0cd47865287751592e2

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.6-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.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f253aa47ace63736b60624b977621149666f7a62e96ad901356e61deaa6e2ac
MD5 a2fdca761ba07cacea45d298811384ea
BLAKE2b-256 ca273809083970f1f631e59659a1b4280ce5dc7dcd6bb862c5f0d628b37621d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89078e08a05b9333ebbdb6c76c0e3171e4c183e5a4c5eab6216702c7e2ece2f6
MD5 db817a824285df6ae3c86649a6944677
BLAKE2b-256 4d6b807efeec15da25b57a18a0e9122e471e6c46a6d7935fe201e07a6cdf8d32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 464926d7e1de9119213ea68f0045f3a38afdad6538d234a5718d4fb103c8fdc2
MD5 3af542789c0883a9715a48f80bf98cee
BLAKE2b-256 328e141209e4efce9a8db2e691b6874c6ee63ccc635763264af017b45015d6ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 47db823d85cbccf194cf36e940b42f992149ad187884ac3cfedfa1c23851e18f
MD5 b7f2b91217e4777074cac3f20b8bc19e
BLAKE2b-256 e737dbdfe346b32c772f406e64721017de01b2312c2d6476d44f501f032b049b

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.6-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.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9f1e15a3245a2ca978c6c1c0044d74d17341382175847af0cc15168d7f44c9b5
MD5 50d7ef29d3007ac29451631640ac7de7
BLAKE2b-256 e09a23d10df1cb63b7710ecf8cd68ea8822ac2e654e356c6d4b0f2e814ae7583

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b22f95bc88a5beaecd2d3a7a94c2e5376066eecc47baeb928d7600a848601895
MD5 80abdb01fbb039817e0fcd5fcd295b2a
BLAKE2b-256 32ecacd0eeba541f96a2202c3c69b522d929879ef1316f50fffab4bb5a2106ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a070ba562b5ceb738cb4cb63ba72dde68918731271cb8aeea1d71ab4986880d3
MD5 1be78e40dcdfe143b93943f7e3be65ec
BLAKE2b-256 4298a331c3adf8e7602e81e68374fa0f593fc157e27412d515981ba2ada57dee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1ba3e705d6ac8a9207455148790d73c9c582d432841327e5c317aec75b0f85c8
MD5 11d7dcc738e9ed476b6d4934e324fdcd
BLAKE2b-256 b952d0106cb2d0b22e3ed82b04fb29b63513db515e5cfa166baf811b3a97ec13

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.6-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.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 73e9408838a2b75562fb0d30921ef6c7c6d9a9ee67858e3ca75da779852b86ea
MD5 23444043d5471969fa72390e721c2595
BLAKE2b-256 d7bb966fdd1c560332e327329c06fe7fd28ce033daa1dcccbca5dfdcda2ec213

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b6f485e826f15e514931688fd06541cbfae17f3d56a5558cd6df61379b1e41d
MD5 0e89acde5b5f5719377046953646b309
BLAKE2b-256 3e0cf998abaa661cfb32cf77ac67218d525cd849e8aa7adfae652d9c5560131e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c6579152a5702977eeb71e33290470cf412bb2c8c6532318b209a7c2be714cd7
MD5 ba659c265125622b3f19780d9e3867e0
BLAKE2b-256 85cc42421091ce5dee3e3541d85a31cb9eb27e77be6fbdbd929201b4cab1b371

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 10db674e3eb4c77d9395e13a04352d13b40d7fc25ab993e940374dd29d0fd54b
MD5 3894884f8c01c5b843355f53efe1a22f
BLAKE2b-256 47b8056e0075583f0fe292d5f36fc09cd7aa0d8a4128acf4bd4d1016067d25c5

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.6-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.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1e764e14046d2d3e80ac777bcd27f874989e4e73212f8ede804a33868579202f
MD5 5f050e55afd5b2721f872a4a4003acae
BLAKE2b-256 18541a124661ca267826634eb7c05ebe2fbcddfbfd827cc62ebd9e526f609716

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 79a07b718183b2d875d839358ed7cfaf4c0579cae6f29153b77f0d1e930aa41f
MD5 1febc6c7ca7d0a9ba56599fdf589ee97
BLAKE2b-256 94204f5fb9daad4ad44ff28db58d70834da32078f9b6ad608ad534a3fcdd4aee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e8250fad69bb038c73eb6a86a68150246951699a61ca45a5cbd0fc67f34be071
MD5 b3780058f49c15cff531e379fd15258b
BLAKE2b-256 d684cc692be3bb9fe20f943a6e9369ed60dd3c85cb892f1fabf2255a4ec7924d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 897489c30a21a6c03b5362cbdb6d5d62f539a8cc1035dd8fbf6b647ae285b079
MD5 7f95f6133a62eae265be50746ecdfde0
BLAKE2b-256 8d0eab8f19427c24f86c7b8fc2e1952d8d60d75daafc37c1553ac92d206d4d09

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.6-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.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f68248e6337aef9175def004693da5a9c889417ac050a318d24315c80a8ab2be
MD5 b0bd2c12229b987bf52ee7256ed1f7c5
BLAKE2b-256 7393b15679c3d12db531c94291409edf63da309cf86aa90ad2e709baf7f39117

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a38a1868bb5cad882ff8d7c53be8e18bbed14bf51f2334fb8faed3b1e36cd38a
MD5 56f92def7dd18df457f6ed23e4a04be4
BLAKE2b-256 9bae7a23140672357c19b631b8bfe5cb233e4f32ecca543688c334dbbcd2bf56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.6-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6343c90b94570643759610e782dec9da55e75e6c05a600e660e4bf65b8252a8e
MD5 32c117e96516e29e14c4e43b234bcd50
BLAKE2b-256 c5539eefa0074677cd3c690dcfceb7ed43a77fe5a653a5d798fb77be4f2c6ce6

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