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

  • Python 3.7

  • 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.21.0.tar.gz (448.4 kB view details)

Uploaded Source

Built Distributions

fastavro-0.21.0-cp37-cp37m-manylinux1_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.7m

fastavro-0.21.0-cp36-cp36m-win_amd64.whl (280.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

fastavro-0.21.0-cp36-cp36m-manylinux1_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.6m

fastavro-0.21.0-cp35-cp35m-win_amd64.whl (273.6 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.21.0-cp27-cp27m-win_amd64.whl (275.5 kB view details)

Uploaded CPython 2.7m Windows x86-64

fastavro-0.21.0-cp27-cp27m-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.21.0.tar.gz
Algorithm Hash digest
SHA256 2144144b78d5b62504eb8e70a2203d942889693eb675ef51f277ab6854b6f243
MD5 89fd8a64f959aef754f52b8b024b0d5c
BLAKE2b-256 e78856e5ac9aeb0b665226d0036852cfb502303ded1729f0552d91ceb914c11f

See more details on using hashes here.

File details

Details for the file fastavro-0.21.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for fastavro-0.21.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ee0e51692b3f2953638c9c9d23a11725fe6c4ec81eed9854b33b8278ae220d49
MD5 d34412f85872cdd77f37ad397761ae19
BLAKE2b-256 69a0daa54b298b11ca8a05e56439cf0a7332cbdb91a4d7912d02541174c3cb45

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.21.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 83e54be8af3b7b557722e69731d6de0f4237deca0545bbce680e2f24acdcd6d7
MD5 196c966741c1fc14281a1f2d39142a56
BLAKE2b-256 681d4d3a426453f244577e87b87c9b703dbf588826b9e5c1ebb6c0a4764a00a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.21.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 778324813d29a1df041aa5010d3cf9bbe2c57caf7c4a40864c6e7c3ba81f63ed
MD5 7b666ecf0b33f273f9c48845ce0aff5b
BLAKE2b-256 b36d87c0cb36d7479df71061adad6fd84f716e420c4439487b8f50c8f36e8281

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.21.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 e63d90a46075e635e25cf79df3c9f9056dfce4f7da28c2ac5777aae8d08f664d
MD5 c767f2f3c04582722bab096a4741bd46
BLAKE2b-256 df3db1af5a1f754f4f89d7fe865c36f1a14349a86eb53836664611a536711b81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.21.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 56fe7068c9bf20e7890483f4469a7bd2bc4ebce96352a2d46f1762fe5fdb4483
MD5 2b1d7b90224bdcc66e6821c998bea394
BLAKE2b-256 3f3d3b1093e5cf1fe70e81d124f9aa68c1ee331057bb713f9575453bbeba6cd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.21.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 58a9e97f2c4f18c6dad27530532e7783ba6287d7d6ffd846026f02c73cd490d8
MD5 0feb3ca8a1c8436347ef2d38e2ccd1f5
BLAKE2b-256 d69190b46741a869257db15971cba6b524de0612b356c9674413b0f748043c60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.21.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 43ef058f26ec9ac8e55c2af34e63a104f84a19d11d7d24c9ef98b17cb83d4352
MD5 5ea6b2cdb0e4b48661cee8988717c180
BLAKE2b-256 1bd728e4ddcb9afeb8046110890527f5d4f8c247a1a609be49d007c5e834e78d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.21.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c8abbc2d2017b8147e77aa84a83e1321eb84ae2eba1dc4cf5edd24bbc8478b21
MD5 2ca77dddda2a8db8436643e6638a43ad
BLAKE2b-256 6a7eed1d8892721ef30521589080a7c73887c34545d01c166e5201cab4470bb7

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