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

Uploaded Source

Built Distributions

fastavro-0.19.2-cp36-cp36m-win_amd64.whl (279.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.19.2-cp35-cp35m-win_amd64.whl (271.9 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.19.2-cp27-cp27m-win_amd64.whl (279.2 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.19.2.tar.gz
Algorithm Hash digest
SHA256 7a9ec7759ffb7b5637aabc373c8a698432588a1cdb5ecc39a3b70419943e003c
MD5 2aa9188b26705d9c4d718cd52f1a3466
BLAKE2b-256 bdb5b183b39fff1dfa930fbc11410a614195e452f569c8851cbf3bc7d52b4d48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d99b7993dd5bcbf101458d98da12c72cc84fca64d7361c6ba3df1c3f2edbfe9e
MD5 638186300dfcc6963490e733453f076a
BLAKE2b-256 58d1c1566618c365e9648b4e08fc7353f84bda0c6caf70ebb81c47af2e0e7e30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 06c2079cc87df5e7790590b3a688da5392170ad948b8e812a75fa84109133713
MD5 d52eb383c343efa5875e7ea1ff82ba77
BLAKE2b-256 0adf12618127ef17053926ace27e9c151868f5d201e4a2656464dffec1439bc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 1064ab7112350ac7b72a3088ace8af5b1185505f7125563bdc41db707d65bf0c
MD5 a203ff6eb8016c8a9b6b0b6305ec35fc
BLAKE2b-256 2ea00824ec88aa09913f0afd2fc1e8dad58b155b7af39989498abb1f9e7e7a10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e946ceda30aaf060826e0a516074ad98bf6cacb2f05966c328080b27742bc142
MD5 4939160fc798ec028b264cbffac2a850
BLAKE2b-256 76e3bfca885b0d2f7417cb4887478ad9022d95739e427a995667d7cc3500fe18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4305c510ccdcdb52e726c5469209cca3172d34b3ca2c85705ad1766338744b8f
MD5 ec1f52c632f8789f3b16c098e6011f4c
BLAKE2b-256 6258cfa572a8ed02e979b3e63207eae69592366ab18e8f2922d9c9a55ee0ffa5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 ada1344f7a63b378d11e38609471e6be633200afc4ec8309c854bde44a2f017b
MD5 852c59014bec7a82760f184a18ddb643
BLAKE2b-256 247ba3501d5f04f0c6f8a306c2a2930a3e2f3c20715a7c6145d2fac912949740

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.19.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5efddd0036048a79dbdadabaf36edca8e1df335ccb129f20d01a1b24fa43c084
MD5 45a1b97a4e41a31437abed94f9e701d5
BLAKE2b-256 fa19fc377108216a10c40624655f90a86585f97172b88c16aa3b8cec81d3b82d

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