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/tebeka/fastavro/branch/master/graph/badge.svg)](https://codecov.io/gh/tebeka/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.19.8.tar.gz (500.9 kB view details)

Uploaded Source

Built Distributions

fastavro-0.19.8-cp36-cp36m-win_amd64.whl (304.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.19.8-cp35-cp35m-win_amd64.whl (296.5 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.19.8-cp27-cp27m-win_amd64.whl (300.7 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.19.8.tar.gz
Algorithm Hash digest
SHA256 6c15f805910aba51066059d6a48d694c4c7f026c882ef09abfd9cf8159680db1
MD5 b26306fc14036adb766c9b20b8489d7f
BLAKE2b-256 3ace26e410a6657536a1d27e99167718cd14167063fb7918d16425306934bcb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.8-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2e3c88c09b3688e9542d63315c5719c07c7ca460b4525d4d3344e866d719d7c5
MD5 b926a5715fa2cfcaa73898648ac66a42
BLAKE2b-256 9ab29af5b520e535cd31dfbfb15b464bcb064e7ed1c8cfbe647ddc4c2dc2c16b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.8-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 27c5890839b2f8a0d9b7e4a57a8d6748d4196d7e1adb6f1ed10da8a173d18665
MD5 b6caab11a94a50bf1701d35dd731bd84
BLAKE2b-256 eb2f48c0da48e0dbc363903c2139bab6f6faed289d4f85d6b27f69056b0532eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.8-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 0ff57ac87ee2f087a0a174cfe1d5e6eeddc609449b810665ebc08b72cfe1604a
MD5 75c410f426331e7d6310cf2be39ae8ae
BLAKE2b-256 a3248fc4bf04da37d9164ee4aeb460b04034d10b074ee4e605e787fd98235a6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.8-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 eb160e81a36cd13975c7fd72280ef8dab2410b8ac0bedb678eaf6ff36b01e9c6
MD5 37cc1d929fe052fcc3cbabfe7b03c5b3
BLAKE2b-256 9b0d37a4fe949f61c4ac39d2196679903b0fb3731e28f457bdc3004186193a41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.8-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 11d484ad6888ca46e347cb7cdd004377105205981e6160d9114217f84fb4439b
MD5 6f5f399c81d742e02c01adc7cc73771d
BLAKE2b-256 2955d6ad307c4becf062a64ec972c84cefc81e49b3bcbd97275e6af3ece029e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.8-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 9d3d88fb19d6d6141334dbbe475d7697e0890fb38dc97eaa39e8bbccad9a42b8
MD5 cfdf97e3c8abd7112dd33b185bb2868a
BLAKE2b-256 1497704187e5322e54417ca48eae88bb1afeadf87c45e894655bf490d92b8f2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.8-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c24b270ddcaaabc8522a6ae17702488672cfd69d58abd6c1603968f7a4d30388
MD5 d5836bf73110a79892c1b4c158c8fb68
BLAKE2b-256 5a5ab77154cc7e8d18740099c84cea77ab02794dc47c5ffba0afb5e046c919d8

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