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.python.org/pypi [twine]: https://pypi.python.org/pypi/twine
# Changes
See the [ChangeLog]
[ChangeLog]: https://github.com/tebeka/fastavro/blob/master/ChangeLog
# Contact
[Project Home](https://github.com/tebeka/fastavro)
Project details
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
Built Distributions
Hashes for fastavro-0.18.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 733dbbb1ccf889c75d0d56953e18350085f4eae384023e36857358d8ec9d3048 |
|
MD5 | ce7164c9a8c6207909ec2ab28588f74c |
|
BLAKE2b-256 | 6cd21c0c9434cc036db11f20a945b47ba178ae8e4ee80a9337e8ea619334d760 |
Hashes for fastavro-0.18.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1be6e9b87eaefea1a955c0ea0640bdd88e4366da151bde1c81c07465402d8d93 |
|
MD5 | 43af8030a698ac0bf5a1887f1d30806f |
|
BLAKE2b-256 | 52b03c503af29c4f8e337e8a86c98e66b93f55a9ef941a7888acadbab7ae5a02 |
Hashes for fastavro-0.18.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f768520f81ea49ba296373fcd53d5b8da74006ff80e72c1fb65e2c9726944f4 |
|
MD5 | df54a74332287ab0f71bc60f6e7ae89f |
|
BLAKE2b-256 | c24f7f5cd468a776050c70b6055ec5806384596ab84523325d43922a540c1cc7 |
Hashes for fastavro-0.18.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba0f4a9f0d47472aa21cbbc1aee11262b4e3fa0a32ad221a160d4f86b469a303 |
|
MD5 | 816e1f99d216005df76a4d2c9b62a7ec |
|
BLAKE2b-256 | bb9bcc900ed710bd88bb29c2cfd02fa2e235347b3247dc16c1ac35041eb6d83f |
Hashes for fastavro-0.18.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2937730063ca45f23e2a4de3dd159680167fef92f7114827c24e9e02ea22b9e |
|
MD5 | 46acdfa543f6196493ee4ddc39111c88 |
|
BLAKE2b-256 | a2b311b1d06f5dd8a7bc0744ff45af5ffccd89c7e6b07a58c03abd6b8f318a82 |
Hashes for fastavro-0.18.2-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7623fa1cc56ba85e93832dcadbdc0f9a3f73a4456a7d2a0ae326068f493db975 |
|
MD5 | 1080c3a4799fb1a436bcaf3ee3812c0e |
|
BLAKE2b-256 | de10f48b1ab9433617cb8d48a3df7c3888cc5d38d88218318eafbfd55b8bde0c |
Hashes for fastavro-0.18.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c10b47a7bfc63ceb87d21f1612d4677cb9f27afcc66330a80cd4a4c46b7b4cd7 |
|
MD5 | eb2b4641c2278b342b84548679c4ee49 |
|
BLAKE2b-256 | 7faf2af79bd8263d0dc30998523de3321eabbd57a67f657c4f097df26bd8c442 |