Skip to main content

Python Server SDK for using Vonage APIs

Project description

Vonage Python SDK

The Vonage Python SDK Package vonage provides a streamlined interface for using Vonage APIs in Python projects. This package includes the Vonage class, which simplifies API interactions.

The Vonage class in this package serves as the main entry point for using Vonage APIs. It abstracts away complexities with authentication, HTTP requests and more.

For full API documentation refer to the Vonage Developer documentation.

Installation

Install the package using pip:

pip install vonage

Usage

from vonage import Vonage, Auth, HttpClientOptions

# Create an Auth instance
auth = Auth(api_key='your_api_key', api_secret='your_api_secret')

# Create HttpClientOptions instance
# (not required unless you want to change options from the defaults)
options = HttpClientOptions(api_host='api.nexmo.com', timeout=30)

# Create a Vonage instance
vonage = Vonage(auth=auth, http_client_options=options)

The Vonage class provides access to various Vonage APIs through its properties. For example, to use methods to call the SMS API:

from vonage_sms import SmsMessage

message = SmsMessage(to='1234567890', from_='Vonage', text='Hello World')
response = client.sms.send(message)
print(response.model_dump_json(exclude_unset=True))

You can also access the underlying HttpClient instance through the http_client property:

user_agent = vonage.http_client.user_agent

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vonage-4.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

vonage-4.1.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file vonage-4.1.1.tar.gz.

File metadata

  • Download URL: vonage-4.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.4

File hashes

Hashes for vonage-4.1.1.tar.gz
Algorithm Hash digest
SHA256 62678d772febb97b1e095f82698e21d7fed0bcf0cc1dc7c2cdad0d914a9f20a9
MD5 e6a8e5b7270495331284396705663f99
BLAKE2b-256 a6ee0e2eaeda962fa955f428fade4228d34a6a29d47ecf36f9c6cdb3c7c0a722

See more details on using hashes here.

File details

Details for the file vonage-4.1.1-py3-none-any.whl.

File metadata

  • Download URL: vonage-4.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.4

File hashes

Hashes for vonage-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e604ac8a9c0eac648b2492f385db5ed264e7c4b185970614f9b626b95cd6054
MD5 a9843b885d503edb150157dcb18f70a2
BLAKE2b-256 7ca7a2f304d01318b58fef7096c8abde9f5f3f9299b8f8a5eba2e38051f39266

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page