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.4.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.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file e164-python-sdk-0.1.4.tar.gz.

File metadata

  • Download URL: e164-python-sdk-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5346d68922c796957ba86c0f63dd8c1daf1e07dc5a7aed84625913b2edc0af77
MD5 9d39986afb1f5a778a4140882e3ca02f
BLAKE2b-256 0401927282bf56616b485676acd8ea87ccf86a5a5db90234bb92c7335f040a6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for e164_python_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a193e02648eb6745112589e4d1b0bcb622be015e895a107000f59604a9d994d1
MD5 335a8c7cead7fcf9b03b2b36a7611bcf
BLAKE2b-256 d75f9fea720b78309664dc3fc4734d0bb5429eec83c36ddbb24fb3f6e40cf6b1

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