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

Uploaded CPython 3.14Windows x86-64

nativelib-0.2.2.5-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.5-cp314-cp314-macosx_11_0_arm64.whl (574.7 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nativelib-0.2.2.5-cp314-cp314-macosx_10_15_x86_64.whl (559.7 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nativelib-0.2.2.5-cp313-cp313-win_amd64.whl (525.4 kB view details)

Uploaded CPython 3.13Windows x86-64

nativelib-0.2.2.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.4 MB view details)

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

nativelib-0.2.2.5-cp313-cp313-macosx_11_0_arm64.whl (570.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nativelib-0.2.2.5-cp313-cp313-macosx_10_14_x86_64.whl (559.0 kB view details)

Uploaded CPython 3.13macOS 10.14+ x86-64

nativelib-0.2.2.5-cp312-cp312-win_amd64.whl (534.3 kB view details)

Uploaded CPython 3.12Windows x86-64

nativelib-0.2.2.5-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.5-cp312-cp312-macosx_11_0_arm64.whl (580.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nativelib-0.2.2.5-cp312-cp312-macosx_10_14_x86_64.whl (568.8 kB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

nativelib-0.2.2.5-cp311-cp311-win_amd64.whl (528.2 kB view details)

Uploaded CPython 3.11Windows x86-64

nativelib-0.2.2.5-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.5-cp311-cp311-macosx_11_0_arm64.whl (577.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nativelib-0.2.2.5-cp311-cp311-macosx_10_14_x86_64.whl (560.3 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

nativelib-0.2.2.5-cp310-cp310-win_amd64.whl (527.3 kB view details)

Uploaded CPython 3.10Windows x86-64

nativelib-0.2.2.5-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.5-cp310-cp310-macosx_11_0_arm64.whl (579.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

nativelib-0.2.2.5-cp310-cp310-macosx_10_14_x86_64.whl (562.9 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 961d12d45709834ce83cb10fbe26f3ebf80f134638a00536fb7f4557641b9793
MD5 7043e51ad870515c56bea6ede8a8422e
BLAKE2b-256 ad37677bde217c16b30f75b94485c708b8efd096c42007b46d12a706866ce623

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.5-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.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1b9f4f0b7dad289e577ccbaf01b4a9e46fcbc19bc1fb6f14f0cc27a6b66d5d46
MD5 3c631e84be9d3fad48ad4f4514761ced
BLAKE2b-256 970347bf3b2a7f553908bb710f40a781be151c929b2ab90fc7e52c6cff99efa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5fffd37247b18f773582d8189653d89d2fabde81c370197c616ee09b29d1142a
MD5 11ec610cc90e06e9ea1175f61110104f
BLAKE2b-256 bd85c06805767fb95bfef00074244799843ad5a9150e7ff7c6b33c5d12eef10d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6c39a51804afac1e54aa5b1437fe4e3f36bfe28ceccf6b5f57c1b3624e0f3f3e
MD5 1e7d672f60653dc04678cd8e02f0fcd0
BLAKE2b-256 bc82f2cb3f2b7a7523937cd7a5d7a11098beee99656c92cf7534a2a229251aca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e5345a20704ce3b0444bb087b83f6f5e74f9515f0932be5811f52a36c3a83707
MD5 a4cfcf19dcd9aa2e14785a21d29a69c1
BLAKE2b-256 2a1a160480c857eaa7fb1daddb1f54f7e05717a313f7d2779162c8b0838748f5

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.5-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.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cda0c791e494f1038fd3a7a533b72f32da12fbb816c4fc325e842492a07e3341
MD5 e0afa38d099f6022b0744f087bdc3f58
BLAKE2b-256 dee3844c424e3abb562799914ee15ad2ba8c7e99a91b76d7bad0285f64b34bc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38110d8304187ccfd30e44a2c4c95e24d01a66c7309bd69eaa50444792fec312
MD5 522938a9c65139cef946e11162942d78
BLAKE2b-256 5452fd7872b14e62ae3c22abe0b64bc8bdd477b36c51b80673017360588dd20a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 628f9539d295958ced2e0ffb624abbc5e9dece79bc644766c91dffe11ba944ef
MD5 d3c1129bdbbb68b07958aa6aedff6a51
BLAKE2b-256 f8b9577fd65508250a1b54e213f237bfb92ead3eb235365874dad356dc613274

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3e28cd11a0b888c5ef3193090c30064b205b3a92407f558717f281a56146c779
MD5 ab8252749e45c837eed8c707891b9ae9
BLAKE2b-256 091743f05e86098a5a186d03d929738c7f073e1db5126cad8b016c046dc412bf

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.5-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.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3f3b8983e8fd2b6e38998cfcb3095583b76e0cbc3e71eef6451d6ebc2116d91b
MD5 929ede793db268f4284910655c79a5ff
BLAKE2b-256 b55d35741a1b84cbcc4f36be40b99c44577eb9e4986fda15420bbf2f459135c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b3ba0eaab156d6cecac330ae308233c1e3afaf3ba47b9e8f4ecf06f446fbc9c
MD5 9e4d42f5ca7da62de1278d9c88e462eb
BLAKE2b-256 eb73dbf7b63f575546a0d65bb02cf72878468a25bc622d340555d64d0e8dcc1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a274cc746db57ed804738a3b2cb8cf475ba38c84c1d6b695bbd9d46f6f2b9862
MD5 2ddb81facaa8b0abf4da27b8f561d18e
BLAKE2b-256 5c1abe2f3abe525f20940c93a4a56f4a96a7be0e414ae3c7b5df70119b637512

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 843cb96bd855b54f18f4e4ec9c8b2c690a4de6c0f05343bf51a827a527e92c0c
MD5 56650bad1cadbd488a99fc4c0eae63ce
BLAKE2b-256 06244eda870b174188a2e66c365bb49bf7987314ad8c3051a6125e99f7a3f7c3

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.5-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.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0486b1322a03c43bc2fdb9cb2158cff186ce44069d7b1a3843dd507d0c0d955d
MD5 9fc0e86ce1d8e3eef06b9ef60e0e884e
BLAKE2b-256 7d53faf1781667c464b1c1774f07d92ea7b9c34440c73d76d6f71c62cb213744

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bacd42019819bab3a5ca5d530c87763498522a088eb39c8d26167946cde3977a
MD5 60e91f3cb18b7dca94a672c5736220b3
BLAKE2b-256 0c52dbae787a172ceff0fd6c32824fee524837198648031c2f3164c764fa8ac4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4379b6dba227a911804044a1a3b620a0e2b3782d6d8ffe9d8fbc7b789df0aa73
MD5 38e1168c4d991b242bb6de8705fee1a8
BLAKE2b-256 9341f7edecda56bbcbbbe717f0eec362294af40b8e9fe619ca07a503c49873b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e5c0fb78e9b582fe651f5ab47ce320a46b3eef131a35b312f2a168275faa5961
MD5 4151edcfc81d84dc3799ca162f666dae
BLAKE2b-256 ed47bdeef7bc7d9743059be399aa46d106c9746f5d865f684658d0d49f10a51a

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.5-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.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7f626ecac0d128fb647d45af73aa719c4e5556a73d530ea38e7720dadfac4286
MD5 a5b5bd4425eb13aebcd371f4dff49c27
BLAKE2b-256 7eca99df28272c2a17dbd26e22141f9da1aa97145b9dbaa2a992f92521bda8c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7bf46021f6452c85540e358b4d6b389b2e3a1a9da3a8754e263c3e703d53770
MD5 c4faa1ed63fcc0edb7320fcf6cc45319
BLAKE2b-256 7e8f95bebffba290c68dabe90f0ae5e6875c0044c95ba6ade5a6145d0a06482b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.5-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 bbc8e8a21e55b3225a18f4f79f482c1568b41ff968bb69ed8e3afcdbe05e4556
MD5 7a0eec4024b310c253b8b5b1dc1ce6d4
BLAKE2b-256 b4fc8e65f8632e60b820372e25478df7292ee79b6e01a2921fdca9eaa596faa4

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