Skip to main content

Validation of the email or international or local telephone number

Project description

PHONE & EMAIL Verifier

Description

Validation of the email and international or local telephone number.

Install

If you install with

pip install phone_email_verifier

1 : Download here https://github.com/Bogro/phone_email_verifier/blob/develop/phone_email_verifier/code.txt and drop it at the root of your project.

2 : Add the phone code dictionary path in the .env of your project.

#.env
DICT_CODE="dict_name.txt"

Note: This file is important for checking phone numbers

For direct downloads on github you do not need to follow the process above

Usage

E-mail

from phone_email_verifier.email_verifier import email_verifier as email_v


email = email_v()

email_list = ['test@mail.tx', 'demo@mail.test', 'e.mail@mailer.com']

>>> email.set_email_list(email_list) 

or

>>> email.set_email_in_file(file_name)

>>> email.exec()

{'OK': ['test@mail.tx', 'e.mail@mailer.com'], 'ERROR': ['demo@mail.test']}

Remarque:

It is possible to make a restriction on the country by making:

>>> email.set_email_list(email, 'FR')

or

>>> email.set_email_in_file(file_name, 'FR')

and this will make a filter on any email not ending

.fr

if the file used is a CSV, indicate the column of email

>>> email.set_email_in_file(file_name, colum=0)

or

>>> email.set_email_in_file(file_name, 'FR', 0)
Reamarque
Les types de fichier utilisable sont:
CSV et TXT

Phone

from phone_email_verifier.phone_verifier import phone_verifier as phone_v

phone = phone_v()

phone_list = ['+22547000000', '+225-47-00-00-00', '+225 47 00 00 00 00', '+33 00 25 00 11', '47 02 00 00']

simple use

>>> filter.set_phone_list(phone_list)

or

>>> filter.set_phone_in_file(file_name)

>>> filter.exec()

{'OK': ['+22547000000', '+22547000000', '+2254700000000', '+3300250011'], 'ERROR': ['47020000']}

Advance use

It is possible to make a precision with the name of the country and is identifying code

>>> filter.set_phone_list(phone_list, 'FR', '+33')

or

>>> filter.set_phone_in_file(name_list, 'FR', '+33', colum=0) # colum is column of numbers

>>> filter.exec()

{'OK': ['+3300250011'], 'ERROR': ['47020000', '+22547000000', '+22547000000', '+2254700000000']}

It is important to specify the number column when the file is a csv file.

For code dictionary identify countries

You can add or reduce the list according to your usage. I advise you to reduce according to your use, to make fast execution

How to add

To add, go to the line and:

The name of the country, abbreviation of the name, identify code (+33 | 33 | 0033), length of the number without the identified code and the local code, the local code if it exists,

Example:

Country name

France

Abbreviation country name

FR

Identify code

+33|33|0033

Length phone number

8

Note:

If the number can be several lengths, add it in ascending order with " | " as separator

6|7|8|9

Local code

s'il existe

0

Note: if there are more than one, add with " | " as separator

0|1|2

if it does not exist the line ends with a

','

in the end we have this line

France,FR,+33|33|0033,8,0,

Final note

* The spaces between the values ​​are forbidden
* The finished line always with a ";

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phone_email_verifier-0.0.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phone_email_verifier-0.0.4-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file phone_email_verifier-0.0.4.tar.gz.

File metadata

  • Download URL: phone_email_verifier-0.0.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for phone_email_verifier-0.0.4.tar.gz
Algorithm Hash digest
SHA256 84c712941e8b16e577de36d2158efe8dc015a1ba17a2f92c2252d8dd20a15dfe
MD5 d38b431b0584bd1ca58297d50b7f2a20
BLAKE2b-256 16d1e0db0ed9a1a2464d5e485f49c46b02ebb954d3011dc22eab7cbbf8bac322

See more details on using hashes here.

File details

Details for the file phone_email_verifier-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: phone_email_verifier-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for phone_email_verifier-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 67d03a27ce84e9a8221dc9dcac354711888eb7bcc140e3163327031267bb6b7c
MD5 97fd0cf96b48f371eba4057bd3fb6282
BLAKE2b-256 47b089dbb313ba473a92571e9f75f8ef8fc1d673074a34c6d69264e32a8925e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page