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

# Hacking

As recommended by Cython, the C files output is distributed. This has the advantage that the end user does not need to have Cython installed. However it means that every time you change fastavro you need to run make.

### 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.3.tar.gz (457.6 kB view details)

Uploaded Source

Built Distributions

fastavro-0.19.3-cp36-cp36m-win_amd64.whl (279.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

fastavro-0.19.3-cp36-cp36m-manylinux1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.6m

fastavro-0.19.3-cp35-cp35m-win_amd64.whl (272.2 kB view details)

Uploaded CPython 3.5m Windows x86-64

fastavro-0.19.3-cp35-cp35m-manylinux1_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.5m

fastavro-0.19.3-cp34-cp34m-manylinux1_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.4m

fastavro-0.19.3-cp27-cp27m-win_amd64.whl (279.5 kB view details)

Uploaded CPython 2.7m Windows x86-64

fastavro-0.19.3-cp27-cp27m-manylinux1_x86_64.whl (1.1 MB view details)

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.19.3.tar.gz
Algorithm Hash digest
SHA256 f80d85e678e75e0170a3e5fc8296a5bea256b26d8edee8cd0bb8e7f76a6f66a2
MD5 c14cef0bbd7ef23ef753bf34811c6f76
BLAKE2b-256 a10593c871a0ff708b7187683d0480eb0ae7b60977f8e67770a0d5f73c53311a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f09442ee558b6cb40d4d86bd006461645073291d09e16e95c713e5808777a05e
MD5 01a509d3369dcbd335451a069a97d4fd
BLAKE2b-256 70a74995d62502d9dd447bc818eb20e2d91220e12b4ab20bc0929283e643dca4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 75fb53ed076e80db54489f608121865a5c0351ad9317557864baf9224ef9896e
MD5 edb84b5522e02a84035f27a1124da955
BLAKE2b-256 55f87b2dbf0e8d0ce3fd7706aad206479a71cc92c8fc82d5b1feacb297cea61d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 45a11b37a0048b2d84a41ac1b8da4a1542ff9a4a0b60c0f47ae2f8abe0ee141b
MD5 34e58a2175c89a0f660f2cfbf5ec09f9
BLAKE2b-256 6d550eae47eeea9664370c514252d73130b9b117d0ecdef60f38121914d1d532

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7dfdc0e5bd385b7a034700ac4f9aa878068f4b5ee9fdb8d6a30a01d97dec8428
MD5 916c6689d0705ce4d99772ac66814799
BLAKE2b-256 22fb93a52d7c936f33bdcc3a21fd7b1922c2025ebcb97addfdd3c92441919cf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.3-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f4ff43478c45ca0b3e660fa6edbd2d6e2b86016c07fb5e3ffe1c4810b978abdf
MD5 0834be51b8774fe7a9b512260ff73003
BLAKE2b-256 93cbe08b08615015c7232293c2d0782939f7e7d92d287e839ee1456ccc52210a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.3-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 6d1bafdb42e377de27ae561d1eda950e3e88cbd0bc729643d1d049c3f6cf47a1
MD5 bccd4759d6648a17e894d5ad597a458e
BLAKE2b-256 a6330d48a8b200fd28770a3016a4995cf0cb45b57e56d8fbbb6bec7dc71a8b2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.3-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 497aae2cd10d28ab1632714ad50fabbaf91c350573c4a946038a33c476d547c8
MD5 dafdce71d36de3a3056a68783fbeea97
BLAKE2b-256 3bc4d6d0514de98c375f717b3ec66da5592ecea54064867d1fb1d0ec9a9352b9

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