Registry / communication / vonage-network-number-verification

vonage-network-number-verification

JSON →
library1.0.2pypypi✓ verified 84d ago

The `vonage-network-number-verification` Python library (version 1.0.2) provides a client for interacting with the Vonage Number Verification Network API. It enables programmatic access to verify phone numbers at a network level, offering details like reachability and porting status. This package acts as a specialized client, relying on the core `vonage` Python SDK (versions `>=4.0.0, <5.0.0`) for underlying API communication and authentication. While the main `vonage` SDK sees frequent updates, this specific client package has a less frequent release cadence, with its latest version (1.0.2) released on 2023-09-22.

pip install vonage-network-number-verification
INSTALL
IMPORT
SIG · VONAGE-NETWORK-NUM
V
vonage-network-number-verification
communicationpythonv1.0.2
Install
4.8s avg
Import
Disk
47MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 48.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 4.8s · import 0.000s · 48MB
47MB installed
● package 47MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NetworkNumberVerification
from vonage_network_number_verification import NetworkNumberVerification
from vonage_network_number_verification import Client

This quickstart demonstrates how to initialize the Vonage Network Number Verification client and make a request to verify a phone number. It requires your Vonage API Key and Secret, which are used to initialize the underlying `vonage.Client` instance. The response contains various network-level details about the number.

import os from vonage import Client as VonageCoreClient from vonage_network_number_verification import Client as NumberVerificationClient from vonage_network_number_verification.models import VerifyNumberRequest # Your Vonage API key and secret VONAGE_API_KEY = os.environ.get("VONAGE_API_KEY", "YOUR_API_KEY") VONAGE_API_SECRET = os.environ.get("VONAGE_API_SECRET", "YOUR_API_SECRET") # Initialize the core Vonage client (required by the number verification client) vonage_client = VonageCoreClient(key=VONAGE_API_KEY, secret=VONAGE_API_SECRET) # Initialize the Network Number Verification client nv_client = NumberVerificationClient(vonage_client=vonage_client) # Define the request to verify a number request_body = VerifyNumberRequest( type="phone", # Required: 'phone' number="447700900000" # Required: The phone number to verify ) try: # Make the API call response = nv_client.post_verify_number(request_body) # Print the raw response for inspection print(f"\nNetwork Number Verification Response:\n{response.model_dump_json(indent=2)}") # Access specific fields if response.request_id: print(f"\nRequest ID: {response.request_id}") if response.port_id_check_status: print(f"Port ID Check Status: {response.port_id_check_status}") if response.reachability_status: print(f"Reachability Status: {response.reachability_status}") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingThis package relies on `vonage >= 4.0.0, < 5.0.0`. If the main `vonage` SDK is updated to a `5.x.x` version (or newer major version), this package may become incompatible or break due to API changes in the underlying dependency.
fix
Before upgrading the main `vonage` SDK to a new major version, check for a compatible `vonage-network-number-verification` release or consult the official documentation for compatibility notes.
affects: < 1.0.3 (potentially all current versions)
gotchaDo not confuse `vonage-network-number-verification` with `vonage-number-insight`. They are distinct Vonage APIs serving different purposes. Number Insight provides general information about a number (carrier, type, roaming status), while Network Number Verification provides network-level checks like number reachability and porting status.
fix
Ensure you are using the correct API for your specific use case. If you need general number data, use `vonage-number-insight`. For network status, use `vonage-network-number-verification`.
affects: All versions
gotchaThe `vonage-network-number-verification` client requires an initialized `vonage.Client` instance, which primarily uses API Key and Secret for authentication. This differs from some other Vonage APIs (e.g., Voice, Video) that frequently use JWT authentication.
fix
Always initialize the core `vonage.Client` with `key` and `secret` parameters when creating an instance for `vonage-network-number-verification`. Ensure these credentials have the necessary permissions for the Number Verification Network API.
affects: All versions
Upgrade
Version history
1.0.2latest on PyPI · released Nov 29, 2024
Audit
Dependencies
vonagerequiredRequired for underlying API client functionality, authentication, and communication with Vonage APIs.
Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
vonage-network-number-verification — pip install vonage-network-number-verification · libregistry