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

  • 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.0.tar.gz (445.6 kB view details)

Uploaded Source

Built Distributions

fastavro-0.18.0-cp36-cp36m-win_amd64.whl (277.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-0.18.0-cp35-cp35m-win_amd64.whl (270.4 kB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m

fastavro-0.18.0-cp27-cp27m-win_amd64.whl (275.8 kB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for fastavro-0.18.0.tar.gz
Algorithm Hash digest
SHA256 5fc261ef01534a2a310953c63e4629a6cb3aec8538cc744a3cfa5a54107db18f
MD5 e91097957eda924da5d6124b09c44f94
BLAKE2b-256 951bfbae76a43afc7eec823a2346cb2b5ae18c2c872a10a44b63ab0d6e862dee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7eff8cc864c11265a97764c4f1b3dd691a8f4a971390492b989cc2df8a092e3e
MD5 39e34062ba76d4c42596565aa348eca6
BLAKE2b-256 54ecca96247c6d4efcd3158ea04635a4dd33621e39dbe460364ae69d2534847c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1f2e255c36938a3e2f1d664882014977d7aae4efcca1a2c7a86215fddc04d9cf
MD5 8db764d4347267d23e1a9961d94c5c26
BLAKE2b-256 6fcf157eb10f8324ceee6351e3802e8b58fd3e28165703d138995f0989ae1220

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 15db5c608caf2cb0fb21f45fb5c453bb67a85dc41c86b18eb8c6ab698f502102
MD5 57805152fcde550d44606a99bf391d70
BLAKE2b-256 af90352ec255bf90c3eb6bf4381da480e50d89068c200bca7bee236d23503e00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 20bde7c8ad6997979c1cb2bdee3203f1a69075ce841a5807892be83be67bc66b
MD5 c21f7112c3cd1042fb54f53f7c438a5b
BLAKE2b-256 3aa979685b3518671e6618a9923a72a3c09c4a52e2875b9544d43846a5ce94f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a28b11dd7fe04af31048914883797e2bba7f5916d753b95a41e84e87f10e2431
MD5 c7494542dceeb4717ab714ac709ae969
BLAKE2b-256 7e75dffcd85894206e37290fb0524a3ad743193dc8a193fbe9abf3b498c56464

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 ccb2a3c4018edc39a122544b07e8d78dd022108f465341b1419810c52090b74a
MD5 d299dcd1760c065d7bbfca2aa7560413
BLAKE2b-256 2816880cf16dafcafa61cc6324364304f6e3c0ca656e80d62ce9d9faac16d75c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastavro-0.18.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 98d99c090ae3f19aaac0b870e5c5e2631b4bc58e798b369ef236bfabd2658060
MD5 ebfa93f51aab41bacded7850513f634f
BLAKE2b-256 8973ba96b3a9bdfc2085a9579ad718f5a9e1ccf7ae0c1dcba2844fe6f6f90980

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