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

Uploaded Source

Built Distributions

fastavro-1.2.4-cp39-cp39-win_amd64.whl (374.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastavro-1.2.4-cp39-cp39-manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9

fastavro-1.2.4-cp39-cp39-macosx_10_14_x86_64.whl (433.2 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

fastavro-1.2.4-cp38-cp38-win_amd64.whl (374.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

fastavro-1.2.4-cp38-cp38-manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.8

fastavro-1.2.4-cp38-cp38-macosx_10_14_x86_64.whl (428.0 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

fastavro-1.2.4-cp37-cp37m-win_amd64.whl (360.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

fastavro-1.2.4-cp37-cp37m-macosx_10_14_x86_64.whl (420.8 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

fastavro-1.2.4-cp36-cp36m-win_amd64.whl (359.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

fastavro-1.2.4-cp36-cp36m-manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.6m

fastavro-1.2.4-cp36-cp36m-macosx_10_14_x86_64.whl (435.9 kB view details)

Uploaded CPython 3.6m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: fastavro-1.2.4.tar.gz
  • Upload date:
  • Size: 665.2 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.2.4.tar.gz
Algorithm Hash digest
SHA256 25ca75a0fdc1767ca9f4c48a40608f881fd91ff6a241267020c3dadad58b70dc
MD5 49bd831b634806527f4cc34dd4f19f66
BLAKE2b-256 4db502c402a2ec52d29fd011564ee3cc6be1cd8e232aca261fc51da72c6a7cbf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 374.6 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.2.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a9330b9e96e305715ed125d5190eefd1ba622ed75c4148344c0a5029fdf9ad7f
MD5 2c2f5821f23c9431a13f41d3656a0748
BLAKE2b-256 670c92b11f565048bb1a33c2c9c724de30d2701cbb1b921ff88c172f6834442f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.6 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.2.4-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b56ed425ba084285bf8d9aa375f0e469e15f4e8ce260b94ddab61f5f17986255
MD5 d5c9798edf39af75178441a6d70d7b4d
BLAKE2b-256 3783d3272a3248df32299cc6e770410eae270aa932dfca053c53d60dd42f5b73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 433.2 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.2.4-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 27a836094c855645d606e8b8bd03f812e2b2063314e921a5e6e563e2a95408ce
MD5 8e362286bd7027d95eb9112e8d3e510c
BLAKE2b-256 dc207d1ff065a09c1177db1f4087fc04bf4e4eeccceba358ca635baa6bb2f2d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 374.3 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.2.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2b00e9c85871f12e33d9c53e0a765138984b94bfcd7fa3df0ec81bb652aa65cc
MD5 7e6c71e216719f0c3f3121f639803aea
BLAKE2b-256 d68d6af84e43697db615ba96655238b5e941ad37016c1fd91d401d810e14700d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-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.2.4-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dae9acf602cce344ec9474c52664f777ee3ce21dc74bd4f1438426dad17079ac
MD5 8f5d649c317c2a2d0b420caa72ffc0d1
BLAKE2b-256 1dc79e1bc4a6b60d388bb45e84e1c7c2f8c21cb7e46384057b61ef3fe54ae421

See more details on using hashes here.

File details

Details for the file fastavro-1.2.4-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

  • Download URL: fastavro-1.2.4-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.7 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.2.4-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ee92a7192d67c6d2fbcf981ec65fc4f8cbcc3dafaa16fb98ab21e7aadf7a1618
MD5 048d9328d7ddea3e160cffd7fabe832e
BLAKE2b-256 d1388a44c1d926231a65a96c6cc81967964241120b1c694f7f5cf81e656eaf44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 428.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.2.4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d2701ddb89dd24ba210a94afa2405fe257df34b6109a2dfecd87bde5ab24a7f9
MD5 8b1ae03d26936e855e64402a558c9a58
BLAKE2b-256 cb78a6b02acf91b7fa6b20c6d74132fb26abb501ae60efb765fe57b53c9a8d64

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 360.1 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.2.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 df51d5c7d6439014cc7aadef96fad528127ce5570b3ca5d1a47b6261f8820ca6
MD5 d7342444f19ea63cd2aa36d1e4383a24
BLAKE2b-256 38dd3d65d7c2aa0521715348da61394201b7eb2bf5460984b6ac4d71c3c42c26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-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.2.4-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3884dfd099c17dd62fce956f418669e5ad3458ddd4c74ac8d401d9b4867a1bf2
MD5 f3e2007c079fee7285610a4bcb36af9a
BLAKE2b-256 14d398b1b1c895ddb0770a0ac3a95c0ab17fcc601e65ca4c9b208912d4aae958

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 420.8 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.2.4-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7439bb6f96cb49c527610552797e738ffc260dba4a8780a42f44608bb8de2a43
MD5 31da696662f70d4685792e7562ecac67
BLAKE2b-256 3af314a522ade284835aadb71145689162d3fccccf8a361f1c02077723a80689

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 359.4 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.2.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 8b223d7f2ac9fd14c1997cacfc65b7f44cb53e93d4bd622446f72bb66c1605b8
MD5 cafeef73ea73638b53632390a796120f
BLAKE2b-256 6f958a884ff9da44a25e129a0e21e637a006c0f7319fbc14da17e9c4197fc59e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-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.2.4-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2675a23608fddb5d3195a8630d673feabbe7462e6ae18b825dd6ddbe108e5d57
MD5 b40136725b52fbc7cffef96a52003bf6
BLAKE2b-256 09036f57c4f4fe3e1bb02af78f28dae440f71961296c99dbbc9d5972ead53924

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp36-cp36m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.4 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.2.4-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1dc758a138eb40c2dc7c42bf1ff61055897face164ef50ce6409eb8ae80e3c0c
MD5 36a0505fdfd8565e1e1592e73acfefc2
BLAKE2b-256 a6d2f739a30eb6ee365b6096c77da723ea882f6b36865d5c8dd02d9dfe8e0942

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastavro-1.2.4-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 435.9 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.2.4-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 bee6b6f95eba0e66e36db07854455698190656d9761663a26dbeb2dd0f3d7f84
MD5 8e2c75637bc89a2d723fb4edd7dbba7e
BLAKE2b-256 72a61da9fc85e11d0871c120c84cac659629ef61be3713f7a4e3cce4d4732649

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