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

# 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

  • Copy the windows build artifacts for the new version from https://ci.appveyor.com/project/scottbelden/fastavro 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.17.10.tar.gz (443.0 kB view details)

Uploaded Source

Built Distributions

fastavro-0.17.10-cp36-cp36m-win_amd64.whl (278.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.17.10-cp35-cp35m-win_amd64.whl (270.9 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.17.10-cp27-cp27m-win_amd64.whl (276.1 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.17.10.tar.gz
Algorithm Hash digest
SHA256 5f9b0145a00cd5b737fdc173708431c202a0f6c9e6385f43809b124fbfcffb83
MD5 dcfe4860053d80fe7def3e7eff16d529
BLAKE2b-256 9d372a3cef693885236264e3b1c1339ff2afb63853a11dac2d433892ff93c8e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.10-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 1310a71975dc00f15345dfe7cdcef2792e0362359ae94c3acc2b63a723ec8ec8
MD5 7be4d1664e698dc76495e45c5526863f
BLAKE2b-256 939caf4d3114bdc26b4cb26f7f43f5859d253c0593111e1bbcd44323a1ba936a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.10-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5e96785bcea54814c1ffb4efa13e03456a55fffb87b9ccac883523c055a6cdc1
MD5 1c22a6cb70a0fc11e90a3c06d9079ea7
BLAKE2b-256 63ff7a58ef4a1884f125ac30beced41f1497c367d715844913f2e17f8fcef16c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.10-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 927c91bf22eae2129dd857b47d1cdc019ded9134dca1d036385f499c027161e3
MD5 4806ca95a65954d2bbecb5706e5790a5
BLAKE2b-256 f11db9beb8299c8a9c45303c2833a69f965cd0421fc0f27cb2ec76fea9a8810c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.10-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4aec221a3de46f67d4139c97f95041f6ecdd31e80a15ec09f5d44cde703142e8
MD5 cab03c27fc024ff35c945bdbb4ed5be2
BLAKE2b-256 7ab04c25dc4f5ebf9c49fd3969ce011e7e1a1de8fe46b1e332620dcf5bb3f88b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.10-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3bd1af436f4c868fad06956f9ab2bb2b778d2e9b93a3deb8758f54abd7aa79a3
MD5 92c332afbf90f0c2021afcbd2ec98c09
BLAKE2b-256 e961c62ac711d599619ef1d3d1a7e1cf4e52fc1fd924f8309a7f791e24f6848c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.10-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 eb11d8a96ff3f3f6a141f1d77e847bc06626f8e3c260ca10c35b4032cbb56bf8
MD5 06ced49d6e2dabae2e9b7c8b2067f05f
BLAKE2b-256 ef388f0d829393264f628773ee32607ad2549121c115de544526f9b2c653dce2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.10-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4acbfeee3733e4ca87c8a523bf80363713c24f93581ea9dc2d9108effdabc369
MD5 c5fa070636fb9f3f632ca0c47215a584
BLAKE2b-256 62e8e398a6d810b8801c0409f93ae8da96687351d4bc5f4b06e553371c669354

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