Skip to main content

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 as 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 or unions (other than null).
  3. Every type is treated as as nullable.
  4. Additionally, some types could in theory be supported but aren't for technical reasons. These include uuid and duration.
  5. Timestamp support is limited. local-timestamp-*s are treated as Datetime without tz info, while timestamp-*s are treated 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.

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.1.tar.gz (64.2 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.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_fastavro-0.6.1.tar.gz
  • Upload date:
  • Size: 64.2 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.1.tar.gz
Algorithm Hash digest
SHA256 3624a1058de2d5adc39c7a86442e036b8e81e7b53969a62e36d0f8f0338cdf68
MD5 de9719885f6973884b5594ff399a5eaf
BLAKE2b-256 50f62af8bd2e609efdb8282c1a403a602db47d8613bdba31d3f011b7d0898a41

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_fastavro-0.6.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for polars_fastavro-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ed3f294abba5ce3d02d27a56333550de0686d06f28de9c9679ee52f03425573c
MD5 dc0313619edee487d75b35b85c1bf80f
BLAKE2b-256 5f959eecb6841bad75b625146ee1ac17d17c3a780dd24345232a7f53386f083e

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_fastavro-0.6.1-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 Sentry Error logging StatusPage Status page