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

Uploaded Source

Built Distributions

fastavro-0.17.9-cp36-cp36m-win_amd64.whl (273.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

fastavro-0.17.9-cp35-cp35m-win_amd64.whl (267.1 kB view details)

Uploaded CPython 3.5m Windows x86-64

fastavro-0.17.9-cp27-cp27m-win_amd64.whl (273.7 kB view details)

Uploaded CPython 2.7m Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.17.9.tar.gz
Algorithm Hash digest
SHA256 ce71ec8c892498bc25417dee085040702bed98b32f6eaf53de337eca7a03fd91
MD5 b80834d13f35e237bfbfea5845a39f76
BLAKE2b-256 56b9d901e6201059b87aaf590a6cd94874160506d709d7668197d52f79c67e7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 00bf63c6f3f5b4833de68e2a523f34f0a2fda140f4b3b9a6c5ed34c6c1ba5604
MD5 357361207382ccbd337e319a3b841410
BLAKE2b-256 68f276a30fff2e0fdce43a1d743c127ff8b1247a1f159f964c34ddc3482403f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.9-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 c6b556e488c4d67522b28a453ffb74207a1f7e247f3fb005d53f99093f1d83fb
MD5 d4ffd1c030be3be9117c9f9bbd81f96f
BLAKE2b-256 9c887a63f0c22007af8c79056a64de85aa0859ac422d766e0f48137efe40c05f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.17.9-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 8e8e95240e5029fa775599d36c813b8c09c78aab4b19884d805cb28c9086f94e
MD5 9663f181cd00092a4719651c1a9fa273
BLAKE2b-256 ab6ce9b7d134341c54dfd7713ff1a58584790ac05ffbd153984d71e77986c18a

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