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.5
Python 3.6
Python 3.7
PyPy
PyPy3
## Supported Features
File Writer
File Reader (iterating via records or blocks)
Schemaless Writer
Schemaless Reader
JSON Writer
JSON Reader
Codecs (Snappy, Deflate, Zstandard, Bzip2)
Schema resolution
Aliases
Logical Types
## Missing Features
Anything involving Avro’s RPC features
Parsing schemas into the canonical form
Schema fingerprinting
[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.python.org/pypi [twine]: https://pypi.python.org/pypi/twine
# Changes
See the [ChangeLog]
[ChangeLog]: https://github.com/fastavro/fastavro/blob/master/ChangeLog
# Contact
[Project Home](https://github.com/fastavro/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.22.4.tar.gz
.
File metadata
- Download URL: fastavro-0.22.4.tar.gz
- Upload date:
- Size: 543.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b50653c55d790f9c4de5330db5d036668f1a52cf43fa391a8d4db92e2e92e6a6 |
|
MD5 | f0e32844b4466c78d8dd2276dc80d7a6 |
|
BLAKE2b-256 | 78000d41cf53723960487788e0786d33f2e716122d3becb19ef264ffbc9340c0 |
Provenance
File details
Details for the file fastavro-0.22.4-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 345.1 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56d1bd9c07322bc0f48dfbe09ea85054e2f12e60d64362af2677edcd9f0d3a41 |
|
MD5 | e66e1bc2dc0db3dd122e3e472a76044e |
|
BLAKE2b-256 | 30688bb9725ad1612ce987b483a33bd7905221cd438bc9e3ad50719a460940a0 |
Provenance
File details
Details for the file fastavro-0.22.4-cp37-cp37m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp37-cp37m-win32.whl
- Upload date:
- Size: 298.5 kB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc4e63bc201b19bc2b138e8540800e968e9a033eae87110c6eaa6643282cbb8b |
|
MD5 | 1f2a58511a9e73cb914805bb2bf732b5 |
|
BLAKE2b-256 | dcafdfdc5e86a7a13eedcf49557b5ba51909e80c5c1a50e8310a47fed64ee708 |
Provenance
File details
Details for the file fastavro-0.22.4-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f8e7e769439add934dcbc13ce9d206d49639349966be4ec1d869c7709654b9 |
|
MD5 | 9e16b4f84370773432764ceb98d72fcc |
|
BLAKE2b-256 | fe0cc34fbb5706d1e8538c743d60edf19f31e9b025cb09e76d850da1b7f3cb5c |
Provenance
File details
Details for the file fastavro-0.22.4-cp37-cp37m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp37-cp37m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 420.7 kB
- Tags: CPython 3.7m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb0268a031c0842f665858677e4e329089b6f815f9f07dca5d947c45d2d34b3f |
|
MD5 | c06aa8aafe589085891a7238d0da5696 |
|
BLAKE2b-256 | 4755c2bc0c175c7fc0b65132ffe286d9d82b6b17073f91b651dff4bc781aa8d5 |
Provenance
File details
Details for the file fastavro-0.22.4-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 344.2 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb26427df42211fd820da486c7392f26ba7b165274a144bf6aa9a543c0254783 |
|
MD5 | 4cf03030f99037b71c4d39407784d80c |
|
BLAKE2b-256 | d17fb14b58c115f9956e87875ce48b8877cccf30e8854cf88414d0b958ac5981 |
Provenance
File details
Details for the file fastavro-0.22.4-cp36-cp36m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp36-cp36m-win32.whl
- Upload date:
- Size: 298.1 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3239017e32533c941967b5f73381e9d4c1279b5c6672055e6088ad09335877c |
|
MD5 | 10b559ff4bb9338677a90f7e098e7b14 |
|
BLAKE2b-256 | a31bef6c24cd74d27ed293fef260ccde8cd7c04b0aa8345f8dd02b3511d4e667 |
Provenance
File details
Details for the file fastavro-0.22.4-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c039f2da6223fec5a63028ded913e0d39e3f6ac3a3a7a7085d7d976e753ca155 |
|
MD5 | 3c7ec9035987d0a46a4b0cdbf6b8130e |
|
BLAKE2b-256 | 8f36e295b5a8e43b450d5aac8512038347667aca352fa4251526ba7732fcd943 |
Provenance
File details
Details for the file fastavro-0.22.4-cp36-cp36m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp36-cp36m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 437.4 kB
- Tags: CPython 3.6m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80cbcf3d6014a2458093a23d2436a8f07ac2b5647d28a31281ce0857725d2818 |
|
MD5 | c5fc4efe983be33aa9bdbf5a2829853b |
|
BLAKE2b-256 | a36245e27dc3ed4bca703c1c85c2bba69d1a5ba736816fa4df2322a429d1702e |
Provenance
File details
Details for the file fastavro-0.22.4-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 325.4 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 081fefefc63206eadb7a08aa6f30b2c1539300bfc296ae998942d42324e55a6f |
|
MD5 | 4242815d0756672f701cd9d621515e54 |
|
BLAKE2b-256 | bd5fb433971fdb9e7da8cb55b7d5c14231d2c5fe62ce2f329a6cc96d652502d5 |
Provenance
File details
Details for the file fastavro-0.22.4-cp35-cp35m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp35-cp35m-win32.whl
- Upload date:
- Size: 280.2 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7be96062a224bbca443fa07b59bb38164547fd8aac8dbf05e19c1a326c2171b3 |
|
MD5 | 53a1fab7425ca18c63da2d7872bb0362 |
|
BLAKE2b-256 | fa7235006858568c1e33881d279ec2e94a50dd8fb6852e17554353f399b55ef2 |
Provenance
File details
Details for the file fastavro-0.22.4-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68fdde518b78bc830711eba0ae70d0472dce892f96bc45967c6765acffdfd3ad |
|
MD5 | 4a5385309f740cd2ab541d7b78b0eb3d |
|
BLAKE2b-256 | 25df305c7c036b46131961c7b21facc7032488126a43ca7f260cb73757d96be1 |
Provenance
File details
Details for the file fastavro-0.22.4-cp35-cp35m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp35-cp35m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 402.5 kB
- Tags: CPython 3.5m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ace26d2e41c5679525fd322d68b2ad06309288fee175491cd24b7025d5fa406 |
|
MD5 | 66d217193be421b9a28dd7fbc9ea392d |
|
BLAKE2b-256 | 49faa8bf2d24fe746f8a51c5d6bbb1e70f3fbf32da91f06c0a35b74792a6d964 |
Provenance
File details
Details for the file fastavro-0.22.4-cp27-cp27mu-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp27-cp27mu-manylinux1_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 2.7mu
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d26ef4fd6fb3c3659c223880c38484809e928e5d7eca15889813a3790136b8 |
|
MD5 | 48d151b8b9c0b3f455e3a32fe944d9ce |
|
BLAKE2b-256 | 9e2b04d50fd5edd67c748600d0a7c56885af139ac37d840c033ccd98c4164017 |
Provenance
File details
Details for the file fastavro-0.22.4-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 325.0 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c68d37dd600c2b814f7f8c32f9b001827a39d28c639855091b5f01d8836925a9 |
|
MD5 | 8511d2f64f09b8d721a03f4bbacb585d |
|
BLAKE2b-256 | f78a38428a9f7d9634b94a91fb87d8a4434bae902bc64351376d826f21047322 |
Provenance
File details
Details for the file fastavro-0.22.4-cp27-cp27m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp27-cp27m-win32.whl
- Upload date:
- Size: 281.0 kB
- Tags: CPython 2.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 346fc111e9b4254a40426adf00fbc1651f1d424c29ca1d50c525bd6df74d7008 |
|
MD5 | f2df252e0a34ac0e493620f6df0a1bdb |
|
BLAKE2b-256 | 919ad5eee7e81c55696a643de2dd815eb922761c00dd14ab866e9e5460c6091c |
Provenance
File details
Details for the file fastavro-0.22.4-cp27-cp27m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp27-cp27m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e668ea9d589a720f0c15972a7292c587127725f110f66c8a40a71f754d11f457 |
|
MD5 | 0fbd980ee09b6101be53185508896ef9 |
|
BLAKE2b-256 | 28f96e5963d303eff9bddc2f142606dcce50d14aa1daf218bd5a2e03a68bd8ff |
Provenance
File details
Details for the file fastavro-0.22.4-cp27-cp27m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.4-cp27-cp27m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 401.6 kB
- Tags: CPython 2.7m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c335327c5a84d37e2f2de16cea2b0da0925c356249da8623231e6dd41efedeef |
|
MD5 | 5a8f612999b538b12be0f878270b60c5 |
|
BLAKE2b-256 | 9dce28a02fa8727029f55a5bdd146bf09528de1d43c526a91f890aed46cfa1f2 |