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)
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
File details
Details for the file fastavro-0.19.1.tar.gz
.
File metadata
- Download URL: fastavro-0.19.1.tar.gz
- Upload date:
- Size: 457.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cf2a4ab414e3b2606a25c8a898a1482274c9ed5e30fbb1c56a0df351566c08c |
|
MD5 | 6fa2d0002ed3fa058eebca4fabd0f732 |
|
BLAKE2b-256 | efc7f6d56b20abda410b01f29501d67c9f0fed3d1a138a5ba624ade12ad6487d |
File details
Details for the file fastavro-0.19.1-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.19.1-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 279.1 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 895256ceec4ec3f3b40d3b1b806d65aebe80bd3d8b0f848380ecb3caeaf63303 |
|
MD5 | 8fb60f046f1c6ef921e72dd1b42f41b4 |
|
BLAKE2b-256 | 84ad2a4225c43cdb9fb2f8ff72798afc01283e5496ce899d9fe70b160a5c3406 |
File details
Details for the file fastavro-0.19.1-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.19.1-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9a7ffb63660cea8b7c7c8f32eca6e92acc5c2a19355ebc30ca790c2a7161853 |
|
MD5 | 7b6689de8d9ee561506e7b26d3e1f1f1 |
|
BLAKE2b-256 | b53d5c8e322f14a77d1885b50521724c5b96f26dfb847cb28e815bb9c32927ea |
File details
Details for the file fastavro-0.19.1-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.19.1-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 271.9 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f05bdb16c89e7897847805a9c07249b7a7349c4cb6fdf0355b30a72f65cb9aaf |
|
MD5 | e69ea85c355dd0186ce83177f53a48de |
|
BLAKE2b-256 | a1e02c1e6380612839387696a8bceff81f2367232924c60a49b9a9cb5502a327 |
File details
Details for the file fastavro-0.19.1-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.19.1-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 108bb1e020c8031e55ef2ffabd8a5516684c3b1f46df6f27e00dbf12452384c4 |
|
MD5 | ad4714e0bb191c36ba386acd182ba463 |
|
BLAKE2b-256 | fa2683ca172c4ba172453c03fd3545e848e8baa861404fe575c2cb777e5e47de |
File details
Details for the file fastavro-0.19.1-cp34-cp34m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.19.1-cp34-cp34m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f13b55efa49bccdaf0724bf13c9481c6c142bc54c3c56ee3f6df8dbcd865bbd5 |
|
MD5 | 0b1861595ec4d25e917af8ac3a97a0c4 |
|
BLAKE2b-256 | 51293318cf731f798edf96275e41b524c478d3acb7f674064f308511e525bf2e |
File details
Details for the file fastavro-0.19.1-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.19.1-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 279.3 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47e7d097cd2b3c754764907e0b9cc27d126ccb72257cb15770f54eec586d9e0b |
|
MD5 | 0950974f519abf9aabb545aa4f2ade18 |
|
BLAKE2b-256 | be2af34bedff8a8b0bbb0ea8bf72d60ada78caf1a2cc849a486676d9d2ea7268 |
File details
Details for the file fastavro-0.19.1-cp27-cp27m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.19.1-cp27-cp27m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36435191fa1d773e4d409a7979911ac9cdef9c3a80b3e925cb654e9255d4a9ed |
|
MD5 | d0805292f5af6ead79a90acddf40f769 |
|
BLAKE2b-256 | ca5330403fca78d0ef8ac318be1f139734b24b74ce187cb5c6c945c5082f9878 |