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

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.2
File Size Uploaded Provenance Actions
arrowdantic-0.2.2.tar.gz 17.4 kB Without provenance Details for arrowdantic-0.2.2.tar.gz

Built distributions (wheels)

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

Total release size: 37.0 MB

Release files / arrowdantic-0.2.2.tar.gz

Download URL arrowdantic-0.2.2.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c21a01b63df3d76125974b6950d4c363a85315573eb54a9c08d13e0dd7a0a2fc
BLAKE2b-256 checksum
How to use checksums
e00a3da5bdfa21b422e33ebd5846fb5f037f345addcd861b2eac00e144d2102f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 3.0 MB
Tags Linux glibc 2.12+ x86-64 PyPy 3.7 PyPy 3.7 7.3
SHA-256 checksum
How to use checksums
09ff09f25b9c4a6d9a2f8de07790ca00356a5b69176fcf1135a09c6ca774121e
BLAKE2b-256 checksum
How to use checksums
fd82e8dcb1437a993f4b061f95769edcc46525b4eb8b7f9495e60b0e1c7e17c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp310-none-win_amd64.whl
Size 2.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
a659aae442f8aef6d1472517b53bd8cd529ca18d8eff2a0b8ab16f77072aeb6f
BLAKE2b-256 checksum
How to use checksums
a11e22fff01f8cc28cb9fc87a4076176fb274bf596492a72a70f73c27af6c526
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 3.0 MB
Tags CPython 3.10 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
9336637205a88c52124a5eff74dbf1911b01e8cc7f6665b6f372ea0a4a6709e8
BLAKE2b-256 checksum
How to use checksums
2b7895587654f65cec5c4c5853c4ed9ca06792d50f5b70be5b2451a380a797e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp310-cp310-macosx_10_7_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
9520642ad017b9f20a5b1523d38d88dafcd1e8f04544a7eb07eea49262eda97f
BLAKE2b-256 checksum
How to use checksums
8c9389916210c35da52f952ae1d2219e0ac5dfa9eafa934f890462d5afdcaa02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp39-none-win_amd64.whl
Size 2.7 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
bfe25b0d66e336f54df38d3d56d5080b1729548b14d2293734ea1bf9b2317392
BLAKE2b-256 checksum
How to use checksums
3741155249e8cb1a2743fc1991be51d44ef3cd277f88280d11a85a988cdcf6aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 3.0 MB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
3526fb39e1883284e81dcff9e2645fd2851c37598c78e5300b6e86618bfec015
BLAKE2b-256 checksum
How to use checksums
778fb190891bdfbb3d9fc45d0afe9f840cfe4700560498126f5a4d548a4f0a37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp39-cp39-macosx_10_7_x86_64.whl
Size 2.8 MB
Tags CPython 3.9 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
2d79cdad729b8144b2347ce0c234e8acf7433abfd395501f3cd51a0b2ec782aa
BLAKE2b-256 checksum
How to use checksums
54f81a023e2134e023c2128459b7ed662249caf1db895df1ba9676f2531f1f43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp38-none-win_amd64.whl
Size 2.7 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
dcc211b0a902d5d54ecf8237772339790bc67d048c932f372aebbf75d6878bb9
BLAKE2b-256 checksum
How to use checksums
1e5df16774eac4e0afd4c8e9cb040129d87602a76b69f59ddd3714e9b5e78f41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 3.0 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
5bb269e197ad9c35d5d52a42c014733443abdca42778aca40e44e5e2ef7d86fc
BLAKE2b-256 checksum
How to use checksums
21a0b68c2423092384cc516971e39d947bd9949d8a21a2f18c8be90266d779c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp38-cp38-macosx_10_7_x86_64.whl
Size 2.8 MB
Tags CPython 3.8 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
0eb30c9cc1fa4545c48a7ae0b7ae5b53c216e3d07e5e998c2909cf1defdde31d
BLAKE2b-256 checksum
How to use checksums
f3acf2a6a14e34bfa236fe86bb03f8a1927d08c4914789e3412d5cfa23d472e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp37-none-win_amd64.whl
Size 2.7 MB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
be219bf8a3eb7d6f9a98e418d338da45596e65dee0ec79ef8d5c8b04cb193cd6
BLAKE2b-256 checksum
How to use checksums
7567afd98ce040e8d5bfd5e7852d0fc6dc7c4c8e1d8f1f14c8701e77c8058489
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 3.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
ad4a8aa6e5e90fae781982b1ef269da22ab39cbadf55686e6ebe5f5ab41d8ae3
BLAKE2b-256 checksum
How to use checksums
0dbb2bf772d959d4bdbcbe6ffd6ad10c60a1bba8494d386488f04e7cf44e12eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

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

Download URL arrowdantic-0.2.2-cp37-cp37m-macosx_10_7_x86_64.whl
Size 2.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
693207ae5586bbac32949b18808f5fde7d7ca843646bea810c6726492b3e52e6
BLAKE2b-256 checksum
How to use checksums
b9a22c784b872d9413976f563c710af99992881148427daaa0e3fdb1426e36e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Security for arrowdantic 0.2.2

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