Skip to main content

Vonage Numbers Package

This package contains the code to use Vonage's Numbers API in Python.

It includes methods for managing and buying numbers.

Usage

It is recommended to use this as part of the main vonage package. The examples below assume you've created an instance of the vonage.Vonage class called vonage_client.

List Numbers You Own

numbers, count, next_page = vonage_client.numbers.list_owned_numbers()
print(numbers)
print(count)
print(next_page)

# With filtering
from vonage_numbers import ListOwnedNumbersFilter
numbers, count, next_page = vonage_client.numbers.list_owned_numbers(
    ListOwnedNumbersFilter(country='GB', size=3, index=2)
)

numbers, count, next_page_index = vonage_client.numbers.list_owned_numbers()
print(numbers)
print(count)
print(next_page_index)

Search for Available Numbers

from vonage_numbers import SearchAvailableNumbersFilter

numbers, count, next_page_index = vonage_client.numbers.search_available_numbers(
    SearchAvailableNumbersFilter(
        country='GB', size=10, pattern='44701', search_pattern=1
    )
)
print(numbers)
print(count)
print(next_page_index)

Buy a Number

from vonage_numbers import NumberParams

status = vonage_client.numbers.buy_number(NumberParams(country='GB', msisdn='447007000000'))
print(status)

Cancel a number

from vonage_numbers import NumberParams

status = vonage_client.numbers.cancel_number(NumberParams(country='GB', msisdn='447007000000'))
print(status)

Update a Number

from vonage_numbers import UpdateNumberParams

status = vonage_client.numbers.update_number(
    UpdateNumberParams(
        country='GB',
        msisdn='447007000000',
        mo_http_url='https://example.com',
        mo_smpp_sytem_type='inbound',
        voice_callback_type='tel',
        voice_callback_value='447008000000',
        voice_status_callback='https://example.com',
    )
)

print(status)

Metadata

Release files for vonage-numbers 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vonage-numbers 1.0.5
File Size Uploaded Provenance Actions
vonage_numbers-1.0.5.tar.gz 6.7 kB Without provenance Details for vonage_numbers-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vonage-numbers 1.0.5
File Interpreter ABI Platform Actions
vonage_numbers-1.0.5-py3-none-any.whl Python 3 none any Details for vonage_numbers-1.0.5-py3-none-any.whl

Total release size: 14.0 kB

Release files / vonage_numbers-1.0.5.tar.gz

Download URL vonage_numbers-1.0.5.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d5eaa360fdaaebc833759492732d8d11b16548ca799d2d93b9822b351836e519
BLAKE2b-256 checksum
How to use checksums
6341fc363b49e317245b627b62ef7b14c2323f1d4ff973dad4b7336c3d8b0436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.3

Release files / vonage_numbers-1.0.5-py3-none-any.whl

Download URL vonage_numbers-1.0.5-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca4232e80fc6bb1a273dece9a49a4aac3fed5110424091bf1702014aa537f401
BLAKE2b-256 checksum
How to use checksums
fb053dabd059b309de4d277e8c07e1b0de9f9f17f96401d26514b68289fb383e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.3

Security for vonage-numbers 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page