CuriousLearner / django-phone-verify

A Django app to support phone number verification using security code / One-Time-Password (OTP) sent via SMS.
https://www.sanyamkhurana.com/django-phone-verify/
GNU General Public License v3.0
257 stars 61 forks source link

phonenumbers should be optional dependecy #42

Open ar7n opened 4 years ago

ar7n commented 4 years ago

It will allow to choose between phonenumbers and phonenumberslite, how it is done in phonenumber_field.

Optional twilio and nexmo dependencies also make sense.

CuriousLearner commented 4 years ago

What are the advantages of supporting phonenumberslite?

phonenumbers is there because we wanted to validate phone_numbers and not to have those validations handled in this library.

ar7n commented 4 years ago

size of phonenumberslite package is 5Mb vs 32.8M of phonenumbers. Also phonenumbers has larger memory footprint. Validation works same in both packages.

vaughnkoch commented 10 months ago

Thanks for this useful package! I agree - dependencies like twilio and nexmo should be optional. This is especially important for docker images, e.g. in my image:

148K nexmo
28M twilio
48M phonenumbers
CuriousLearner commented 7 months ago

Thanks for the input. I agree.

There are two things here, The first is making the backend dependencies optional depending on which SMS backend developer opts for. I will cover this in #87

The other one is to replace phonenumbers with phonenumberslite which I'll handle in another PR, unless of course anyone wants to put in a PR for this :)

Thanks again! :D