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
Snappy and Deflate codecs
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-hypernode.com/pypi [twine]: https://pypi-hypernode.com/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.1.tar.gz
.
File metadata
- Download URL: fastavro-0.22.1.tar.gz
- Upload date:
- Size: 502.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40a898809e539e40173ec7bbdaa93cb3ec80dff01aa21978c26863f47524fe9e |
|
MD5 | f732af681cf7eccdf839a61850ef1b6a |
|
BLAKE2b-256 | 4fa22082b6e227fd15a19552006f74800ed530e9b945ed773583fd44c328dd62 |
File details
Details for the file fastavro-0.22.1-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 317.5 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6744fc1bb4356d97321a5f78522de16ae25e0ac52247b9d3f78c2e8ed99a3af2 |
|
MD5 | cb8389081aa947df2ea62405d6e57257 |
|
BLAKE2b-256 | b481c93de6c41154abced72e8090c7261fbbbda7328a58769fc65525ccefa2a2 |
File details
Details for the file fastavro-0.22.1-cp37-cp37m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp37-cp37m-win32.whl
- Upload date:
- Size: 273.8 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5020cbb810d8231ae64e80dbc3dbb33fbf0d80ee3d60cc7e4e52b5b2f05b0cc |
|
MD5 | 54543f7fcd35125680dc5324b2e39494 |
|
BLAKE2b-256 | 8de8828ae741f02e28b9852aff5ff1d238f6797e1700c0aa6672fe85d10d5891 |
File details
Details for the file fastavro-0.22.1-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2015742a47f37c8441bd35ff63cc528fdce0437b30b5f749ac8790b2dabe3c8a |
|
MD5 | 4d31c1748664d0a84ce199009ee6f43e |
|
BLAKE2b-256 | 8dd247d273ef6c7a89e682367a2eec4f007378bf9485f679235fe9cc3e782ab0 |
File details
Details for the file fastavro-0.22.1-cp37-cp37m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp37-cp37m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 387.9 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cde724a14fc424c3de7bde81b8609037f262b601fd9ce3ca5ad2fc445c164725 |
|
MD5 | 60f4df8f5eb23b4e874100893dc6377a |
|
BLAKE2b-256 | a0eb5acd3ec285e5c1c31e3fb76b8f20ed133487ff227af24864581b70dafdee |
File details
Details for the file fastavro-0.22.1-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 316.6 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a79683bce107b84b040aaed7c3854a08c62c344070eb62e6f9822778cbd1fba0 |
|
MD5 | f2bc5e9e7233ed3c14bb498fd209d0d9 |
|
BLAKE2b-256 | 55b1d9d67114424940f77428541b52f0aeb8a4feac7e5f586380fbe68cbbe6f5 |
File details
Details for the file fastavro-0.22.1-cp36-cp36m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp36-cp36m-win32.whl
- Upload date:
- Size: 273.4 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7f53163b4e65517d858ab15ec10790f8044f367859586cea1a331b4f47f999c |
|
MD5 | ae081d9026e43725ac3893404e4ac34e |
|
BLAKE2b-256 | fafce120b349d820de369545a1b1af4b2e112d9fca8675c85db5ab0f05663015 |
File details
Details for the file fastavro-0.22.1-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75235708b6efb5490ebe6fc7d6cabf474aefa21d7d1e7088ff53f23f046c8bd8 |
|
MD5 | fc3b5c7feb515b2f1f18b44608ca8aae |
|
BLAKE2b-256 | 049a6cc916a087e35d6cb49bb8de415ef7b6d5079c8ab5760c805d0841bb3368 |
File details
Details for the file fastavro-0.22.1-cp36-cp36m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp36-cp36m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 403.3 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47382b6056af43cc51a45130a55bc9a69e068041cf983cbd7ad195db4dd624c1 |
|
MD5 | 0e07cefaeaafe4d7da6bd51c911ed079 |
|
BLAKE2b-256 | 3e2f37600415480ad947a2967e4d926b11a127d26bd1f6dd770acde6a3b1c65b |
File details
Details for the file fastavro-0.22.1-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 299.9 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf29cd258ebc538209ac128fc0cf22d1ddc7341cef0687418ee02d7addb80285 |
|
MD5 | 8c18825220c63a5aca13993e3df9d476 |
|
BLAKE2b-256 | d735664f56d61d50f16f26586c64aa3dbf07a25fe061f224215889b269fbdf32 |
File details
Details for the file fastavro-0.22.1-cp35-cp35m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp35-cp35m-win32.whl
- Upload date:
- Size: 257.6 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab13d178d8c2d857a722a6ccd4a69d6115c7247e78d085fde835a4b3b4c5ceff |
|
MD5 | 7221c436d5364f5eec17a304d8db6a35 |
|
BLAKE2b-256 | 2cffad5ad6e92e6c54126e824a046d4a1c8dbaff5dc2e0dfe30c765f3c1655af |
File details
Details for the file fastavro-0.22.1-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71861adf667d86f1270930cb66055b58ca45b585277c8975c63a5b3bb9f7952e |
|
MD5 | 7790878b66d48f6f88d820444be31dd3 |
|
BLAKE2b-256 | 6e305b085e58ce716edd4f7ded06bcb154dc1371ad8b974895d994ddd158c365 |
File details
Details for the file fastavro-0.22.1-cp35-cp35m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp35-cp35m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 370.3 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5814f81b8b51afbc30cede4491d2e2b466c02f3e122d4bc2d6b2117e6a06c5da |
|
MD5 | 69d894d40285c803a2fb11d016ea43ec |
|
BLAKE2b-256 | 442dcb7461ccbcb9587e1cf97a1cac0c390cf1f9747dee691fa6ee4d76107e19 |
File details
Details for the file fastavro-0.22.1-cp27-cp27mu-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp27-cp27mu-manylinux1_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 2.7mu
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a024b4d76c701a9a06a72a176dc85a9b2b7a428181ac23e682bb02cb4dd5c9d2 |
|
MD5 | df58c2ea095d15785f81fa0e770cea6b |
|
BLAKE2b-256 | 1921cc3c7c8b308456c399f2e7d7dd73a21551061f325e035444b027d14b7203 |
File details
Details for the file fastavro-0.22.1-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 302.1 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 093bd89d02e0b0c78bfab68ceb3b743a3c6551c714f37ec0b00efdb2f037bb93 |
|
MD5 | 4415f85129f23c579966b12ac79de239 |
|
BLAKE2b-256 | 7a6211d43031572592852eb7b61fd7951d3ef69f15f6253bb4e00679ac8c9a86 |
File details
Details for the file fastavro-0.22.1-cp27-cp27m-win32.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp27-cp27m-win32.whl
- Upload date:
- Size: 261.1 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8d5128dcaad382753883d76b6cd1283c2444e3ea46baf872befb38dc91a5173 |
|
MD5 | bb4334cec7791513bf48a618fb1bb43a |
|
BLAKE2b-256 | 87c85703dd251e91376a5512cb039ac497f6b7d0f1c93cc7cdef1ee4c758bf5f |
File details
Details for the file fastavro-0.22.1-cp27-cp27m-manylinux1_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp27-cp27m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e836b6b8a2bda749b7df3b5d30770a8052aa4f6d92b9c5c18e4a578fe5f3cbb |
|
MD5 | eb11a5780ba39504a7e4fe6c42a2ae01 |
|
BLAKE2b-256 | 7e4e0cc36bbd1108625f5bfaed02a5d7225644fe8e4d30769135fd6bcc33379b |
File details
Details for the file fastavro-0.22.1-cp27-cp27m-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastavro-0.22.1-cp27-cp27m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 376.7 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.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8021b883f6c4b82db360205715ade429f54b3ea884f69d40fb0c5b6c1d667dd7 |
|
MD5 | 1e2fc800f8c4d11e7cd515bd78ef9c1c |
|
BLAKE2b-256 | 481440b06766f3bc0da6e211f3ebe00355b115295e4c2109e05e99e36697797c |