Skip to main content

Welcome to arrowdantic

Arrowdantic is a small Python library backed by a mature Rust implementation of Apache Arrow that can interoperate with

For simple (but data-heavy) data engineering tasks, this package essentially replaces pyarrow: it supports reading from and writing to Parquet, Arrow at the same or higher performance and higher safety (e.g. no segfaults).

Furthermore, it supports reading from and writing to ODBC compliant databases at the same or higher performance than turbodbc.

This package is particularly suitable for environments such as AWS Lambda - it takes 8M of disk space, compared to 82M taken by pyarrow.

Features

  • declare and access Arrow-backed arrays (integers, floats, boolean, string, binary)
  • read from and write to Apache Arrow IPC file
  • read from and write to Apache Parquet
  • read from and write to ODBC-compliant databases (e.g. postgres, mongoDB)

Examples

Use parquet

import io
import arrowdantic as ad

original_arrays = [ad.UInt32Array([1, None])]

schema = ad.Schema(
    [ad.Field(f"c{i}", array.type, True) for i, array in enumerate(original_arrays)]
)

data = io.BytesIO()
with ad.ParquetFileWriter(data, schema) as writer:
    writer.write(ad.Chunk(original_arrays))
data.seek(0)

reader = ad.ParquetFileReader(data)
chunk = next(reader)
assert chunk.arrays() == original_arrays

Use Arrow files

import arrowdantic as ad

original_arrays = [ad.UInt32Array([1, None])]

schema = ad.Schema(
    [ad.Field(f"c{i}", array.type, True) for i, array in enumerate(original_arrays)]
)

import io

data = io.BytesIO()
with ad.ArrowFileWriter(data, schema) as writer:
    writer.write(ad.Chunk(original_arrays))
data.seek(0)

reader = ad.ArrowFileReader(data)
chunk = next(reader)
assert chunk.arrays() == original_arrays

Use ODBC

import arrowdantic as ad


arrays = [ad.Int32Array([1, None]), ad.StringArray(["aa", None])]

with ad.ODBCConnector(r"Driver={SQLite3};Database=sqlite-test.db") as con:
    # create an empty table with a schema
    con.execute("DROP TABLE IF EXISTS example;")
    con.execute("CREATE TABLE example (c1 INT, c2 TEXT);")

    # insert the arrays
    con.write("INSERT INTO example (c1, c2) VALUES (?, ?)", ad.Chunk(arrays))

    # read the arrays
    with con.execute("SELECT c1, c2 FROM example", 1024) as chunks:
        assert chunks.fields() == [
            ad.Field("c1", ad.DataType.int32(), True),
            ad.Field("c2", ad.DataType.string(), True),
        ]
        chunk = next(chunks)
assert chunk.arrays() == arrays

Use timezones

This package fully supports datetime and conversions between them and arrow:

import arrowdantic as ad


dt = datetime.datetime(
    year=2021,
    month=1,
    day=1,
    hour=1,
    minute=1,
    second=1,
    microsecond=1,
    tzinfo=datetime.timezone.utc,
)
a = ad.TimestampArray([dt, None])
assert (
    str(a)
    == 'Timestamp(Microsecond, Some("+00:00"))[2021-01-01 01:01:01.000001 +00:00, None]'
)
assert list(a) == [dt, None]
assert a.type == ad.DataType.timestamp(datetime.timezone.utc)

Metadata

Release files for arrowdantic 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arrowdantic 0.2.0
File Size Uploaded Provenance Actions
arrowdantic-0.2.0.tar.gz 15.7 kB Without provenance Details for arrowdantic-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for arrowdantic 0.2.0
File Actions
arrowdantic-0.2.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl PyPy 3.7 PyPy 3.7 7.3 Linux glibc 2.12+ x86-64 Details for arrowdantic-0.2.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.0-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details for arrowdantic-0.2.0-cp310-none-win_amd64.whl
arrowdantic-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.12+ x86-64 Details for arrowdantic-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.7+ x86-64 Details for arrowdantic-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl
arrowdantic-0.2.0-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details for arrowdantic-0.2.0-cp39-none-win_amd64.whl
arrowdantic-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details for arrowdantic-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.7+ x86-64 Details for arrowdantic-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl
arrowdantic-0.2.0-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details for arrowdantic-0.2.0-cp38-none-win_amd64.whl
arrowdantic-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details for arrowdantic-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.7+ x86-64 Details for arrowdantic-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl
arrowdantic-0.2.0-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details for arrowdantic-0.2.0-cp37-none-win_amd64.whl
arrowdantic-0.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details for arrowdantic-0.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.7+ x86-64 Details for arrowdantic-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl

Total release size: 34.5 MB

Release files / arrowdantic-0.2.0.tar.gz

Download URL arrowdantic-0.2.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3a16f0b512fc4f94b6b47226cdc3e447f521d432b9c808a048b547901e855298
BLAKE2b-256 checksum
How to use checksums
1aa7baf9e665e99974901ac53ffee3c5dca6ce5bd17dcb8d1c8bffb91146b09a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL arrowdantic-0.2.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.9 MB
Tags Linux glibc 2.12+ x86-64 PyPy 3.7 PyPy 3.7 7.3
SHA-256 checksum
How to use checksums
0467f975355b275dad4fe63bbe0dc91909e5f7fe61a1dfe961bf57a188b10120
BLAKE2b-256 checksum
How to use checksums
98ca1ce174f3fc46b8e79f485d76260e1769623fb37d7cb1b0627fdb2b072095
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp310-none-win_amd64.whl

Download URL arrowdantic-0.2.0-cp310-none-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
8a2c7b9caec79610deeb204eeb7e95e29ad96c667d9de77a4e41ddeb4e56f6a6
BLAKE2b-256 checksum
How to use checksums
81e0027793b925e173c047447c124160a91b02a28afc6f83cd5a05b5dcdb32c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL arrowdantic-0.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
0d07f04d18d6eba941f9d7e45cdb750cd828b0955afd5aeb1634c8923189ccf5
BLAKE2b-256 checksum
How to use checksums
0881bb93f1c5d12cb49ddfa5bbeb30959c6082112aabbb714c51095ce683cdc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl

Download URL arrowdantic-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl
Size 2.6 MB
Tags CPython 3.10 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
33bf6fe699a21eab8c4253b8184cbcda8eab1b8252850a9dc054b14b8c900f37
BLAKE2b-256 checksum
How to use checksums
9eaecd9e69875e66df0c417d94c31380c5434438a5a8520cfa988ca14041ef23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp39-none-win_amd64.whl

Download URL arrowdantic-0.2.0-cp39-none-win_amd64.whl
Size 2.4 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
92c64d897e69a22d3e4a69e0feea02f301d5d606bef89459177c59ea2dcb8ac3
BLAKE2b-256 checksum
How to use checksums
5c705a635f232f3785a02a1e78c37a9ce3dc33428f36a44dc149c872b201b055
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL arrowdantic-0.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.8 MB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
7e855b0f98206d5ea95fcf3b8eec953b072f18eedbb1211b91bd99431264fa8e
BLAKE2b-256 checksum
How to use checksums
1af855f3fab3ffb55fc11c8f321e79a3319337d7fda416ec417df2f260593c00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl

Download URL arrowdantic-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl
Size 2.6 MB
Tags CPython 3.9 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
6fc4860310f2d57e7ad66068ffc2c4e88da27a22b763cd19e27360f45a560477
BLAKE2b-256 checksum
How to use checksums
40c0380ad795bf72dfae7ac9b778c6ef3332befcd5ad4a09ddbd085df667f2ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp38-none-win_amd64.whl

Download URL arrowdantic-0.2.0-cp38-none-win_amd64.whl
Size 2.4 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
8f232ca88351253ae441dd3920ecd2f8fc7aedab4b8e98f6fa89afcc9755d09b
BLAKE2b-256 checksum
How to use checksums
c7d6a4fd5306ad18f70f54d901f7b87de2219de978e0393d25f9defe077cda3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL arrowdantic-0.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.8 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
b3996c27b945bac11c61edef0501837ccfdbc7e294396c829bd18e27f263088b
BLAKE2b-256 checksum
How to use checksums
34b4cf5db95d3f9f1133c321f753b7e36b39337fb764ad44fdfe4a6567a1ffbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl

Download URL arrowdantic-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl
Size 2.6 MB
Tags CPython 3.8 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
961786231d8c9be51332cd23d490dae37697585ba9344fcb6db4a3ce6cd1aac5
BLAKE2b-256 checksum
How to use checksums
e4c4a4d51b364bec3331da692e189885759e9164fcb05b257f8ffae1344bdda8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp37-none-win_amd64.whl

Download URL arrowdantic-0.2.0-cp37-none-win_amd64.whl
Size 2.4 MB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
a244a20c98986ba5616ebea8ec15a5004b4383c6aa6dbe31d5d8a69bbbd56700
BLAKE2b-256 checksum
How to use checksums
375abcf53633e9660e85f18b8867e1f553f11bf7b2a2718d44a9c72269c2c8be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL arrowdantic-0.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
a5f58a1871016d0d704afec0807edefefe4b8ef94bc320d72801bfd16b472f76
BLAKE2b-256 checksum
How to use checksums
e417e39380cf880ea29b4d7c09e8aa31fa9852f4d8571d338b8010f0532f73ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / arrowdantic-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl

Download URL arrowdantic-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl
Size 2.6 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
b507ff32283bc481b413aba38924bb5a548fba185e0a3a73861d760ce1fcbab3
BLAKE2b-256 checksum
How to use checksums
5a2c37e9ba006d79f2f370eb1557980607dd2d18c8386e1b8ca51654b483af20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Security for arrowdantic 0.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page