Skip to main content

A polars io-plugin wrapper around fastavro

Project description

polars-fastavro

build pypi docs

A polars io-plugin that wraps fastavro

This plugin allows reading, writing, and scanning avro files into polars DataFrames using the fastavro library.

Usage

from polars_fastavro import scan_avro, read_avro, write_avro

frame = scan_avro(...).collect()  # read_avro()
write_avro(frame, dest)

Limitations

  1. Because it uses python types an an intermediary, it's slow, (30x read to 80x write).
  2. Since this is ultimately converting between avro and arrow, it has no support for avro maps, unions (other than null), names for certain types
  3. Every type is treated as as nullable.
  4. Additionally, some types could in theory be supported by aren't for technical reasons. These include fixed, decimal, uuid, time, and duration.
  5. Timestamp support is limited. local-timestamp-*s are treated as Datetime without tz info, while timestamp-*s are reated as UTC Datetime. Writing Datetimes with nano-precision is also not supported.
  6. This can't read cloud files, as that functionality isn't exposed in python to my knowledge.

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

polars_fastavro-0.6.0.tar.gz (64.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polars_fastavro-0.6.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file polars_fastavro-0.6.0.tar.gz.

File metadata

  • Download URL: polars_fastavro-0.6.0.tar.gz
  • Upload date:
  • Size: 64.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for polars_fastavro-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e1668d7d16ab8d53b3cf17d0b27c8f6277da999b0e108f20f6996f94de7e76b0
MD5 d20c7de41da78601c63a913b30c8fb2b
BLAKE2b-256 51fd0b45a8eceb8bff0661ab74c58923f444a0e572e8cd30287372f3276f5046

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_fastavro-0.6.0.tar.gz:

Publisher: release.yml on hafaio/polars-fastavro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polars_fastavro-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polars_fastavro-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 355f3d9c53c5f14636e30c59d197f63df6b90710d7b8a4878c4e9d9fa867b271
MD5 fa6d47deefa5dbcb36408ed841028345
BLAKE2b-256 ef37b78ec7902b2d01000628d3f3b68098bf18cae85276ec7d542115114911ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_fastavro-0.6.0-py3-none-any.whl:

Publisher: release.yml on hafaio/polars-fastavro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page