An Avro file reader/writer for Python.
Usage
>>> import pyavroc
>>> with open('myfile.avro') as fp:
>>> reader = pyavroc.AvroFileReader(fp, types=True)
>>> for record in reader:
>>> print record
Comparison with original Avro Python API
pyavroc is a Python API on top of upstream Avro-C. This means it reads about 40 times faster than Avro’s Python implementation. (The exact timings depend on the version of Python used).
Name |
Description |
Relative speed (bigger is better) |
|---|---|---|
Avro’s implementation (pure Python) |
1 |
|
python-avro improved, using Cython |
10 |
|
Python/C API on upstream Avro-C |
40 |
Building the module
You will need to build Avro-C with a number of patches applied. This is available at https://github.com/Byhiras/avro.git, branch “patches”.
Then you can build pyavroc, linking against the Avro-C shared library.
The pyavroc repository contains the script clone_avro_and_build.sh which automates this process:
./clone_avro_and_build.sh
Writing records
pyavroc supports writing, both for records created as dictionaries, and for records created as Python objects.
More examples
More examples are available in the tests directory.
License
Copyright 2015 Byhiras (Europe) Limited
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Metadata
Release files for pyavroc 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyavroc-0.7.2.tar.gz | 17.7 kB | Without provenance | Details for pyavroc-0.7.2.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| pyavroc-0.7.2-py3.5-linux-x86_64.egg | Legacy Egg format | - | - | Details for pyavroc-0.7.2-py3.5-linux-x86_64.egg |
| pyavroc-0.7.2-py3.4-linux-x86_64.egg | Legacy Egg format | - | - | Details for pyavroc-0.7.2-py3.4-linux-x86_64.egg |
| pyavroc-0.7.2-py2.7-linux-x86_64.egg | Legacy Egg format | - | - | Details for pyavroc-0.7.2-py2.7-linux-x86_64.egg |
| pyavroc-0.7.2-py2.6-linux-x86_64.egg | Legacy Egg format | - | - | Details for pyavroc-0.7.2-py2.6-linux-x86_64.egg |
Total release size: 648.6 kB
Release files / pyavroc-0.7.2.tar.gz
| Download URL | pyavroc-0.7.2.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5778a688e50d7abf2d8f7c84e7812cb86c204fcb798558ea893ff6f518828f50
|
|
BLAKE2b-256 checksum How to use checksums |
7bfbfb3ed151173c10ffe4b4fb83dae6879dbf6f029c864c8f98da0ef788a7a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyavroc-0.7.2-py3.5-linux-x86_64.egg
| Download URL | pyavroc-0.7.2-py3.5-linux-x86_64.egg |
|---|---|
| Size | 158.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
a9c0975f034ed979eaf9f7fea674703ebb0cf1e6a5df0a4ebd50dbd484904a8f
|
|
BLAKE2b-256 checksum How to use checksums |
41d2d718e15af9dfb2d6a7402e3a32ec48d052970f8b1acbde6f2d4160b6b8c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyavroc-0.7.2-py3.4-linux-x86_64.egg
| Download URL | pyavroc-0.7.2-py3.4-linux-x86_64.egg |
|---|---|
| Size | 157.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
731a9dae594e59085d719da69fd42f6c6196fb8c94d753d098085ed83aa9ea05
|
|
BLAKE2b-256 checksum How to use checksums |
24f03f8e73c755fd021d35f72a3ad48e0beb721855fee741b1844e7e3ea193e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyavroc-0.7.2-py2.7-linux-x86_64.egg
| Download URL | pyavroc-0.7.2-py2.7-linux-x86_64.egg |
|---|---|
| Size | 157.4 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
94ac3a23a829b073dd20d6ca54b8224f89d92647a0df82a6f490b53025c8f00c
|
|
BLAKE2b-256 checksum How to use checksums |
179b99e7158de72cf084bdcd1b284b36bb16e2dcf0e1afbb33972d1fd53a1909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyavroc-0.7.2-py2.6-linux-x86_64.egg
| Download URL | pyavroc-0.7.2-py2.6-linux-x86_64.egg |
|---|---|
| Size | 157.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
cb5a64452b8e22c3a88d764b37c729458dd43637086bf62c77775e87a78a813e
|
|
BLAKE2b-256 checksum How to use checksums |
8123ab797009455d89d06429cc96ccac1b5dc4b39c521eccea51f852a434b65d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyavroc 0.7.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.