Skip to main content

Fast read/write of AVRO files

Project description

fastavro

Build Status Documentation Status codecov

Because the Apache Python avro package is written in pure Python, it is relatively slow. In one test case, it takes about 14 seconds to iterate through a file of 10,000 records. By comparison, the JAVA avro SDK reads the same file in 1.9 seconds.

The fastavro library was written to offer performance comparable to the Java library. With regular CPython, fastavro uses C extensions which allow it to iterate the same 10,000 record file in 1.7 seconds. With PyPy, this drops to 1.5 seconds (to be fair, the JAVA benchmark is doing some extra JSON encoding/decoding).

fastavro supports the following Python versions:

  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10
  • PyPy3

Supported Features

  • File Writer
  • File Reader (iterating via records or blocks)
  • Schemaless Writer
  • Schemaless Reader
  • JSON Writer
  • JSON Reader
  • Codecs (Snappy, Deflate, Zstandard, Bzip2, LZ4, XZ)
  • Schema resolution
  • Aliases
  • Logical Types
  • Parsing schemas into the canonical form
  • Schema fingerprinting

Missing Features

  • Anything involving Avro's RPC features

Documentation

Documentation is available at http://fastavro.readthedocs.io/en/latest/

Installing

fastavro is available both on PyPi

pip install fastavro

and on conda-forge conda channel.

conda install -c conda-forge fastavro

Contributing

  • Bugs and new feature requests typically start as github issues where they can be discussed. I try to resolve these as time affords, but PRs are welcome from all.
  • Get approval from discussing on the github issue before opening the pull request
  • Tests must be passing for pull request to be considered

Developer requirements can be installed with pip install -r developer_requirements.txt. If those are installed, you can run the tests with ./run-tests.sh. If you have trouble installing those dependencies, you can run docker build . to run the tests inside a docker container. This won't test on all versions of python or on pypy, so it's possible to still get CI failures after making a pull request, but we can work through those errors if/when they happen. .run-tests.sh only covers the Cython tests. In order to test the pure Python implementation, comment out FASTAVRO_USE_CYTHON=1 python setup.py build_ext --inplace and re-run.

NOTE: Some tests might fail when running the tests locally. An example of this is this codec tests. If the supporting codec library is not availabe, the test will fail. These failures can be ignored since the tests will on pull requests and will be run in the correct environments with the correct dependecies set up.

Releasing

We release both to pypi and to conda-forge.

We assume you have twine installed and that you've created your own fork of fastavro-feedstock.

Changes

See the ChangeLog

Contact

Project Home

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastavro-1.4.11.tar.gz (733.5 kB view details)

Uploaded Source

Built Distributions

fastavro-1.4.11-cp310-cp310-win_amd64.whl (417.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

fastavro-1.4.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

fastavro-1.4.11-cp310-cp310-macosx_10_14_x86_64.whl (493.7 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

fastavro-1.4.11-cp39-cp39-win_amd64.whl (416.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastavro-1.4.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

fastavro-1.4.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

fastavro-1.4.11-cp39-cp39-macosx_10_15_x86_64.whl (493.6 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

fastavro-1.4.11-cp38-cp38-win_amd64.whl (416.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

fastavro-1.4.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

fastavro-1.4.11-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

fastavro-1.4.11-cp38-cp38-macosx_10_14_x86_64.whl (487.3 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

fastavro-1.4.11-cp37-cp37m-win_amd64.whl (402.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

fastavro-1.4.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

fastavro-1.4.11-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

fastavro-1.4.11-cp37-cp37m-macosx_10_14_x86_64.whl (478.8 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

Details for the file fastavro-1.4.11.tar.gz.

File metadata

  • Download URL: fastavro-1.4.11.tar.gz
  • Upload date:
  • Size: 733.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.0

File hashes

Hashes for fastavro-1.4.11.tar.gz
Algorithm Hash digest
SHA256 7c64332ad52de0134be9a933ca986514c3ff85c63d54bc5398c31f0498ac1820
MD5 df81ae6dbcb80948c0c6bbeddd1d1572
BLAKE2b-256 6a34fbadbd692e88ef631ef0cb97b21bfe592d605388897ef1079d11da4de19f

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8dca11bc3191cd7de0a3c4b76a70dac493356a219e96ebcde0def1f06faddef7
MD5 228631dc8e007231c398a51d9f1d1877
BLAKE2b-256 655d62ff5eb46e96c09935783d8f0dadcfedc56a04da9d5e5a29a55f54ece971

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18f5e736d12e67348f253da8a332d7c3b483ca04f2b6e772befa79d1a46bac9d
MD5 abf5830c4e63ce2578d4a43c9ce358ce
BLAKE2b-256 9fce9799ab9735e6323bb0d0010d674569e4825aac7de62fda431762353bdfa6

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 44f01008f95d685edacc4b10366c755d25612df00924349f7d34a29f08522ce3
MD5 5280813db45e1125adcd9885b85e3919
BLAKE2b-256 130690d9765e7228058603a0e9c28dcd8da32f4b8b0a6c2415d3d747533f11a1

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: fastavro-1.4.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 416.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.0

File hashes

Hashes for fastavro-1.4.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c94130a8c8d80073eb0276844915aa5e928ae322024e76dc57943542ccda211c
MD5 60ebf8454dff19e3df83adb788338a6a
BLAKE2b-256 6605fb8354fea7026d69388085417c8ccbf9a70ad52d510f2b3e01cd958462e6

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8491bfcba25c9d661289f884688e5a4f56f2ee389a240d0ad02692495a9a087
MD5 e0df30508cd6f8ae64e0d5acb9f3fc1e
BLAKE2b-256 f464281d735d4336409e80ce75ef685bea574c4a0fe8abb55edc0820b83b2b12

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 842b25782f911ee8c626f9d9fedc2ef01aeac272536fe90ee6d45b2ae7cdb024
MD5 89954551579bdce656cf67889358cb73
BLAKE2b-256 82919fd3a20478248e3cc5a70a3d5abb6f03ab0abfd68f21067d87da1c8d04c2

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 621e72cc365c9539d7590e7b43e48a62e6bfb4c2de7c16837fed54d113d7312c
MD5 465635491edf334dc89648632e8b9e25
BLAKE2b-256 137eb7e20cfa6221df641a906c8496c40af5db10d1673916526723fd9cad8b0a

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: fastavro-1.4.11-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 416.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.0

File hashes

Hashes for fastavro-1.4.11-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ce0776f54591aef90bcd02bd919964abe4c2ad2a10a4336c3a1b66cef289b41c
MD5 206a36e99764cc75a5b356689e60ef1c
BLAKE2b-256 ad1bf0bd34417bbbd20158b3b68c72d9011a0a8c8efdbdeaa4db4fa7baf99b8a

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7cb7475a9b25b9f8aebe7eb756dafedd0369434571062f3883d894281befd7c
MD5 1cf1b712ec24bc88e0689d5ed489be76
BLAKE2b-256 e56f7023f1d712440d625e00a9ea4800322422fbcb16fc366c15d1b24d9b666e

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c03d3c802b71f44e7b3442abae961bba996258244bd222b242ad1e5cb7754e57
MD5 1e013002062771ea5f59514a16ddf11c
BLAKE2b-256 ca2b243aa7cace70961fc0dc3e4a40b7e33ab8fa9e39e44c23e547499eaa26b3

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 732eab3a1ae5d2c3f4b52e747c55bcc41c4df0eb7e8a395038080741a3c0a934
MD5 48c86c4b76c4bfd21e65ee32f3f83375
BLAKE2b-256 ec092d544dfaa2c33dffc83c472f242767d78a3a073dfc0b94cea1001dedac9e

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: fastavro-1.4.11-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 402.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.0

File hashes

Hashes for fastavro-1.4.11-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ceaba04da9419f40899a670eb62eb373a127b511bb8e3ae4f6f1f23ec49bd0e4
MD5 5f7b663b44e4e7f1faad5e932cb42d20
BLAKE2b-256 8e9df9855603e48788b2eb5ad2cad8e0d1ba5c863b8321c5bf6ff9a408f7d0e0

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19ba25c6529f50722a7618cc4ca24c7d265def57fd9f94e4e554e1df8cce38d2
MD5 35d77c047fcdfdbbfea2d0cd79ba68c3
BLAKE2b-256 b4b308827c1ae71cb74296df9b10711c218b0c14a4a7a005c12e3a8d633c9440

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0c17e3decfac260e1be4d02d1903d2483eec2f3ce7f92c9b808a0f6a81572c4b
MD5 ebf8812b8ec2e2f75d65dd4a77165ee8
BLAKE2b-256 fa329411ff963f80e8babdccc8a963f050b496cc87e5dc059120573ce0611057

See more details on using hashes here.

File details

Details for the file fastavro-1.4.11-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-1.4.11-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7a2a0bf03686f9d860e8f8476be000f5b3e6cc9af6853dbabab2ef9cfa5dc3a0
MD5 c9436df5ae7c640228a7d081643630e8
BLAKE2b-256 b49d6675bca5c5be2d433bd2f2ea7b0eeb8ac1402d3d40248d3ef9f7f120c4c1

See more details on using hashes here.

Supported by

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