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

Uploaded Source

Built Distributions

fastavro-0.18.1-cp36-cp36m-win_amd64.whl (278.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.18.1-cp35-cp35m-win_amd64.whl (271.3 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.18.1-cp27-cp27m-win_amd64.whl (276.8 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.18.1.tar.gz
Algorithm Hash digest
SHA256 664a2ddc9c34b3c47fc019c209119b4242bd00566e8e718f6d8584ab29b1b417
MD5 e41a35a39fbbff51ce282a58d45ad212
BLAKE2b-256 1979aadb698f0d3a8ce75cefbdd9b3905706431bf3f0bc052152a73d9a7581b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 beed304112305e2b393ed63a72011169079eb12b9e3a0e4e33df1a5eb6c5cd73
MD5 365f4f4e3212e78f795e1ccdbcd87411
BLAKE2b-256 cd43cb8ad68d5840092b50379ff1c745f6dee3aef6f14951032dde2eeb455ede

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ef8ac446fe12eb97c44994d8c271504f922efb0ce08867b0714f41c3bb9ca95b
MD5 d58e604654a8d1ab4edb4947b32c9c21
BLAKE2b-256 199cb56f3a615aed7c5a24af811fa065b6070eb86e84726d018a63cd09ee8e1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 d0a9f72b1a693bd9650b66b7719f894882afc266bd3596e6c97889624af474b1
MD5 80c7fa94933897aa5ff7e04a1fb4655f
BLAKE2b-256 c6c12bd6b54cc9dce6e43de281883ba1654ec77e2be541a5bc912a34908a9872

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 25e42fb97b3332e71997c1d0b4e335995736b3bcafb7809883ab2670d8bd001f
MD5 76f0d2be9e242ae39e89b9279287c08f
BLAKE2b-256 cb4ffa8a5de5620f6f0db2f88db3f9e60c188870a170f351ff2311a9e9d8e452

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 15bc66876a0d407ca991cc9808dc8ecd690dfb16e013bf9c1ddac95294fbc129
MD5 b2571df3a151ca6bfb6fbe849cb83fa3
BLAKE2b-256 76c2652f6315cdcf0e1d1e3ab0789050813127d3ad31c429b7a5811f6a4b8a6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 e2a7eccaa00b16592da716c699b5acdd5b2a300ef3b3a894d9427f05592eff10
MD5 e0f8d816b24479453cd623ed02bb495c
BLAKE2b-256 d03b02abb5ffc275a09a5984b6d87e52c5e6551952cb2c198e49831f0895962a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8f9a6de651c558540f2855234d8e828ee5ce953286cc27cbdb6aed55dc8a5758
MD5 d0295036ed234c0c1b6c978ec8304eff
BLAKE2b-256 39d4ffd700a83b98ff91656ebcbd57fe0571372fa90003741ba451e36cc50dcd

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