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.8.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vonage-4.8.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vonage-4.8.0.tar.gz
Algorithm Hash digest
SHA256 a3e9387038070bd4b25fdaf350a5e6e1bac5ed06f240116e53b01a4e4aaf6a04
MD5 f6011634784fb08ca0485b36a000ce3c
BLAKE2b-256 3e7f2fb4ef7cbd5086d56c9482e02726b50e86f412d0a8e47f7f1024973a7855

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vonage-4.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5de60c466032032ddcc96a5b7f7d19063829e5cad7ea4e65fe3412283ef6d38a
MD5 5f1720e5d027482dbdc8728baa245411
BLAKE2b-256 3b94e8758ad29ec9986c0b231950234f6c6e2abbbb59a54c0c84165e65949e3f

See more details on using hashes here.

Supported by

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