Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexmo Client Library for Python

Installation | Usage | Examples | License

This is the Python client library for Nexmo's API. To use it you'll need a Nexmo account. Sign up for free at nexmo.com.

Installation

To install the Python client library using pip:

$ pip install nexmo

Alternatively you can clone the repo or download the source.

Usage

Specify your credentials using the NEXMO_API_KEY and NEXMO_API_SECRET environment variables; import the nexmo package; and construct a client object. For example:

import nexmo

client = nexmo.Client()

Alternatively you can specify your credentials directly using the key and secret keyword args:

import nexmo

client = nexmo.Client(key='YOUR-API-KEY', secret='YOUR-API-SECRET')

Examples

Sending A Message

Use Nexmo's SMS API to send an SMS message.

Call the send_message method with a dictionary containing the message parameters. For example:

import nexmo

client = nexmo.Client(key='YOUR-API-KEY', secret='YOUR-API-SECRET')

client.send_message({'from': 'Python', 'to': 'YOUR-NUMBER', 'text': 'Hello world'})

License

This library is released under the MIT License

About

Nexmo Server SDK for Python. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages