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-3.99.0a12.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

vonage-3.99.0a12-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file vonage-3.99.0a12.tar.gz.

File metadata

  • Download URL: vonage-3.99.0a12.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for vonage-3.99.0a12.tar.gz
Algorithm Hash digest
SHA256 8890746674aad419f467bdc0a68cd9b3c70bea9657665fc981b590a042cf17ee
MD5 dec4ad4ba9ed4110c2bbd47c3ab2e717
BLAKE2b-256 524ed6a92baf76f0b75473c6a64e34ce9e3573002b6dded497d81ec47cc3034c

See more details on using hashes here.

File details

Details for the file vonage-3.99.0a12-py3-none-any.whl.

File metadata

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

File hashes

Hashes for vonage-3.99.0a12-py3-none-any.whl
Algorithm Hash digest
SHA256 7d0d735e2db5b712544157285028910d2e70d335161b648cabdf8a26034e7fd2
MD5 19a74f25d575373890fb6913cbc098a9
BLAKE2b-256 c826a1ad0a0a1e4a2828835be54072566ee866f77eda84832f86439808d9e52f

See more details on using hashes here.

Supported by

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