Skip to main content

A Python SDK package for accessing the e164.com phone number validation API.

Project description

E164 Python SDK

A Python library for handling E.164 formatted phone numbers. This library allows you to validate and retrieve metadata about phone numbers using the e164.com API.

Installation

pip install e164-python-sdk

Usage

Here's a quickstart guide to using the library:

#!/usr/bin/env python3
from e164_python import E164

def main():
    try:
        e164_instance = E164()

        response = e164_instance.lookup("441133910781")

        print(f"{response.prefix}")
        print(f"{response.calling_code}")
        print(f"{response.iso3}")
        print(f"{response.tadig}")
        print(f"{response.mccmnc}")
        print(f"{response.type}")
        print(f"{response.location}")
        print(f"{response.operator_brand}")
        print(f"{response.operator_company}")
        print(f"{response.total_length_min}")
        print(f"{response.total_length_max}")
        print(f"{response.weight}")
        print(f"{response.source}")

    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    main()

Features

  • Validate E.164 formatted phone numbers.
  • Retrieve metadata such as country code, operator, and phone number type.
  • Easy-to-use Python interface.

For more details, refer to the documentation or explore the source code.

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

e164_python_sdk-0.1.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

e164_python_sdk-0.1.6-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file e164_python_sdk-0.1.6.tar.gz.

File metadata

  • Download URL: e164_python_sdk-0.1.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for e164_python_sdk-0.1.6.tar.gz
Algorithm Hash digest
SHA256 54bf5661b9cf5985587857fd85d48ec655c2a22fa75b5f17fcda943dcbf94e83
MD5 e9dee6a9b2dd1fdbfc6dbce49e0513c7
BLAKE2b-256 2e19db323ac59b973eeb42a7c6228ea0c691b718a5c9ae415140083d80f07491

See more details on using hashes here.

File details

Details for the file e164_python_sdk-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for e164_python_sdk-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 144b709e1f8cca9ad88cc26b4d6522347fe3e6842e487f05176ac6cad888ea2b
MD5 b930d5119d24f8a2dc736e697d816feb
BLAKE2b-256 2677c5a669245e3f4b27c89b798359cc5750d1d4200560fcbd20e8a0b1153660

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