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.1.tar.gz
(10.0 kB
view hashes)
Built Distributions
Close
Hashes for arrowdantic-0.0.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 491c30a7afd8582255d328ff2658780e1790cd3657fc092e49479fab22a2b9ab |
|
MD5 | d48f771f51cea21b9aaddfdb0a7f1b6a |
|
BLAKE2b-256 | a90221565f1f063698997f5eb50c11f0369aa1c747def4eb70e75e03d9a0629b |
Close
Hashes for arrowdantic-0.0.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 957bdb9ac136f23b4c8855b6aa651e27e4745911ec88a4f31e6d97ce080de601 |
|
MD5 | a707021bf36655f5be9ee870103e6714 |
|
BLAKE2b-256 | a8d303c813fdf0d50c4860ca6bf3900ed26ba9ba501e4e31d58147b6d61c5b73 |
Close
Hashes for arrowdantic-0.0.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28680cc5e474e7f21847f571159c6ccb2b79343ba114c013168690b8ea4f38ee |
|
MD5 | ede999b9d192ff61c5f86b0c7f5fbaa0 |
|
BLAKE2b-256 | add79945b71794303aeb7560fd56378c9933633823c6e3c07ef96cddc79e0def |
Close
Hashes for arrowdantic-0.0.1-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a94d07bcdf7882ac4dd985a6df285ebec0a8bf86ff3f7c1051c5c80084798b2c |
|
MD5 | 31290b6d1554746ff4cf1509f209761f |
|
BLAKE2b-256 | 3d6f7a869d0e58eb2fc08f58809a52830defaa34b35b11af5b6f9cfa25877ddc |
Close
Hashes for arrowdantic-0.0.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ded53c48dd311a2a625c9b2e3fa69576930dc77dbf43dd7fb8cefe666f3aac |
|
MD5 | 24632c5e6097fb39d464f19becb2bc9a |
|
BLAKE2b-256 | 2ec2292cd81cb6a49a730703680ce88e560b332b80ea884eddb695e9d8d1cebb |
Close
Hashes for arrowdantic-0.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dc64e1c2acce382c2f64711e45c277e645a6328b38e1a776d25667249c058de |
|
MD5 | 2af052c24ef8e5ec9ce81bc8e6fc5418 |
|
BLAKE2b-256 | 777a131cfd98728f7468d66c2b45e50e730e485d87cbd1f7a89ec089de4ec114 |
Close
Hashes for arrowdantic-0.0.1-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654133045e572b3246e7ebd61a5510e03a42871a0d82d96119bd892342191b66 |
|
MD5 | c4a3cac0db6e88c38ae1740be5e9d105 |
|
BLAKE2b-256 | 0bcf1bd5c122a5ca071e3e1b8b402f411072ac353d0cd49bcb80562e5c0faf51 |
Close
Hashes for arrowdantic-0.0.1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c97f2c62fc58ea96be4de341849e653c6b17c93eff494a5140fca29766a006f |
|
MD5 | 3028e5c4eb264959169f02cba52a8891 |
|
BLAKE2b-256 | ad9edb2ddb51811baca1e410bf33e7a4b33eeecbefa29c96bb941881cd506204 |
Close
Hashes for arrowdantic-0.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7745140234afb1f2a230f96bdec07fb701d486b1426b315268a8a54352997794 |
|
MD5 | d9ed6bafab8bd08b48d8be915de024c4 |
|
BLAKE2b-256 | 954074fe9b7dc80bc013650dd61f3a46a80034472861cb321400ce0d829b2e19 |
Close
Hashes for arrowdantic-0.0.1-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980a2a235e729395b105236af4bf1369fc42258a90429ecfa6109cfbda654179 |
|
MD5 | 94ca95a93ed82e7517bc0743e242f3bb |
|
BLAKE2b-256 | 63ef9486824a52ffa47d79bb785e0a4b70f6b66a489d4eb34c2bf7b74e7bd71c |
Close
Hashes for arrowdantic-0.0.1-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e0aa5ab659b836b57b74416094ac9ee5998db5dbd32dc86c9467d8185067787 |
|
MD5 | ca945387ffff6c4f2005f6c775fbd3be |
|
BLAKE2b-256 | 9a8e32d36a15c4df5a5c8bf432b1645a3407266bb90abfce385d22b8659606f6 |
Close
Hashes for arrowdantic-0.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2ba99d3835554ce49928b1af8d8c7fb8c122c13ba71a13d5ded62a5b179a2d6 |
|
MD5 | b4cc2469feee6313c2f4f6408f6e1ab2 |
|
BLAKE2b-256 | 542300fcf14c92c4fa9e366a61ad1a3b8c0d74c15d7851ad6636f36fb382aa24 |
Close
Hashes for arrowdantic-0.0.1-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84456cba71caa247e60f248a9abe94855e678907561bc128fa3ada24cd8f9d79 |
|
MD5 | a029c815888c8ee4fddf4c936d5013f8 |
|
BLAKE2b-256 | 1bdaa83f8e53b219a2efd42f4351b76b7683752e080205a41e629738f97e9754 |