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.1

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.1
File Size Uploaded Provenance Actions
arrowdantic-0.2.1.tar.gz 15.8 kB Without provenance Details for arrowdantic-0.2.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for arrowdantic 0.2.1
File Actions
arrowdantic-0.2.1-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.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.1-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details for arrowdantic-0.2.1-cp310-none-win_amd64.whl
arrowdantic-0.2.1-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.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.1-cp310-cp310-macosx_10_7_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.7+ x86-64 Details for arrowdantic-0.2.1-cp310-cp310-macosx_10_7_x86_64.whl
arrowdantic-0.2.1-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details for arrowdantic-0.2.1-cp39-none-win_amd64.whl
arrowdantic-0.2.1-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.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.1-cp39-cp39-macosx_10_7_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.7+ x86-64 Details for arrowdantic-0.2.1-cp39-cp39-macosx_10_7_x86_64.whl
arrowdantic-0.2.1-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details for arrowdantic-0.2.1-cp38-none-win_amd64.whl
arrowdantic-0.2.1-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.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.1-cp38-cp38-macosx_10_7_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.7+ x86-64 Details for arrowdantic-0.2.1-cp38-cp38-macosx_10_7_x86_64.whl
arrowdantic-0.2.1-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details for arrowdantic-0.2.1-cp37-none-win_amd64.whl
arrowdantic-0.2.1-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.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
arrowdantic-0.2.1-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.1-cp37-cp37m-macosx_10_7_x86_64.whl

Total release size: 35.2 MB

Release files / arrowdantic-0.2.1.tar.gz

Download URL arrowdantic-0.2.1.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ab01c169bcaf456473d8b1595672edfcc13f1f9b7881e21570287b982f4f2003
BLAKE2b-256 checksum
How to use checksums
061a19bfe70ef5bb19a99097e71bc3697f59ab5dd5f7f2496004574ffd3190ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-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
9efed62333c93e2894bea8e7f3aee82b801a1fdaf617d0652527992f6c96f74c
BLAKE2b-256 checksum
How to use checksums
16f739d46813611112bf99b03dd5dc8f6a6409c1f1be8da34a008e7edbec9df8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp310-none-win_amd64.whl
Size 2.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
4da1a48ce09172826ab7a36957e674a15f606103571ee3214aef1db71c024211
BLAKE2b-256 checksum
How to use checksums
31082c4e459e0ced20e1405ef65588469ffa9c58d9d08f46c0c8d440bcf73372
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.9 MB
Tags CPython 3.10 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
7445f3bec6c0907e342dc8cc88e802fa08a13012939b2d696f03ce2da143077f
BLAKE2b-256 checksum
How to use checksums
02b498c573ad8adf8f792b12f043e2166132f7e2db2f1332a0ff8b9889ce388a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp310-cp310-macosx_10_7_x86_64.whl
Size 2.7 MB
Tags CPython 3.10 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
0210b1bda9fb50fda85b5046ac2bf2d7bb506d23c5ceb323c161bd938fc1a66b
BLAKE2b-256 checksum
How to use checksums
e94694c98dbfb72e6e00fa48ed541e3acf587054e808782ca7e0cf21c7daf96b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp39-none-win_amd64.whl
Size 2.5 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
ab34b5b19bb70bb7ac4400356f234a73c5405ccdaba971d4358aebfae81fba53
BLAKE2b-256 checksum
How to use checksums
bc6131e3d86834c3eddf267cd0811dec135820ffe21130e36d8440ee9c8508ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.9 MB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
cc1dec6d51545cb3f69ca08edab28e6031a9fea59588c204cb6e8793214fe6b3
BLAKE2b-256 checksum
How to use checksums
b62fae29542388ccfd501d4ab8d101a79574025fcbe328376e890654ac313b7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp39-cp39-macosx_10_7_x86_64.whl
Size 2.7 MB
Tags CPython 3.9 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
11846bdf7ccd35cf4fb4b007f620894f194d49877b09dd57eb53a6e702a73b66
BLAKE2b-256 checksum
How to use checksums
0ae5b8d1c678fe61eac2b364271d4cf54db7ccedcf623cf30870cdf6ed067a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp38-none-win_amd64.whl
Size 2.5 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
8002deeb1e4ce55ea19f7802fafba5635a7370aac1775620d2724dca98e7ead0
BLAKE2b-256 checksum
How to use checksums
54aa103586db482c361528402e5e59f048169b339a7fc07cc4c07c63ffad286a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.9 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
2412ed19ab5c951afb5ba88a1dd4c851e977435d4d6a5ef431a083e57b2383b9
BLAKE2b-256 checksum
How to use checksums
f54d19d57ae30d679b3ef6f1b23f2047321a5fad2dcd9291a27af33a27aa7971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp38-cp38-macosx_10_7_x86_64.whl
Size 2.7 MB
Tags CPython 3.8 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
0505e5fad8f73f6979836c841ab018868f3009584c65da250f8b970d3f162fb4
BLAKE2b-256 checksum
How to use checksums
3be6c8118a10231f15783bec48b4986a5dd62b081e3e2cae5eed3e0feecd77f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp37-none-win_amd64.whl
Size 2.5 MB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
e0002f9b5906594a181501852a9d7656b5baf044a4ffad56f0190ea9fe886111
BLAKE2b-256 checksum
How to use checksums
1a0c286650b6987f53e1376d4aae122ac0dc0485cb44944e06b62653df158f18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 2.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
f06ee114765c50e138469c49c7247cd66013e78a26a40c65910f1d70d222525b
BLAKE2b-256 checksum
How to use checksums
45821194d86506a8a8c3a13c9edc8cefe3fe33d9226773a194c628fc9efa3b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

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

Download URL arrowdantic-0.2.1-cp37-cp37m-macosx_10_7_x86_64.whl
Size 2.7 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
f66e6db34029e9df10696adc5a76416d0e81a9e7e36e0cfed942543d11035b27
BLAKE2b-256 checksum
How to use checksums
2ce4fccf24d12c5007ca6316743cf41cd0bde1248a7b2160580454937cf0173f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for arrowdantic 0.2.1

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