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

Uploaded Source

Built Distributions

fastavro-0.19.9-cp36-cp36m-win_amd64.whl (289.3 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.19.9-cp35-cp35m-win_amd64.whl (281.8 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.19.9-cp27-cp27m-win_amd64.whl (286.3 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.19.9.tar.gz
Algorithm Hash digest
SHA256 993906ada9d31df0e5d7a9bda57b79639a46628ac100a4306f6880fc89675099
MD5 4825862b2b2e8858fc8b76c21d53e1df
BLAKE2b-256 1540c8e00f3687fa5830571eeead4ab476c44b62c14e574b6cc7c442e428fbe7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 464a8fefdc013845f4f11a20697e6f71136c89603e4b83e10e7f61bfd84e44ef
MD5 392ea1ebae69b2a9de0bb4628c52a871
BLAKE2b-256 ecd31d75b9671f24602d71ab9123aca0a47062e6a435964895ddb7737fafc1e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.9-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fc020874c85a313c8f31d06a12439b00cd3f51e4bba1e3ca3190343eca53b5ed
MD5 760ed72ca9a38b487f1467063de578ec
BLAKE2b-256 f7365595181bb66c67e586c919394bd0d9749246b6b2deae6d8b8a1729762ead

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.9-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 bf920658d1d319e875fae25ce25a62d9b6b057b9393085bff577bb648746578e
MD5 ab34d86c3c9be39bcb841fa36bb05057
BLAKE2b-256 71896ac8ef26b7600504bf702ff892b73aa3cf7d66269a6e0dfbb781cd53d240

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.9-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2ccd86447bdeac3f8ae7bb8e5b4171a42dc10a15fe81a09e5e5fd07d0021d31c
MD5 cfc717a43833394aab6ae58e0f224d75
BLAKE2b-256 8995df3d4fa63bda74a4e2460d6e492b288f4f418c2ebe691822f6d9c5539ada

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.9-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 332c435a1499e83d8e312268dc965469366bb13ec4d42400f9a9f1640ab999d2
MD5 7247590d441e86247b79e311c9699df2
BLAKE2b-256 cdf7110b468bf387218f046d3fe061e811a86cd9b8e280d446d8d948305eac5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.9-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 0c8c0bb25d5d6d2d2ee401276c4d6888be0d7b468fc8a56249bdc282b8ebc900
MD5 0df02e72d58e285811ba5e669c90888f
BLAKE2b-256 852673d45d1fa87aa03bae9c12e731570d3326bc5c4c554af2ddfcb39b991f77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.9-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ee7fe226569aa0b1284a24679087ddf24e27840c290cae778f86411092e30f1d
MD5 4beae6e7240c55c092975a4ac6bd51c2
BLAKE2b-256 2899ffbcfc56ddc7ca28a9fec1a9786a0d05e64ab2d30dcbd68371d57dae61d2

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