Skip to main content

Fast read/write of AVRO files

Project description

fastavro

Build Status Documentation Status codecov

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 3.6
  • Python 3.7
  • Python 3.8
  • Python 3.9
  • 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, LZ4, XZ)
  • Schema resolution
  • Aliases
  • Logical Types

Missing Features

  • Anything involving Avro's RPC features
  • Parsing schemas into the canonical form
  • Schema fingerprinting

Documentation

Documentation is available at http://fastavro.readthedocs.io/en/latest/

Installing

fastavro is available both on PyPi

pip install fastavro

and on conda-forge 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. .run-tests.sh only covers the Cython tests. In order to test the pure Python implementation, comment out FASTAVRO_USE_CYTHON=1 python setup.py build_ext --inplace and re-run.

NOTE: Some tests might fail when running the tests locally. An example of this is this codec tests. If the supporting codec library is not availabe, the test will fail. These failures can be ignored since the tests will on pull requests and will be run in the correct environments with the correct dependecies set up.

Releasing

We release both to pypi and to conda-forge.

We assume you have twine installed and that you've created your own fork of fastavro-feedstock.

Changes

See the ChangeLog

Contact

Project Home

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

fastavro-1.1.0.tar.gz (656.1 kB view details)

Uploaded Source

Built Distributions

fastavro-1.1.0-cp39-cp39-win_amd64.whl (369.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastavro-1.1.0-cp39-cp39-manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9

fastavro-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl (425.1 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

fastavro-1.1.0-cp38-cp38-win_amd64.whl (368.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

fastavro-1.1.0-cp38-cp38-manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8

fastavro-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl (420.0 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

fastavro-1.1.0-cp37-cp37m-win_amd64.whl (354.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

fastavro-1.1.0-cp37-cp37m-manylinux2014_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.7m

fastavro-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl (412.1 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

fastavro-1.1.0-cp36-cp36m-win_amd64.whl (354.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

fastavro-1.1.0-cp36-cp36m-manylinux2014_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.6m

fastavro-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl (428.2 kB view details)

Uploaded CPython 3.6m macOS 10.14+ x86-64

File details

Details for the file fastavro-1.1.0.tar.gz.

File metadata

  • Download URL: fastavro-1.1.0.tar.gz
  • Upload date:
  • Size: 656.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9465fd4eb65f227a665e3e9485c5610c032c84d5284a08ffcace91c0ca9e5eca
MD5 8cd22b193fd31abd5dd69d4cd2d3a06b
BLAKE2b-256 5ead5a0a542d981d37529316e6b0b57b5a17b7336bd73909b32c3280ea0f0d7b

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 369.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7a67461d924d3b36022d936364c281b1b5735909ce7ee8888838685fb34d37fa
MD5 395857ef59ebd702e18590d23447ab8f
BLAKE2b-256 fdbb8cb061886fcbe20a4be59cf2a5eb07ccc50689c98764411ebbcfc45df317

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff83205907d584f3c6bfab52b62ae6761ffb19cad6a88a1bea4d93b796ddc061
MD5 d20e6beb34d274fee003efc97fd6d50f
BLAKE2b-256 8a3d6cb8241fa2b2817ad37092e4aeabf91ba34ae5858ca15f81716b172bbc7e

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 425.1 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 744b7d974e24f6e027786761d2df9183512893cb7fd255342f6ff3dffb863fd3
MD5 ff6f3722265bf4e9f9a9efa1f9582da3
BLAKE2b-256 a34e47e0737a10e2e88a6cbad1214d27a3eac6da1931b567d8e406274239bf01

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 368.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0a48d15b07ad8b0c914db6e6f3ee50b8b0ee5a465d604cc6d98d8f1794029388
MD5 e63a2f6cee7de6b08873117c99620c7d
BLAKE2b-256 d9a5d9cf02dcf756fc31c1c351d53fb81dd798c741c131ebc79fe44311a7525b

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca8b494db4adfb60247589255d37c07012903e12db3bc7bc2c6be053004e5bf6
MD5 ba22f00e9df207b3f578d39e2b378d10
BLAKE2b-256 945519e303e1124873fa3dd2d048dc7e1eab8c248c2d180b5da6a31b9e82a408

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 420.0 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a977738eb8b73608b611f191d3954f9b9fd0eaf2f87f5b6af185918ba77b9ab9
MD5 ad2106f793b8c7bc95962aaed6b263cf
BLAKE2b-256 8c5def003c8f1059c9a7731531072d039e751866fabc3b689526877173624132

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 354.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4d31ece4e8cf2c15de21ac0a8b644c06eddc348ee8aadcc6ca0550f1e1e0d90f
MD5 6d09c56f79e69e0612f04c08ce533e59
BLAKE2b-256 9bcde17588e83f58c50e02ec1ad682ffa5ac76409ea8d963d7d32b7e952e37cf

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d86cac81fd83eeba4cddd8b6d5ccfe20aa10d33a9852fe2c42f51b50deb8251f
MD5 a052edfba4b14be49d672bae018c3877
BLAKE2b-256 c144fa76c0e7777d73e27b317dfd465ee5a473c8e90a85b494311f1f3c0097d1

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 412.1 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f4d86959f3f64bb3f04bb01a01ff4591c3c7bb20187c6d72f9f7e983705c0e8b
MD5 2bf4b3f21e9591292a059b62ae69d213
BLAKE2b-256 7623ccdcdadaf1e98a2406a2b632e954545a7e21248f27aeacdd77f1fad99711

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 354.0 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 0c68b32591f8cbd80eb5921b06ad2912dc661cd4ec25b479aa7f4ea78e2dd2f9
MD5 a66e78fd445b4a9c56f13f196a74e604
BLAKE2b-256 b6053f663442443239a13a94c6ffe8d63b2e777a7c0bf59c517edf45bfeb1cef

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp36-cp36m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a4f48efbc5ddae307a091a800d418346de3f1782199122f65ca7b55ce76d9695
MD5 6cd0dd21af00d6364510ef7555156002
BLAKE2b-256 af541054887181f600414beba751290fe13dfa44214e91397aa0c867adb7d74b

See more details on using hashes here.

File details

Details for the file fastavro-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: fastavro-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 428.2 kB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for fastavro-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7081cd5aded47903bd5c902c38a9b1025681650502ce6aaad8deca58fd07ec25
MD5 fef1239e84bc579f53c1981d5d23acfe
BLAKE2b-256 d868ff867a2441027522c5f8ecf7b6149602a7bbcebf5059d25001ba1b1cbbad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page