Generate avro schemas from python classes. Code generation from avro schemas. Serialize/Deserialize python instances with avro schemas
None
annotation (#433). Closes #424fix: do not generate default dataclass docstrings
fix: datetime model generation
the previous implementation did not roundtrip
feat: render docstrings in generated classes
fix: correct union and optional conversion
test: add avsc -> python -> avsc roundtrip test
fix: properly handle aliases in the model generator
tests: add coverage for single-type unions model generation
Co-authored-by: Maximilian Hils [email protected]
extras
in a correct way. Closes #272 (#273)feat: logicalTypes model generation
feat: logical types model generator
fix: field order, pascal case for class names
fix: add class Meta support
Co-authored-by: Marcos Schroh [email protected]
int
and float
Avro type support (#119)[master c324f60] bump: version 0.57.2 → 0.57.3 2 files changed, 8 insertions(+), 2 deletions(-)
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.
Migration guide for pydantic users: https://marcosschroh.github.io/dataclasses-avroschema/migration_guide/#migration-from-previous-versions-to-0510
None
annotation (#433). Closes #424fix: do not generate default dataclass docstrings
fix: datetime model generation
the previous implementation did not roundtrip
feat: render docstrings in generated classes
fix: correct union and optional conversion
test: add avsc -> python -> avsc roundtrip test
fix: properly handle aliases in the model generator
tests: add coverage for single-type unions model generation
Co-authored-by: Maximilian Hils [email protected]
extras
in a correct way. Closes #272 (#273)commitizen
NameSpaceRequiredException
removed. Close #246 (#253)UUID
type instead of function uuid4
on model generation (#251)pydantic UUID4
when generating pydantic models. (#247)pydantic.condecimal
instead of the custom Decimal
as default value when generate pydantic
modelsavsc
schemas 227
Decimal
fields serialization 222
fake
and nested json serialization 219
metadata
when using faust
records 218
typing.UnionType
support added 212
fastavro
1.7.0 214
TimeMicro
and DateTimeMicro
field types added.typing
issues fixed 186
fastavro
updated to close 184
InvalidMap
exception when a Dict
has not string
keysMeta.schema_doc
to set the schema documentation
alias_nested_items
must have priority order
parse_obj
90
alias_nested_items
for ListField
and DictField
158
fastavro
from 1.4.9 to 1.4.10inflect
from 5.3.0 to 5.4.0types.Enum
replaced by enum.Enum
153
validate
method added to AvroModel
144
get_fields
now returns all rendered fields 134
null
decimals added 130
Available cases:
Case | Example |
---|---|
camelcase | 'foo_bar_baz' # => "fooBarBaz" |
capitalcase | 'foo_bar_baz' # => "Foo_bar_baz" |
constcase | 'FooBarBaz' # => "_FOO_BAR_BAZ" |
lowercase | 'FooBarBaz' # => "foobarbaz" |
pascalcase | 'FooBarBaz' # => "FooBarBaz" |
pathcase | 'foo_bar_baz' # => "foo/bar/baz" |
snakecase | 'FooBarBaz' # => "foo_bar_baz" |
spinalcase | 'FooBarBaz' # => "-foo-bar-baz" |
trimcase | 'FooBarBaz' # => "FooBarBaz" |
uppercase | 'FooBarBaz' # => "FOOBARBAZ |
alphanumcase | 'Foo_123 Bar!' # =>'Foo123Bar' |
int
and float
Avro type support 119
namespaces
on repeated user types with complex types 117
namespaces
for repeated types in arrays and maps 116
namespaces
for repeated types 115
class.__name__
instead of class.__name__.lower()_record
GenericAlias
test in Python 3.9
3.8
and 3.9
in the CI build
schema_name
attribute to SchemaMetadata
deserialization
int
to long
and float
to double
83. Reason:
double
in Cdouble
precision
create_instance=False
should be usedpytz
added as requirementUUID
type fixednull
string with avro null
(json)SelfReferenceField
when is used inn array
and maps
SelfReferenceField
default value fixednull
should not be included when a default value is defined for premitive typestyping.Optional
union fixedtyping.Union
with complex types (sequeces and Dict) fixeddataclasses.field
descriptor addedserialization
fixed for complex typesto_json
method fixed. issue 47
enum
type now is represented by types.Enum
typing.Optional
addedAvro Type | Python Type |
---|---|
arrays | typing.Sequence, typing.MutableSequence |
maps | typing.Mapping, typing.MutableMapping |
Avro Type | Logical Type | Python Type |
---|---|---|
int | date | datetime.date |
int | time-millis | datetime.time |
long | timestamp-millis | datetime.datetime |
string | uuid | uuid.uuid4 |
[master a006020] bump: version 0.57.1 → 0.57.2 2 files changed, 331 insertions(+), 387 deletions(-)