A polars io-plugin wrapper around fastavro
Project description
polars-fastavro
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
- Because it uses python types an an intermediary, it's slow, (30x read to 80x write).
- Since this is ultimately converting between avro and arrow, it has no support for avro maps, unions (other than null), names for certain types
- Every type is treated as as nullable.
- Additionally, some types could in theory be supported by aren't for technical reasons. These include fixed, decimal, uuid, time, and duration.
- 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.
- 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.5.1.tar.gz
(58.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polars_fastavro-0.5.1.tar.gz.
File metadata
- Download URL: polars_fastavro-0.5.1.tar.gz
- Upload date:
- Size: 58.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.28
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d4d849a3503f662c0d73babaf7cab7cdce77b588287b5b181daea61d813c1f3
|
|
| MD5 |
56e8f3774726d880adaae0e2112141b4
|
|
| BLAKE2b-256 |
ddc8dfeb390abd81e6f7c885d9677b84bee16f75993e8559724932b689aa78ad
|
File details
Details for the file polars_fastavro-0.5.1-py3-none-any.whl.
File metadata
- Download URL: polars_fastavro-0.5.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.28
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
808cb593e9a1b6ae19baa27c40f3b78b35ab1f5d44a280da39d83ebd4ded7976
|
|
| MD5 |
a9213c9605091b9322eb38b29e205c19
|
|
| BLAKE2b-256 |
9f6e43fdae9a0abbe0c2bc33cccdfe03279a597016a5a0ad619611c7f447e1a6
|