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

Uploaded CPython 3.14Windows x86-64

nativelib-0.2.2.4-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.4-cp314-cp314-macosx_11_0_arm64.whl (576.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nativelib-0.2.2.4-cp314-cp314-macosx_10_15_x86_64.whl (561.5 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nativelib-0.2.2.4-cp313-cp313-win_amd64.whl (526.4 kB view details)

Uploaded CPython 3.13Windows x86-64

nativelib-0.2.2.4-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.4-cp313-cp313-macosx_11_0_arm64.whl (571.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nativelib-0.2.2.4-cp313-cp313-macosx_10_14_x86_64.whl (560.7 kB view details)

Uploaded CPython 3.13macOS 10.14+ x86-64

nativelib-0.2.2.4-cp312-cp312-win_amd64.whl (535.2 kB view details)

Uploaded CPython 3.12Windows x86-64

nativelib-0.2.2.4-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.4-cp312-cp312-macosx_11_0_arm64.whl (582.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nativelib-0.2.2.4-cp312-cp312-macosx_10_14_x86_64.whl (570.4 kB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

nativelib-0.2.2.4-cp311-cp311-win_amd64.whl (529.0 kB view details)

Uploaded CPython 3.11Windows x86-64

nativelib-0.2.2.4-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.4-cp311-cp311-macosx_11_0_arm64.whl (578.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nativelib-0.2.2.4-cp311-cp311-macosx_10_14_x86_64.whl (561.5 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

nativelib-0.2.2.4-cp310-cp310-win_amd64.whl (528.2 kB view details)

Uploaded CPython 3.10Windows x86-64

nativelib-0.2.2.4-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.4-cp310-cp310-macosx_11_0_arm64.whl (581.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

nativelib-0.2.2.4-cp310-cp310-macosx_10_14_x86_64.whl (564.0 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3ffd6c5a3fffd290da3f76fe75490d52075deca4a747497753fbdbe719f69e11
MD5 ba6e0b864441cc4c9d998262af9d2be5
BLAKE2b-256 1ceb90e60c90b9e745edbdcde5e5a6eed005283292ccfd0dc92dbc9dc79c5c09

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.4-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.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a639abdb9f0b5a7a73d033c8ab0bce4df0f2f96c3683bfb1c76de74ae9c36060
MD5 ef22b018f34c11cc208a5a666ebe2739
BLAKE2b-256 474bc765dc2823de244f41584883f2c5c5831e532b8c1939e1504daad9fa3ea7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e15ea8575fecd8bb2dcfcebb9b4afaa6937539908d7ed018541272f648dae29
MD5 259e4589e9360e1d53deba3beb1c001b
BLAKE2b-256 5074d21f8a0bfdd47f2612a5fb49a75e64480091b09f30f50897005d5cab0f00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2b6f2cabc1119ad90ea6d59cf66b607bfeb0ba293c42775565fff2c48d07e266
MD5 85e92c796ac871d601072d361851f747
BLAKE2b-256 9a4cba01e70d7c999d694dec71670958a2bf814ac836d2d8e6a64c2f1384185b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6b696a0365b4169dbc7e578fb7e97ea0af99ac23bd64d0c38847e8090a03a2c7
MD5 081147066c4f857cd666b274d225e6fa
BLAKE2b-256 1a58050eccf8e3a6f3f6644d8472152b7cff59fa53afcb3650c5b0d376d4bcf5

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.4-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.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5d0d40491db2fd9a045b0564cf2d3c5ae13fc70e18e341599464fd673f184a6f
MD5 0adbf76cb1e8d48b6ad67389be80b6c6
BLAKE2b-256 dc8663de337445fcd58550db411971d173a2993c2521a3447e09d279c4b530f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b3aa2488bd02e710b0481635cecbe4a5135ae3c4b4669a7b2bf2c5e6eabf700d
MD5 f23e2678be5ae30ea853371482a40f15
BLAKE2b-256 56fbb919e907ef794db5753a304720008ac6e4f4f9f574c5ba6a3e5325584b3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2a386082d7ea402bb816ab4d4edf11b3db7161d2652875070e4eb6746330fca9
MD5 25d91197f25606b02681858e8854e17a
BLAKE2b-256 5fc62b38277f58f29bcac36c85061de40492fc02b11e785e7c48f51b69f4e780

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8da20ab614f0e7c6d1c85d8e8572de7d7322f7ad3da5c25659f1ee965f0e8132
MD5 529a820297fd41313582a5a5c92e11f4
BLAKE2b-256 5b45d0d2e419e9b09322abd5327dd6fabc5eca5a7d81f13f3c2a83e7d5f8a1ca

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.4-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.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4fc844535a14f64a85682102f5b4d6d3e629bb79e048ff1a12b7d82a3676a6b1
MD5 899fe23ce15169d65f2e9250cf334663
BLAKE2b-256 5a161c38b08bae2c47233013c101892a121767bf171e6b330fe8b14293adf773

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22ce7cef899120ce0eef2da8a7fb186af255026cfb8c5542064d8480a01c1c71
MD5 a809bda092bf7929f417e22c64150cca
BLAKE2b-256 a9100babe034a061b406d3084915eb70d75c0e698a027dff2f7bd341c61a3c9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b87abfb5686274dfeae3c61151d6987b94ecf446f48ac2970fb92e4e69e818a6
MD5 ae82f91d6e2cb9e1f6acb8edb580bc00
BLAKE2b-256 7d7bb34d158cf95bc9b1afd079671ae5eed70a4e48983d1c5706fbd8e85990fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c5e602ef3226191d4ea3043afb78dea7bd1716f039f92f2ce66f9fa2da53aeb
MD5 7d8183b751dbec12ba9040657629f091
BLAKE2b-256 9044f54503e0452bb992a9ebdc2296af87c432fcb3e400ce8436388a8a461c92

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.4-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.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fb347c6861d519b3458627ebce3a1322ca910b26c276c22112d64aba07e6f8a9
MD5 e416ff6176b76e0990b6d52b32c7d18d
BLAKE2b-256 cb95cec53bf5a49130617ad4fa5d0d2f9a09a81b8d7c02ea67ba7bae17bd5ec7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c53f0f25a1151eb1651e049fbfe408b89e245fa3a4c3eedb9ef7fb01433b8bc9
MD5 3cd0e0f358ffb2b221966b4b3042dfa8
BLAKE2b-256 4f9ae6447624c9f07efbe440ab96a084bc4a695b6e2cf057a516addb62ec077c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a9e46043116eb70dcc8c3fb855ea879aafe2d697cc3a911533cf34cc5800a3f5
MD5 3db749d88ae68cc31ac99a1cafadca34
BLAKE2b-256 031b8a79164308745b2de2f80cd97a7c6c16f541dec9cdca45034c3fbe84c38a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bc09a95746c4f70fc333eaa3e3ffeb24125e807b7d1ebf9d7295eaae9857e24d
MD5 d777fdc1eea8cbb45b42f4866f5fc533
BLAKE2b-256 f5ccc0a837a69ed0ed1f2658e1dcf7d7a33ea9099ca235b98233d2522bd8d404

See more details on using hashes here.

File details

Details for the file nativelib-0.2.2.4-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.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7f85d02a35227ced5ab088c1567f8eace349a4205f97851de28e2f34b1c6e67a
MD5 bd81d94466283634c44820b13cd6260e
BLAKE2b-256 a061a835ca7f7aa2d95b10654f66ce83dc9f810b728e57cfaa87837c451457e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1a39b6dbb18368c1c5612ce5c99606efcd6f0523f478682e27982ed2b10b33a
MD5 8f565a8953e24a14ed4f8b621f5f566e
BLAKE2b-256 2b9b282ae0230475bc6f1bac73169d04f72afa13e9d16434db337da39c8c33b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nativelib-0.2.2.4-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 541da544ca410127feb39edf822d87ae9393a64b087dcd9b453f02029fa844fc
MD5 848eff4034cb9c262899fd03661237bd
BLAKE2b-256 cd5b551fad3572747eed5e7b2b3d8d25181043684caafb7a3a509b299bcfd3de

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