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

Uploaded Source

Built Distributions

fastavro-0.19.0-cp36-cp36m-win_amd64.whl (279.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.19.0-cp35-cp35m-win_amd64.whl (272.3 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.19.0-cp27-cp27m-win_amd64.whl (277.8 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.19.0.tar.gz
Algorithm Hash digest
SHA256 06767a7b62255607629334cc8572fea9b3a4d834e68e545682b21ced8a58c09f
MD5 5c3f89b4bc9c33f58fbcdda8c6dc4280
BLAKE2b-256 b152980b2077427839056619c7da024262b857acc2cf4329331e881afe9e2603

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 fcc1ca8c73a475b9bd978f1df69dea49b157c7fbb5943bb2c35efb5342b1c178
MD5 44d561f46f489819d9877973fd84f1fe
BLAKE2b-256 fa48c8e56a83368171bd486377e762b529f2d2cda467f7f3fde3acc74a61f2cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8a33867fae32b46f3efc9fe0be174464a8a81c91afc73fe799e55167aaf11e62
MD5 d700258d12320433e2bd551ab5a373d5
BLAKE2b-256 041a39d38d0ab7a8e754b67fb5a0915e1df85f8000a9c14b6d02cf15895770fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 200c79ed88b3463647d74ba4ca2d8b878c312148d4eed14c331d0934e1e4120e
MD5 46e772e45a7a60330c8047c9929be997
BLAKE2b-256 f8df104d8fbb6a6f917d3308d16f2decf2611c8f92b091c8ab6f3a3245a8082e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9f87fa9df99128391db1a2b736004c5f05adc33c2acfe315077c9ec16767596f
MD5 42dca2efc34dd951b37ade704b5d0838
BLAKE2b-256 71991817677ba5f4a01d484b8535c39313def1ad7ab42402bbd1157e2d600186

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 925b67c7214189eacafefd9bbefa78af03862ffa0631893381d029a7d06bc6ad
MD5 9a9b6c8f749cdf615b02ffa21ebffee3
BLAKE2b-256 78a462807311496fd545421a7bf2821f6ec83baf1b586dba4cb45a7a437a6d82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 4a684d7dc936c2c5d6a58f9f16584b723576953d2d718dd3307cc332983ca620
MD5 65c02f1441a74d338c9062021d1177bb
BLAKE2b-256 cecc67b1f56d8c90129cf3285469a68f189b76a6642c2aea77eba7f8cd076f24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a984724bec9bf34e470d4cb37f983c40bdb9d3c908ec8b476da11b3baedf67f8
MD5 1e641c0daabd7e48cd5ec6eb5764dbf8
BLAKE2b-256 44e090229394c092318ae2f5f0903c8204394d6adfb0ff8b912e371e6072a9e3

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