Skip to main content

# 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.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)

Release files for fastavro 0.22.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastavro 0.22.2
File Size Uploaded Provenance Actions
fastavro-0.22.2.tar.gz 530.9 kB Without provenance Details for fastavro-0.22.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fastavro 0.22.2
File Actions
fastavro-0.22.2-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for fastavro-0.22.2-cp37-cp37m-win_amd64.whl
fastavro-0.22.2-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details for fastavro-0.22.2-cp37-cp37m-win32.whl
fastavro-0.22.2-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details for fastavro-0.22.2-cp37-cp37m-manylinux1_x86_64.whl
fastavro-0.22.2-cp37-cp37m-macosx_10_13_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.13+ x86-64 Details for fastavro-0.22.2-cp37-cp37m-macosx_10_13_x86_64.whl
fastavro-0.22.2-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for fastavro-0.22.2-cp36-cp36m-win_amd64.whl
fastavro-0.22.2-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details for fastavro-0.22.2-cp36-cp36m-win32.whl
fastavro-0.22.2-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details for fastavro-0.22.2-cp36-cp36m-manylinux1_x86_64.whl
fastavro-0.22.2-cp36-cp36m-macosx_10_13_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.13+ x86-64 Details for fastavro-0.22.2-cp36-cp36m-macosx_10_13_x86_64.whl
fastavro-0.22.2-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details for fastavro-0.22.2-cp35-cp35m-win_amd64.whl
fastavro-0.22.2-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details for fastavro-0.22.2-cp35-cp35m-win32.whl
fastavro-0.22.2-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details for fastavro-0.22.2-cp35-cp35m-manylinux1_x86_64.whl
fastavro-0.22.2-cp35-cp35m-macosx_10_13_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.13+ x86-64 Details for fastavro-0.22.2-cp35-cp35m-macosx_10_13_x86_64.whl
fastavro-0.22.2-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details for fastavro-0.22.2-cp27-cp27mu-manylinux1_x86_64.whl
fastavro-0.22.2-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details for fastavro-0.22.2-cp27-cp27m-win_amd64.whl
fastavro-0.22.2-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details for fastavro-0.22.2-cp27-cp27m-win32.whl
fastavro-0.22.2-cp27-cp27m-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 Details for fastavro-0.22.2-cp27-cp27m-manylinux1_x86_64.whl
fastavro-0.22.2-cp27-cp27m-macosx_10_13_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.13+ x86-64 Details for fastavro-0.22.2-cp27-cp27m-macosx_10_13_x86_64.whl

Total release size: 10.6 MB

Release files / fastavro-0.22.2.tar.gz

Download URL fastavro-0.22.2.tar.gz
Size 530.9 kB
Tags Source
SHA-256 checksum
How to use checksums
db387ce862b9dc71ecd8760e05ac0ee30b55b557cc2e2f2b33df0f3cf6f12a05
BLAKE2b-256 checksum
How to use checksums
7ab380640d7187e1f55365b3195db7464f46374c2f6678c77c1045d3f94b674f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp37-cp37m-win_amd64.whl

Download URL fastavro-0.22.2-cp37-cp37m-win_amd64.whl
Size 335.2 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
eaa08fc8d416314bab328e9fe26df562b28ced24346109dbbae4a81151269d0f
BLAKE2b-256 checksum
How to use checksums
25dd1924d6140f320c6b178b577e31572d11edc8452ec878919e70e33382e30f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp37-cp37m-win32.whl

Download URL fastavro-0.22.2-cp37-cp37m-win32.whl
Size 289.5 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
61bc6d2c575b76e69b3ed16ee67827d67d166baeea255151cace550801bc5040
BLAKE2b-256 checksum
How to use checksums
1cef7ed6dec46049ce9d84aec6ea22935dd6d963e2d793321f99629ba242497a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp37-cp37m-manylinux1_x86_64.whl

Download URL fastavro-0.22.2-cp37-cp37m-manylinux1_x86_64.whl
Size 1.3 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
59b4a838c4f7b2646bf4d79fe3a0c4d546acf7e0bb65eda57eaa5ac76dc8dea9
BLAKE2b-256 checksum
How to use checksums
b8784c7e134fe18e214ebc570183c59adc5e30ebd9bc85fb17beba51de17ed7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp37-cp37m-macosx_10_13_x86_64.whl

Download URL fastavro-0.22.2-cp37-cp37m-macosx_10_13_x86_64.whl
Size 402.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
6c39c04e8ea5a85c512335a68bf08f922901817d49c113dd74de3dfebe38701f
BLAKE2b-256 checksum
How to use checksums
1f3f5d32032992190e86ff3e54ecf2797acdd23d179b55d8742c820589f83baa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp36-cp36m-win_amd64.whl

Download URL fastavro-0.22.2-cp36-cp36m-win_amd64.whl
Size 334.3 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
0930500497586037f1ca4bcb0e929d388d8cd86d1f5c43a72ac46bfa1003c785
BLAKE2b-256 checksum
How to use checksums
0bb7501f4e910d26496f634b9440a7bff453a057e511792d9640137bd95d878a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp36-cp36m-win32.whl

Download URL fastavro-0.22.2-cp36-cp36m-win32.whl
Size 289.0 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
e9648a7dfe9358e550d093d546ae330d2a9e3246cbe5d7425a4ca17521ee7a72
BLAKE2b-256 checksum
How to use checksums
767c7b7ba0ea111adc078b277be4f787083ede957318ba592d8c090ffac85c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp36-cp36m-manylinux1_x86_64.whl

Download URL fastavro-0.22.2-cp36-cp36m-manylinux1_x86_64.whl
Size 1.3 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
783f8600af4fc94c799e67f9deb0aedc7432e440937921b7f743dfc0753864bd
BLAKE2b-256 checksum
How to use checksums
88bf9a033f8b42b6521f6b258f030f5ccfc2a6939c769effdf273fdc0a93cf11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp36-cp36m-macosx_10_13_x86_64.whl

Download URL fastavro-0.22.2-cp36-cp36m-macosx_10_13_x86_64.whl
Size 417.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
688e6fd5458ba673c1e1fff8ed25a27996e7ef5bcd73a50c6127d8c511703624
BLAKE2b-256 checksum
How to use checksums
5ba4c99e901960afca87357e7232690feb328ac490b930dfe83e7f76d5fe3deb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp35-cp35m-win_amd64.whl

Download URL fastavro-0.22.2-cp35-cp35m-win_amd64.whl
Size 316.5 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
3dd785459a7cd3c17012374c8929c73f385274dbbeed784ceda7879a4681c70f
BLAKE2b-256 checksum
How to use checksums
16b47513501402bf3d9859159d25282c95efd7b53bc7f98db73e1f9326b702fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp35-cp35m-win32.whl

Download URL fastavro-0.22.2-cp35-cp35m-win32.whl
Size 272.8 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
0cf083c14b2a3c72704660e89480571ed2d4956cc5b79845905956d38d6eb7b6
BLAKE2b-256 checksum
How to use checksums
2d6e9e635c54aba95c3d44d8bae3f90e207032bfd6a9079d77b407af4cd3c982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp35-cp35m-manylinux1_x86_64.whl

Download URL fastavro-0.22.2-cp35-cp35m-manylinux1_x86_64.whl
Size 1.2 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
52fd6153c7fbce93cef4e1c169543357582815a7665c142ebd97f29b7fabfc79
BLAKE2b-256 checksum
How to use checksums
a2dadd10c31779c7853a538b23a8d5fbb757207e8ee4b3b84b7e1c1d5d7f87d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp35-cp35m-macosx_10_13_x86_64.whl

Download URL fastavro-0.22.2-cp35-cp35m-macosx_10_13_x86_64.whl
Size 384.5 kB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
fb492b325c9a373d62e3ea41b9b868ea276d0964e98adfa26c181f748a962bf3
BLAKE2b-256 checksum
How to use checksums
21252e39d23c4641c31afc0a38b10edbe4f94db17e6536769607f747fcfaa77b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp27-cp27mu-manylinux1_x86_64.whl

Download URL fastavro-0.22.2-cp27-cp27mu-manylinux1_x86_64.whl
Size 1.1 MB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
76558659cce8d73f5fbd6084e362c25fcceae4e195e722b30d185f26416b0486
BLAKE2b-256 checksum
How to use checksums
8681dbb392989a7dc7faee8248198bf68c6d2d839edc761ec438eec7c1277b75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp27-cp27m-win_amd64.whl

Download URL fastavro-0.22.2-cp27-cp27m-win_amd64.whl
Size 316.8 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
a94ca58353b972bc906713e02e8c5a173250070b5cfbf0271e347a8c810e32cf
BLAKE2b-256 checksum
How to use checksums
9e51ad5f9b586381873cb8643b13f1b3e6a017f93f2112499b0fc494098adb00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp27-cp27m-win32.whl

Download URL fastavro-0.22.2-cp27-cp27m-win32.whl
Size 274.1 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
ca0eb9ff026490eb5c4ae83f48326932d6c206c4d9325e469ab79e4ad1956ac7
BLAKE2b-256 checksum
How to use checksums
3d99d885c1256214a95b78000ed447a7a8c1c272dff50febdb8888f5435071a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp27-cp27m-manylinux1_x86_64.whl

Download URL fastavro-0.22.2-cp27-cp27m-manylinux1_x86_64.whl
Size 1.1 MB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
49e671bcacc81b7b49f2c9f6f3db4b6201d5cf5809c321b33da3d2890c0f8481
BLAKE2b-256 checksum
How to use checksums
e1455d0cc9d21c4a2ccaa3ca55a81e9b35eb0d6a0d1b61d39692591f0e2a8d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fastavro-0.22.2-cp27-cp27m-macosx_10_13_x86_64.whl

Download URL fastavro-0.22.2-cp27-cp27m-macosx_10_13_x86_64.whl
Size 385.1 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
aaeac57f4c4249d7d7b4e3ca1a43444e61a5aa382c83fb7580059e90e502485f
BLAKE2b-256 checksum
How to use checksums
f20cbb5914667fae7abc133b5d51d95f01e1fe2d9884c5d0eb8af02c229efd78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Security for fastavro 0.22.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.22.2 This release

18 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page