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.2.0.tar.gz (57.7 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.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for polars_fastavro-0.2.0.tar.gz
Algorithm Hash digest
SHA256 876f20ecec875bd226b3f68451fd3c52ac8dfe8fe9dfe8a9efd255f48852cd46
MD5 783b111a7499120c1e1f207c29b34691
BLAKE2b-256 e8920f0abea545d18f3c98546f5ba6ef27444447879cdf8f02c27da43111f013

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_fastavro-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7963946d4a3850c903893babd647c4863337a09af95733d28046f885d12b480
MD5 e3a690bb2209be4edb1de35a3a6a69af
BLAKE2b-256 17430e5f1e9c5fd0dc86f17fe9ec82e79c465477eba9b506172d8ad19ed11c06

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