stefanfoulis / django-phonenumber-field

A django model and form field for normalised phone numbers using python-phonenumbers
MIT License
1.48k stars 318 forks source link

Pydantic Serialization #596

Open bigusef opened 7 months ago

bigusef commented 7 months ago

Hi, are there any plans to support serialization and deserialization with Pydantic. Recently I using different framework alternative to DRF, and all these framework using Pydantic to serialize and deserialize python object specially on handling HTTP request and response. so my question is are there any plans to provide custom type like serializerfields.PhoneNumberField

francoisfreitag commented 7 months ago

Hi,

I don’t mind shipping a helper for Pydantic, it makes sense for this project to offer bridges to popular libraries. Feel free to open a pull request with the helper, and a bunch of tests to exercise its behavior. :+1: