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
  • Parsing schemas into the canonical form
  • Schema fingerprinting

Missing Features

  • Anything involving Avro's RPC features

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.4.0.tar.gz (720.0 kB view details)

Uploaded Source

Built Distributions

fastavro-1.4.0-cp39-cp39-win_amd64.whl (410.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastavro-1.4.0-cp39-cp39-manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.9

fastavro-1.4.0-cp39-cp39-macosx_10_14_x86_64.whl (484.5 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

fastavro-1.4.0-cp38-cp38-win_amd64.whl (409.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

fastavro-1.4.0-cp38-cp38-manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.8

fastavro-1.4.0-cp38-cp38-macosx_10_14_x86_64.whl (478.6 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

fastavro-1.4.0-cp37-cp37m-win_amd64.whl (394.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

fastavro-1.4.0-cp37-cp37m-manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.7m

fastavro-1.4.0-cp37-cp37m-macosx_10_14_x86_64.whl (470.6 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

fastavro-1.4.0-cp36-cp36m-win_amd64.whl (393.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

fastavro-1.4.0-cp36-cp36m-manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.6m

fastavro-1.4.0-cp36-cp36m-manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.6m

fastavro-1.4.0-cp36-cp36m-macosx_10_14_x86_64.whl (467.9 kB view details)

Uploaded CPython 3.6m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: fastavro-1.4.0.tar.gz
  • Upload date:
  • Size: 720.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0.tar.gz
Algorithm Hash digest
SHA256 306b87a55713ab5a9a37a315cbf9ecd74a1c640287c23a7926e960626c522d04
MD5 26d5a70e628e788977853db5d88d5c85
BLAKE2b-256 313f1caf214c5fca9540ea7225d84e72fa8e6ca83cc34af4114faffee5e894d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 410.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8373c125b92b6460dc7b6863282409111a6f37f69efde82debb18cb368521ba6
MD5 8737d48fbba32be0ebbdae4225fa274c
BLAKE2b-256 bdb1e594f250c8a3beba204302182ff41e4cff5644e001b93a595caadf60132c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c9b1a11d17282267e3765cdb63f5155cdd0c37e985186fbcd72157fa6b98840
MD5 d703925308a9eca29ede3ae2b983496e
BLAKE2b-256 67a9088346572b8cc1cd4ddc4944519c165eaac7a0f7783bde2796e6be9aba58

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 484.5 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6dbb58e051e62f0f71a40b6221ac80b47cdad7a8820a6403d36b357823bceb49
MD5 b3ec281ab42d7b129f15b553e187c8c3
BLAKE2b-256 8093000bf32f5d778e69c4ee52e7a0e0b92691594bd9d4498994d5c73dce0e22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 409.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ad9d17c88dbddfc2c1b494c39124ceecc6417904a54ddd1a357270e69d05d1f8
MD5 5fb470d2faf2c9d6e7703c1ae4a5dc68
BLAKE2b-256 3f9d4954f5d0ff5de3551a67021f28e175947bb12951d0dbdeeaddeffab43cb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b69dc3ac12facef67d22c04afba318798ef1abaa512a1dc7407e3403d00a8979
MD5 76d01f87a5ed26dc01029d8455fd0687
BLAKE2b-256 6ebb77ecf83e09bf28ce91d4826f32c8321efe265a4cc0668e8ba599aad689be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 478.6 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a22107c204712679ce685ea3886d9f5ed1e395c8b64c081545b841b22dccf10b
MD5 e2155498fd9e1d79f4d944e1c033cbc7
BLAKE2b-256 c814e46e955aba8312d0ba2d0e1ee7f591184e836b655e78ca5a2f11c09e04a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 394.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e7a8927764c0ba40cbf0ff0b6177875c4e9c2ce8eed1f33aaae432878c2923b2
MD5 0ef6c59a5b2745243405e393c068f60b
BLAKE2b-256 798904c8ffd4eebe71c66175bb02b9458ec2b159adebfbb3dc6c3e56107cf647

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0770a8dafcac9b54f26cc54e2fbc683f3cb93b631d36f38c727aff65ffdb6c44
MD5 5b1011eb9f13eb5c007b04bba3a776ce
BLAKE2b-256 b626cc1acc339eb1b8423c32b0a1dca524214012e577c22ce8fdd58d5213f9b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 470.6 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4dff942b220c7710c02dad189b23c935bf1b85d4a6e1dfef49ee6bd87379ef60
MD5 d87794d8df7b906a41d34086c0356606
BLAKE2b-256 d3d7cce8c9aefd7167ad19b7940273d355c06be05f7264794e340de5847c578f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 393.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 5f825bf6c90acdd47804ec343fb5337846cb87ff84211ed86defe92c43e8bb5e
MD5 a72707709e64e7b26ce90f4d023c7f22
BLAKE2b-256 656d202ea3395b95de00685d5a671e4332f96aece78093fbc7d06a90c05f0cb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp36-cp36m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f7de00e84d61f1aa233ca22b1555c6a98693c3801829b89c52f1532850ea618
MD5 8d6e5629917b1af9c63155e626f9a475
BLAKE2b-256 9d31da1f1ffd87cad9ab4c4b3bb09e3ff7ce190f8eeb58dbaabd1ad9e21cebe6

See more details on using hashes here.

File details

Details for the file fastavro-1.4.0-cp36-cp36m-manylinux2014_aarch64.whl.

File metadata

  • Download URL: fastavro-1.4.0-cp36-cp36m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 51d74395581afce5b3508950c7a0f791eb91838cc4cae9f11b9ebdf04e2894c6
MD5 4f75b2e3f5a15894ae95001cea1c7683
BLAKE2b-256 afbb2467a89a65fa5dd3a3c888e7b51d67f928eea372e2b14ad34bee160295b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.4.0-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 467.9 kB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for fastavro-1.4.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4e240c99d484298b8ce6825ed239e806da6ff3cb2596077102b76a039e57c9fc
MD5 4c86a33f515f9198034e7b893802cc62
BLAKE2b-256 33f8ff7d850f78fa78a7ee46d5435f55c66caa8cb0c426dc2204d280280377eb

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