marshmallow icon indicating copy to clipboard operation
marshmallow copied to clipboard

Add type mapping from IP* fields to ipaddress

Open liberforce opened this issue 5 years ago • 1 comments

See https://github.com/lovasoa/marshmallow_dataclass/issues/114

IP, IPv4 and IPv6 fields have no mapping declared in the TYPES_MAPPING dict. At least IPv4 and IPv6 could be mapped to respectively ipaddress.IPv4Address and ipaddress.IPv6Address to transparently handle these data types with annotations. I'm unsure on how to do it for IP.

liberforce avatar Nov 24 '20 17:11 liberforce

Seems reasonable to add those to TYPE_MAPPING. PRs welcome!

sloria avatar Mar 28 '21 19:03 sloria