AvroObject’s documentation!
Links
Examples
AvroObject
class avro_object.AvroObject(data, schema=None)
Helper class for AVRO objects
-
Parameters
-
data (JSON as string*, Dict object, Filename/URL as string with JSON content, *Avro as bytes with binary serialized content) – (un)serialized data
-
schema (JSON as string*, Dict object, *Filename/URL as string with JSON content) – Avro schema
-
property data()
-
Returns
Native unserialized data
-
Return type
dict
property json()
-
Returns
JSON serialized data
-
Return type
str
property last_error()
-
Returns
Last error message
-
Return type
str
property ok()
-
Returns
Avro Object successfull creation
-
Return type
bool
property origin()
-
Returns
Source of data (str, file, URL, Avro binary)
-
Return type
str
property schema_origin()
-
Returns
Source of schema (str, file, URL)
-
Return type
str
to_avro()
-
Returns
AVRO bytes serialized data (when schema is informed)
-
Return type
bytes
to_json()
-
Returns
JSON serialized data
-
Return type
str
AvroTools
class avro_object.AvroTools()
Tools for AvroObject
classmethod add_fetch_method(method)
Add custom fetch method
-
Parameters
method – (str source) -> (bool Success, str JSON/Error, str origin name)
-
Returns
Success
-
Return type
bool
static create_schema(data: dict, name: str, namespace: str = 'namespace.test', doc: str = None)
Create schema from object (incomplete)
-
Parameters
-
data – source object
-
name – Name of schema
-
namespace – Namespace of schema
-
doc – Documentation
-
-
Returns
Schema
-
Return type
dict
classmethod fetch_json(source: str)
Load JSON string from various medium and returns as string
-
Parameters
source – string JSON, file name, URL, another registered source by add_fetch_method
-
Return type
tuple (bool Success, str JSON or error message, origin)
static fetch_json_file(source: str)
Try to parse json from file
-
Parameters
source – str with file name
-
Returns
(bool Success, str JSON or Error, origin)
static fetch_json_url(source: str)
Try to parse json from url
-
Parameters
source – str with URL
-
Returns
(bool Success, str JSON or Error, origin)
classmethod reset_fetch_methods()
Resets default fetch methods (File, URL and string)
Author
©2019, Guionardo Furlan
Metadata
Release files for avro-object-furlan 0.9.1
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 |
|---|---|---|---|---|
| avro-object-furlan-0.9.1.tar.gz | 5.8 kB | Without provenance | Details for avro-object-furlan-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| avro_object_furlan-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for avro_object_furlan-0.9.1-py3-none-any.whl |
Total release size: 13.5 kB
Release files / avro-object-furlan-0.9.1.tar.gz
| Download URL | avro-object-furlan-0.9.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36a59f7a22947bd103bd765c6ed7b831f08500620bcd7f8ad0d61c75bcad1e50
|
|
BLAKE2b-256 checksum How to use checksums |
c8d466f2e9bffbecc4349daf7d44085f46a1a4eaff393ffb4bc6455400cfbc9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / avro_object_furlan-0.9.1-py3-none-any.whl
| Download URL | avro_object_furlan-0.9.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abd2165ac5eea1933c92d7d440da2a855d9b3099a1317a3a444b9ab5ceea952e
|
|
BLAKE2b-256 checksum How to use checksums |
084a3c7197c2324cc1621e9565dbf3d832bea47de120a3ec4ddf3520aa770d4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for avro-object-furlan 0.9.1
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.