Arrow, pydantic style
Project description
Welcome to arrowdantic
Arrowdantic is a small Python library backed by a Rust implementation of Apache Arrow to read Parquet and Arrow IPC files to Python.
Its main differences vs pyarrow are:
- it is quite small (3Mb vs 90Mb)
- faster
- likely safer (no segfaults, core dumps, buffer overflows, etc.)
- it is type-hinted
- it has a much smaller subset of its functionality
- basic arrays (integers, floats, boolean, string, binary)
- read Apache Arrow IPC file
- read Apache Parquet
Example
import io
import arrowdantic as ad
# pyarrow is not needed; we just use it here to write a parquet file for the example
import pyarrow as pa
def _write_a_parquet() -> io.BytesIO:
arrays = [
pa.array([True, None, False], type=pa.bool_()),
]
schema = pa.schema([
pa.field(f'c{i}', array.type)
for i, array in enumerate(arrays)
])
import io
data = io.BytesIO()
pa.parquet.write_table(pa.table(arrays, schema), data)
data.seek(0)
return data
parquet_file = _write_a_parquet()
reader = arrowdantic.ParquetFileReader(parquet_file)
chunk = next(reader)
assert len(chunk) == 3
arrays = chunk.arrays()
assert arrays[0] == arrowdantic.BooleanArray([True, None, False])
assert list(arrays[0]) == [True, None, False]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
arrowdantic-0.0.2.tar.gz
(10.8 kB
view hashes)
Built Distributions
Close
Hashes for arrowdantic-0.0.2-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d968835f762fd88c684a88edf7f125879957d443c184033075514e4efa91521 |
|
MD5 | c66f1cb193e1d4075c82c7a4a4e80f00 |
|
BLAKE2b-256 | f46ca5621594aca21e0604fb577861d0688eb2fdfb6fb15541c89788d0406150 |
Close
Hashes for arrowdantic-0.0.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56e68450ffe8c18b69247a6e60b0faa90ee3f0a9c97f7dea16df2e93665f7e16 |
|
MD5 | 84fde7b8f688b83349d23a3480bdc058 |
|
BLAKE2b-256 | 93846c268ffa20ee4c3c080365f516995b56617f470686892e13abda8485a09c |
Close
Hashes for arrowdantic-0.0.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ad1f2138cd5930cc03808359d4ba9096b67b2c0f61ae8a9d7d819ae812d6151 |
|
MD5 | ff6ac49d6e5c5897ec58dec5f05b13a3 |
|
BLAKE2b-256 | 2f0fa5c2c2276fe7c727d81948d22b0242ab9dbdbd4ee986980de53535e50655 |
Close
Hashes for arrowdantic-0.0.2-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bc5613b007ea7129113ff7975bef8b367ed1a1999342a39dd59a820d7538ab3 |
|
MD5 | d85303fbe7489013c427e4d330c7bd08 |
|
BLAKE2b-256 | b489a2071c1f45c563161c840cef7472c7edf0671e3b56ae1ad7071e95a3c82b |
Close
Hashes for arrowdantic-0.0.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 161730d953a860dfe7da2068814fc531656916a135eefb9b13614ec3671832e6 |
|
MD5 | 443388bc0d345a04e1b0570aac67347e |
|
BLAKE2b-256 | d9cf0c8a260a283c78e0fd5aa1556e0ef04b9f5537b7c3b07e57fd68da87d5cd |
Close
Hashes for arrowdantic-0.0.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1620b6d1d4d6a5a670d39edd0cc1fb95b9feeb61bba32e96705b569231c70a03 |
|
MD5 | 9522020e97cea2492631fe90db31a94b |
|
BLAKE2b-256 | a793cc81f2f14ab2edfb44088a18e2a9a7ca8c8949b87c3edeb5ae01982946e9 |
Close
Hashes for arrowdantic-0.0.2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0f6ab93657e8057e381388d85b801fed42ce229cc38619f481fbffc4ccfd7e9 |
|
MD5 | e0c65cf09ac11542151cc72738bffa44 |
|
BLAKE2b-256 | 83e060930859ef2a310c7a25f3d8a9836a7f2545127a8eefb5f9d7913a9f1adf |
Close
Hashes for arrowdantic-0.0.2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd8493bfd088c1ddd2ea5704579ce20e0554b90daa194ec96a118774d392ffa3 |
|
MD5 | 9a59490ac7ca66030c6cd24f5ccc650a |
|
BLAKE2b-256 | f77d7beba5882538f565c8942397fd78d732dbf5dc50816c8a08943a205e5f7a |
Close
Hashes for arrowdantic-0.0.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa543073e39ecebf753f07b2cb71fdcad848374a698047c0f71e58f62d0c3dc4 |
|
MD5 | 84f9055d0695c3d5089557015982fc2c |
|
BLAKE2b-256 | 8899d2555239058f2817a0f443498e16493d9ecdc8aa1c6217fefaf4951d192a |
Close
Hashes for arrowdantic-0.0.2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4f149615737d2611fc2e61a27e1752942e62ce698d695be8314b184a3a25567 |
|
MD5 | 2d180f796c84ef5bd69a996bf04a30fb |
|
BLAKE2b-256 | 5eab88bc536fde942b325db8299cfe046c85123a8366ec6b0f3791454b89d1d6 |
Close
Hashes for arrowdantic-0.0.2-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f724a45e2edd6361347041d5f4fc5da35a9cdf686abbd0cc4f465b005a4dbf2 |
|
MD5 | 9ef2a19190b6dbf01279f27fe8e35cd4 |
|
BLAKE2b-256 | a4cbfc62623d46ac9aa1c58d46b332fac4589168093e7afe033f92938a31c7b0 |
Close
Hashes for arrowdantic-0.0.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 851cddf8dee7d6bee47b1d903bd1ad8a26c1df3eb763eb46ab16d5ef1c04c9fd |
|
MD5 | 1b1ea20495fc055478be36b677b92640 |
|
BLAKE2b-256 | 93c034f81986c9b28d7ece38c9d9afdedadd2c5aaab39ce437c4b27cae949600 |
Close
Hashes for arrowdantic-0.0.2-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a695ff0d03c6430949b6a4cfffb3423767464275bede1d6daaa4f9ea3696b63 |
|
MD5 | a8fa5d32dffd30ba1d324e2765611838 |
|
BLAKE2b-256 | 84d0010ab5c7c68a80a362203ed7e016ecfbb9bfb3fd6789ad1d7254f5b9b0f4 |