NativeDumper
Library for read and write Native format between Clickhouse and file
Examples
Initialization
from native_dumper import (
CompressionMethod,
CHConnector,
NativeDumper,
)
connector = CHConnector(
host = <your host>,
dbname = <your database>,
user = <your username>,
password = <your password>,
port = 8123,
)
dumper = NativeDumper(
connector=connector,
compression_method=CompressionMethod.ZSTD, # or CompressionMethod.LZ4 or CompressionMethod.NONE
)
Read dump from Clickhouse into file
file_name = "native.zstd"
# you need define one of parameter query or table_name
query = "select ..." # some sql query
table_name = "default.test_table" # or some table
with open(file_name, "wb") as fileobj:
dumper.read_dump(
fileobj,
query,
table_name,
)
Write dump from file into Clickhouse
file_name = "native.zstd"
# you need define one of parameter table_name
table_name = "default.test_table" # some table
with open(file_name, "rb") as fileobj:
dumper.write_dump(
fileobj,
table_name,
)
Write from Clickhouse into Clickhouse
Same server
table_dest = "default.test_table_write" # some table for write
table_src = "default.test_table_read" # some table for read
query_src = "select ..." # or some sql query for read
dumper.write_between(
table_dest,
table_src,
query_src,
)
Different servers
connector_src = CHConnector(
host = <host src>,
dbname = <database src>,
user = <username src>,
password = <password src>,
port = 8123,
)
dumper_src = NativeDumper(connector=connector_src)
table_dest = "default.test_table_write" # some table for write
table_src = "default.test_table_read" # some table for read
query_src = "select ..." # or some sql query for read
dumper.write_between(
table_dest,
table_src,
query_src,
dumper_src.cursor,
)
Get NativeReader object from stream
table_name = "default.test_table_read" # some table for read
query = "select ..." # or some sql query for read
reader = dumper.to_reader(
query=query,
table_name=table_name,
)
NativeReader has three methods available, but only one of the methods is available at a time within a single session.
# read as python generator object
reader.to_rows()
# or read as pandas.DataFrame
reader.to_pandas()
# or read as polars.DataFrame
reader.to_polars()
Write from python objects into target table
# some table for write data
table_name = "default.test_table_write"
dtype_data: Itarable[Any]
pandas_frame: pandas.DataFrame
polars_frame: polars.DataFrame
# write from python object
dumper.from_rows(dtype_data, table_name)
# write from pandas.DataFrame
dumper.from_pandas(pandas_frame, table_name)
# write from polars.DataFrame
dumper.from_polars(polars_frame, table_name)
Open Native file format
Get info from my another repository https://github.com/0xMihalich/nativelib
Installation
From pip
pip install native-dumper
From local directory
pip install .
From git
pip install git+https://github.com/0xMihalich/native_dumper
Metadata
Release files for native-dumper 0.3.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 35.6 MB
Release files / native_dumper-0.3.5.3-cp314-cp314-win_amd64.whl
| Download URL | native_dumper-0.3.5.3-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
493ab3f547729c9630418975b151094c8ad2c2c1aa87674e357071b6484988f6
|
|
BLAKE2b-256 checksum How to use checksums |
e12bf3bddfbb2ed0afe608cf38d6c0b531dd1f49e5605792d8076957e3e1797f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c0abb11f4ffc920358081cfd3fb5152dfd7392414862b4e42ef494d14e503a44
|
|
BLAKE2b-256 checksum How to use checksums |
ec1fcbf47046ed552a8b8fc24144c374baeb0221e4cc25fd4e022ad7ad4d5daa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | native_dumper-0.3.5.3-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7559459d4bfe03dc8de4e2965da1fc85c1cd45e398360edb1f202bf919789f57
|
|
BLAKE2b-256 checksum How to use checksums |
7a4052593a008c2d6177004f84b1cecedcffed9bf50101ef268344c0a39e92b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp314-cp314-macosx_10_15_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp314-cp314-macosx_10_15_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
a7a5c7f05b24a37d0fe5c0011b53841991c6045219ba8a36095798b45096284e
|
|
BLAKE2b-256 checksum How to use checksums |
9d2e2eb255bfa9010b5f79edf36e032d65a1bba6f547754e05b5d989485d0a51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp313-cp313-win_amd64.whl
| Download URL | native_dumper-0.3.5.3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
969b0eca581ce19ffe7788739d364f444dd903e5eb51ba07366933229254ed94
|
|
BLAKE2b-256 checksum How to use checksums |
93f16c7fe6247beba963c6b1bdf3d88ba0c77903d255f037f58a53d778f8147c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9c868ddeda8f355db0a1a7107b085124b1ceeb8928d109583d23183989534ffe
|
|
BLAKE2b-256 checksum How to use checksums |
f38c632d0bff13391da6933288dd7b644f841599bf5d869bd1fd6267b256b79e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | native_dumper-0.3.5.3-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a7cddf66b799a22b1700ec36079df327cf08c1ee04808ec71b9aa8340b276093
|
|
BLAKE2b-256 checksum How to use checksums |
67bc808d067b733a616680651615c4342e7981061d4a96c942652e8954588cd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp313-cp313-macosx_10_14_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp313-cp313-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
8378283b533d1e800ae75461b824c41259eb07c1f3a6114f0386602a50b13a10
|
|
BLAKE2b-256 checksum How to use checksums |
0557b77f7f27c24b56db07b8b71fc25e9c1aee393c824bb54236606c1260f23e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp312-cp312-win_amd64.whl
| Download URL | native_dumper-0.3.5.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
18d0214e4f22f9bc67b04965815783c5864de0f6ddefed257ff3525f3c93a51b
|
|
BLAKE2b-256 checksum How to use checksums |
d6c77b6be99ae7ce1984194e234f255d9df628c9aa3f2471e1a192a9e9fcb830
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d79a9b623a75d09f2f529dbec0e0048f3751a73637452d16a4a0d398cef627d8
|
|
BLAKE2b-256 checksum How to use checksums |
7831a3109f4e9a6ea86e90aebf2b6de3dba4d9c38fbfdd735a9748824363dcc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | native_dumper-0.3.5.3-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7591c0d0aa83780b7f0bb73d98e2a476ea08a64f893c0fe968c5c65ffb5ead7f
|
|
BLAKE2b-256 checksum How to use checksums |
ad943892b1a8bb3d6fcd29f0b8d78620b4db227a6a407c4720167c8d5a506baa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp312-cp312-macosx_10_14_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp312-cp312-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
a043007a0d097e301d34eb110178c5c82f01b4f9eda29117093eb4ed2fbded30
|
|
BLAKE2b-256 checksum How to use checksums |
45eda321be01b9cf1c1823e14c8925ab2b79dcc9074c114293ed488d26c4b869
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp311-cp311-win_amd64.whl
| Download URL | native_dumper-0.3.5.3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
92c41cf1776f8153a3012fdd1414c4687a63ee183d3453946115259e973c8b9e
|
|
BLAKE2b-256 checksum How to use checksums |
66f4bb6c8684ac8c40cf8ea7f36bf5a231f07adf5fb60f5eeb49d0d88ff8f700
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
21903e9a15a28f88aeb88163761a6fd65920b98702bc508fd206a04dc8761fff
|
|
BLAKE2b-256 checksum How to use checksums |
fdee7f1c8016ff1f93b2e8bbcba5e641c86d046254bbed98f84db2052c986c11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | native_dumper-0.3.5.3-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c5bfe652da196a59cc4942b761ceafc79cd568938dc1269caa35142d63b6d5ab
|
|
BLAKE2b-256 checksum How to use checksums |
05d2f6fa34766d50dc69c69ff4000d8caa04115e7a00ae9030569a30d5c5eea8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp311-cp311-macosx_10_14_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp311-cp311-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f7ff5998145bde08ed9d2886e5915ac99044fccf84d5e61b1d2856e622c640c
|
|
BLAKE2b-256 checksum How to use checksums |
6ca0fde1493aa870fc37ec659effc0930e6a0cedb208776aa9106aa6de016ac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp310-cp310-win_amd64.whl
| Download URL | native_dumper-0.3.5.3-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7dd7b8a403dcd36e2c1c6f75bde7e5b010412b2f3a115af05a66caaa3cd0a203
|
|
BLAKE2b-256 checksum How to use checksums |
76782862cce8c9ca325780b9ed347566e3a9e95d755f940e197e7db2020784a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d2cff82cb8b6f45fad7dd6329554b76426886b897ea3af35386807bd23a32539
|
|
BLAKE2b-256 checksum How to use checksums |
638d500c1cab688eaf37629c0af5e35cbac67bac52b191a921dab6d6d376ebde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | native_dumper-0.3.5.3-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
00d1744ee0c7c343137c8e17c06f138920c5d6df6f231cb31773b84c39d4c2d1
|
|
BLAKE2b-256 checksum How to use checksums |
52ab0610c08eaed264f088d67a1f778318151c6c0f68a64b3c85da5dccb6e3be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / native_dumper-0.3.5.3-cp310-cp310-macosx_10_14_x86_64.whl
| Download URL | native_dumper-0.3.5.3-cp310-cp310-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
30a900eb8af3d21ff6897b02973b6ca897ee2f8b008160a66a1730f02b234a35
|
|
BLAKE2b-256 checksum How to use checksums |
5372f52fe1a2de19fc15e6c15a2df1067fcce6f7b93a1ffefabe59fa35a88c85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for native-dumper 0.3.5.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.