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.1.0.tar.gz (57.6 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.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_fastavro-0.1.0.tar.gz
  • Upload date:
  • Size: 57.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.28

File hashes

Hashes for polars_fastavro-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c0c29a7eacad6bf3b1d66c671eb9505b863587dc7ff1ce926715133983484a5
MD5 c44df40d06b67076807bdabf65fd07d3
BLAKE2b-256 44c1fb98ad90f3a00a11dd06853a830266c6a06e5c7be2a262e6a660aa43aec8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_fastavro-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 272c748d9fd3ff4dd7d0c535d3562d23fa38af005a8018e0e759535dc0d0791b
MD5 d631e936549ca382ff4fb2b302574941
BLAKE2b-256 3ea6b4e22f0c0f3a83bcf59e1ee6fa91d7e9e6ae59fd472f353b045b2cf0ab47

See more details on using hashes here.

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