Skip to main content

Fast read/write of AVRO files

Project description

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

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/fastavro/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/fastavro/fastavro/blob/master/ChangeLog

# Contact

[Project Home](https://github.com/fastavro/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.20.0.tar.gz (462.2 kB view details)

Uploaded Source

Built Distributions

fastavro-0.20.0-cp36-cp36m-win_amd64.whl (289.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.20.0-cp35-cp35m-win_amd64.whl (281.7 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.20.0-cp27-cp27m-win_amd64.whl (286.2 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.20.0.tar.gz
Algorithm Hash digest
SHA256 edb4b530d6b692c4b476b4cb4cdc6abf6a28256776b1a02765a59555f79bfd17
MD5 c8a4fa43343e5146db4a0f4372697ac7
BLAKE2b-256 50658a3f1b5740bccad6430c10e17cdde5b51f66e5115bd7c234e4650ca54c9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.20.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 21ee96d478583f32a1ed123964c5bd70d7750f859dddd4af98ff655229b0836c
MD5 2fa368b62ce07247343246ba4cbb8c0b
BLAKE2b-256 dd419e3d76940facacb707f5d3e8764c9ef4311d463a5b5e939a751c85bf314e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.20.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 512c29ff210b77d1c571630f04f919ec440743ba1c588a7d27431c80c557e6d9
MD5 f0b09a8ae52ba3c073358ca337d642ea
BLAKE2b-256 0212abddc16b82bdfff5e2527443a063343c3f1a146e00c58dacc4026aef3c04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.20.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 e6b592fd11a83df9d8018773142fb8d28c324f32d7cd87d442172cec0d0455ec
MD5 7d862c1aed8d805c9b5fef41cf2ae1a1
BLAKE2b-256 eca4af74d3b5d044c16a3d79b4bc754ff98613c997970f8fc39228464338ebfc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.20.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a80ea399fe6f5fa014a787807ffe5b8700d7498310fef981e1ab96c811afda56
MD5 a0f9a79dd0f99d9e08145b6a2d0063f5
BLAKE2b-256 57a0a40c41c872a4248564e6b2bc519cf276f611eb3488e3c4a67d8b07a65f83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.20.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7fd8ab43dd38d7a7fb39af701674ab6cc03ed3166cb113632fa769817d4c09c7
MD5 3cb35cdc15f52bd6c1f8e905ae7ae8aa
BLAKE2b-256 976f9e77608d9b85e965283da44e575436f876033ccbab837d4c9f21d48c9b82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.20.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 67bd2e4068f5df706531782896df1b03c7b01c7f968615c58ee4ea2f933d0e9d
MD5 920fbfd6479e0647659da30b707213f7
BLAKE2b-256 d3115cf826890bdffe74d6d597fd3428e3cac7d8cbede3cbda0ad5331c5763af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.20.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8f84814bc2e6ac51de53a2c57b9bfeedb16c793a7b494f198b24aababb81b3ca
MD5 447cff08e65b452197b343c5f446b35c
BLAKE2b-256 f7b81660eb58f13305562fe084558549b2d24c5cac8d16ad73c03e8ec4e4fc2e

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