Skip to main content

Fast read/write of AVRO files

Project description

# fastavro [![Build Status](https://travis-ci.org/tebeka/fastavro.svg?branch=master)](https://travis-ci.org/tebeka/fastavro) [![Documentation Status](https://readthedocs.org/projects/fastavro/badge/?version=latest)](http://fastavro.readthedocs.io/en/latest/?badge=latest)

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 2.7

  • Python 3.4

  • Python 3.5

  • Python 3.6

  • PyPy

  • PyPy3

[Cython]: http://cython.org/

# Documentation

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

# Installing fastavro is available both on [PyPi](http://pypi.python.org/pypi)

pip install fastavro

and on [conda-forge](https://conda-forge.github.io) 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.

### Releasing

We release both to [pypi][pypi] and to [conda-forge][conda-forge].

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

  • Make sure the tests pass

  • Run make tag

  • Copy the windows build artifacts for the new version from https://ci.appveyor.com/project/scottbelden/fastavro to the dist folder

  • Copy the linux build artifacts for the new version from https://github.com/tebeka/fastavro/releases/tag/ to the dist folder

  • Run make publish

  • Note the sha signature emitted at the above

  • Switch to feedstock directory and edit recipe/meta.yaml
    • Update version and sha256 variables at the top of the file

    • Run python recipe/test_recipe.py

    • Submit a [PR][pr]

[conda-forge]: https://conda-forge.org/ [feedstock]: https://github.com/conda-forge/fastavro-feedstock [pr]: https://conda-forge.org/#update_recipe [pypi]: https://pypi-hypernode.com/pypi [twine]: https://pypi-hypernode.com/pypi/twine

# Changes

See the [ChangeLog]

[ChangeLog]: https://github.com/tebeka/fastavro/blob/master/ChangeLog

# Contact

[Project Home](https://github.com/tebeka/fastavro)

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-0.19.4.tar.gz (501.2 kB view details)

Uploaded Source

Built Distributions

fastavro-0.19.4-cp36-cp36m-win_amd64.whl (307.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

fastavro-0.19.4-cp36-cp36m-manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.6m

fastavro-0.19.4-cp35-cp35m-win_amd64.whl (300.1 kB view details)

Uploaded CPython 3.5m Windows x86-64

fastavro-0.19.4-cp35-cp35m-manylinux1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.5m

fastavro-0.19.4-cp34-cp34m-manylinux1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.4m

fastavro-0.19.4-cp27-cp27m-win_amd64.whl (305.0 kB view details)

Uploaded CPython 2.7m Windows x86-64

fastavro-0.19.4-cp27-cp27m-manylinux1_x86_64.whl (1.2 MB view details)

Uploaded CPython 2.7m

File details

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

File metadata

  • Download URL: fastavro-0.19.4.tar.gz
  • Upload date:
  • Size: 501.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fastavro-0.19.4.tar.gz
Algorithm Hash digest
SHA256 80841852f284dea11169ce6cefc76ed234b80d792dc3278690ef2d688dda363a
MD5 ab8164ba748fc92340793b8ec34e0eea
BLAKE2b-256 700b86e4bd257cb1e70abccbe61da8563e3a0be27cadcde4ab736808a494f7f7

See more details on using hashes here.

File details

Details for the file fastavro-0.19.4-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for fastavro-0.19.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 cc310283804bc95a1fdfca5de2a98cbf74b173336d16b3028a9a5531e555d9d7
MD5 3a95e8beb3e9f3727d6c136715bd9f4a
BLAKE2b-256 db88e6eeba7926109b052aa44aa9cb39677a5adf328dc4fc79fdfceb9017f783

See more details on using hashes here.

File details

Details for the file fastavro-0.19.4-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-0.19.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 67f344e3c6e5af36319e3d4d4c68df520d2885fcf33b078d7b2744aa28ce9c5a
MD5 9d5aad49b9aef75dffb30c861af7f6f4
BLAKE2b-256 98cff67e606c5c693633aed3ad99bf0bc0a1f62f2b52861045de9e622a45faad

See more details on using hashes here.

File details

Details for the file fastavro-0.19.4-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for fastavro-0.19.4-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 8a1184e9317e6bb48f8541873440d0cec74d28138b524b7f32b744713dd12447
MD5 befcaaa8a22071393a559d3845b6bc36
BLAKE2b-256 7dfa551a82997ccfc39234f4c8ba872000e6f7e6d1a4e192676f0e108eb45a19

See more details on using hashes here.

File details

Details for the file fastavro-0.19.4-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-0.19.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9ba3b6714b41fea784ce7207001e1479d2d9857e0f2f156c8f7be2fd3104b831
MD5 348aa32a0c5e92584e043cc7a6e78b15
BLAKE2b-256 528bab894e4ac263b47fb56154bab9ea2b0ff0f24c548c7174520f52e1b3aa58

See more details on using hashes here.

File details

Details for the file fastavro-0.19.4-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-0.19.4-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 279f15d867227147450129d1c18fbf5f047f17afe6cc644ead70bbe2be80be61
MD5 d7f14e075b8b456297446e3d6743ed0d
BLAKE2b-256 a3e5d9557cd3da2fb65d4eb78c640cb3c308d8e4d03b66d6acefd2b067f575cd

See more details on using hashes here.

File details

Details for the file fastavro-0.19.4-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for fastavro-0.19.4-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 02b8f95f12c3cd4cbf6b2fd6230c020cea85ed0a3bc558529dc43bbec11b374c
MD5 1a20a9b98bc3800f4dd08e53c290003d
BLAKE2b-256 f97d682a9f281d705b4202de8696c13b3bb2f190d19c23061cd95f7bfdc59b9e

See more details on using hashes here.

File details

Details for the file fastavro-0.19.4-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-0.19.4-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c5c42e0e2776fa5024f550ca91a2b6712115c02a9ebd7547132e6f4a0918175a
MD5 3a1dad3e990a0208279f89a9a2565857
BLAKE2b-256 56b3ee56e30dc97a18df6bb77d5864258c908bc3dcac1ba760c7f4f49b9acee4

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