Vonage Utils Package
This package contains utility code that is used by the Vonage Python SDK and other related packages.
The utils module provides two utility functions: format_phone_number and remove_none_values. It also exposes the VonageError type that other exceptions related to Vonage SDK inherit from. This can also be accessed via the main SDK module with vonage.VonageError.
Usage
from utils import format_phone_number, remove_none_values
# Use format_phone_number
try:
formatted_number = format_phone_number('123-456-7890')
print(formatted_number)
except (InvalidPhoneNumberError, InvalidPhoneNumberTypeError) as e:
print(e)
# Use remove_none_values to remove null values from a Vonage API response when converting to a dictionary with the `asdict` method
from dataclasses import asdict
vonage_api_response = vonage.api.method()
cleaned_dict = asdict(my_dataclass, dict_factory=remove_none_values)
print(cleaned_dict)
Metadata
Release files for vonage-utils 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vonage_utils-1.1.4.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vonage_utils-1.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / vonage_utils-1.1.4.tar.gz
| Download URL | vonage_utils-1.1.4.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
950b802dc93f8440717fba6e183d2ae39f6e0316dc19a3f1f41ca81f9af24bf8
|
|
BLAKE2b-256 checksum How to use checksums |
26cb3f584cb37639f93fd6a47076d272ecab1f49e8231d1bf6e77566fe58232b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.4
|
Release files / vonage_utils-1.1.4-py3-none-any.whl
| Download URL | vonage_utils-1.1.4-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
438b0bc8da25e8026ec6789cd9a113b4f41636c70c4d84b2d9ab0e92ed23a665
|
|
BLAKE2b-256 checksum How to use checksums |
c544dbd70b0fbf7b8c025209f4ec708ca67c45796d2ee5d23ecc222d39751058
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.4
|