All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Improve error message in unknown type: marcosschroh#88
- dependencies updated
- avro-json serialization with defaults 89
- Correct out-of-spec Avro schemas with typing.Union #87
- Support for decimal logical type added #86
- Default Avro type for Python ints has been changed from
int
tolong
andfloat
todouble
83. Reason:- Integers have unlimited precision
- Floating point numbers are usually implemented using
double
in C - almost all platforms map Python floats to IEEE-754
double
precision
- Allow multiple references to the same class in record relationships
- Correct name generation for nested records 81
- Fake instances generation added
- Deserialization process generate class instances instead a pythn dict
- In order to get a python dict in the deserialiation process the flag
create_instance=False
should be used - Example with usage with kafka drivers added
pytz
added as requirement
UUID
type fixed
- replaced
null
string withavro null
(json) - code improvement
SelfReferenceField
when is used innarray
andmaps
SelfReferenceField
default value fixed
null
should not be included when a default value is defined for premitive types
typing.Optional
union fixedtyping.Union
with complex types (sequeces and Dict) fixed
- documentation of
dataclasses.field
descriptor added - support for aware datetime added
serialization
fixed for complex types
to_json
method fixed. issue 47
- bytes type fixed
- null with Schema Logical Types and Relationships supported
- inheritance approach adopted over composition
- SchemaGenerator class
enum
type now is represented bytypes.Enum
- json payload generated from class instance
- import of SchemaGenetor improved
- Documentation updated
- Serialization/deserialization added
- fixed type support
- Ability to store metadata into fields
- More type checks
- isort package added
- Support
typing.Optional
added
- Union types can be included in sequences types
- Logical types now are allowed in Sequences and Maps
- Union type now allows logical and primitive types
- Support for Sequences and Mappings added
Avro Type | Python Type |
---|---|
arrays | typing.Sequence, typing.MutableSequence |
maps | typing.Mapping, typing.MutableMapping |
- Faust support: Now is possible to generate Avro Schemas from a Faust Records
- Now default values are validated according to the field type
- Avro Union support added
- Support for some logical types
Avro Type | Logical Type | Python Type |
---|---|---|
int | date | datetime.date |
int | time-millis | datetime.time |
long | timestamp-millis | datetime.datetime |
string | uuid | uuid.uuid4 |
- Code refactor: Field have been devided into several field classes to make the code more redeable
- Recursive Schema Relationships:
- Recursive OneToOne relationship added
- Recursive OneToMany relationship added
- Code refator and improvements
- Singular name for array's child name
- Singular name for map's child name
- Singular name for nested relationship OneToMany
- Schema Relationships:
- OneToOne relationship added
- OneToMany relationship added (array and map)
- Enum, Array and Map fields fixed
- Schema Parse tests added using fastavro
- First release