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

Uploaded Python 3

File details

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

File metadata

  • Download URL: e164_python_sdk-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 353ce4e76bd0e5e6ec4ff98bee6df760eec281139362ce8efd86dc395df47b87
MD5 2b218f8149761e7390aa7f9be3760650
BLAKE2b-256 d936d0291c823018bd902c010417ba371ede6fc201e3dc5ed5f18b748c1be624

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for e164_python_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c729d7994674926b92c1d0594bd8e00a7689eee573d9570091b4862182f5c360
MD5 565025ad7300ff469430811fdde57b55
BLAKE2b-256 23258bd39f699b67aaaf74be952255a8ee6db18a7f628222764a95ce83450f1e

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