Fast python conversion from protobuf to arrow using rust
Project description
ptars
Protobuf to Arrow, using Rust
Example
Take a protobuf:
message SearchRequest {
string query = 1;
int32 page_number = 2;
int32 result_per_page = 3;
}
And convert serialized messages directly to pyarrow.RecordBatch
:
messages = [
SearchRequest(
query="protobuf to arrow",
page_number=0,
result_per_page=10,
),
SearchRequest(
query="protobuf to arrow",
page_number=1,
result_per_page=10,
),
]
payloads = [message.SerializeToString() for message in messages]
pool = HandlerPool()
handler = pool.get_for_message(SearchRequest.DESCRIPTOR)
record_batch = handler.list_to_record_batch(payloads)
query | page_number | result_per_page |
---|---|---|
protobuf to arrow | 0 | 10 |
protobuf to arrow | 1 | 10 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ptars-0.0.2rc0.tar.gz
(78.8 kB
view hashes)
Built Distributions
Close
Hashes for ptars-0.0.2rc0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b59d604908b25704859c7088755f6d581114a8d5c9911caaf4d82c456a4c712e |
|
MD5 | 1d4fa25ea5f5a490e59053945f4d8dad |
|
BLAKE2b-256 | e2a1484a7b26d8ed48e6aca6426f4dd82581a269ed70a2100d3ef8021a1c6287 |
Close
Hashes for ptars-0.0.2rc0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77c216f604f8f375966f42c2d2c2096a0be5a66546531d3f7462cffdfd87b33a |
|
MD5 | b4f6d34984985c27ae810d35ddd55d23 |
|
BLAKE2b-256 | 4f41815061f59d7116d14949c3a33a5ef41e4323e24e19713e59e50bd8476b74 |
Close
Hashes for ptars-0.0.2rc0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 775252d0b195d7832568e1ad8f1974f422488782295c45754e28cb71373f11e3 |
|
MD5 | 3c380bc99a6ee44cd38f41986feceed8 |
|
BLAKE2b-256 | 90b3dae9faa313d39332a98c1e97736826d58c3cae4b6c391624c8af1fbb7d44 |
Close
Hashes for ptars-0.0.2rc0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cb542141b31ee4c7ffea2260815e7200f2b6fdc4e621ce3cf33459057522a0e |
|
MD5 | 4da1fb74e736f984e9c611fe4c18b5a2 |
|
BLAKE2b-256 | 9dbeffaf892c402b3674d5772de64603912078403b8e0310d31cfa7bfed0ced7 |
Close
Hashes for ptars-0.0.2rc0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98c7a146169e29c4657509552fc75b1eb22edad4fb1578555b763af71d08946 |
|
MD5 | 191f1f1f7e0e712c7778f3f112bb4224 |
|
BLAKE2b-256 | e42c89381c1fdb4f22da068680874674f649463bbf7427047e268bbc9369c860 |
Close
Hashes for ptars-0.0.2rc0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da2f386d7f4f1ea403ce20a5776cd1faef3df2d2e89f6da8ab34702e02fba8e |
|
MD5 | 7ca9ca629646a5a831e4e905632e03d4 |
|
BLAKE2b-256 | f8bbb0315001ccc05a1f820dfb645e418aaaa53171b65001c3f1c41ac229a63b |