Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 2.7 KB

File metadata and controls

68 lines (45 loc) · 2.7 KB

Nexmo Client Library for Python

PyPI version Build Status

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.

The NG Manifesto

The ng branch (stands for Next Generation) is an experimental branch to play with ideas about where we want the library to go. The principles used to guide this branch are:

  • Pythonic: No need to use dicts where a well-designed class is better. Sensible defaults. Arguments provided as parameters to functions.
  • Python 3 Only: We're not going to compromise on the library by supporting Python 2. At the moment we're targeting Python 3.5+
  • Type Hints: Type hints can really help users in using the library correctly, so the public interface will be heavily annotated with type hints.
  • A Rich Client Library: Some of Nexmo's older APIs have slightly crufty data structures. This library will convert between those values and the expected native Python types. Abstractions will be provided for API data structures such as webhook payloads and NCCO structures.
  • Async First: For a library to work as both sync and async with asyncio, it needs to be async-first, with a synchronous wrapper.
  • Optional Integration With Frameworks: Some light integration with frameworks such as Django, Flask & Sanic can go a long way. We'll pave the cowpaths to make everyone's lives easier.

Installation

To install the Python client library using pip:

pip install nexmo

Alternatively you can clone the repository:

git clone git@github.com:Nexmo/nexmo-python.git

Usage

Let's shake this thing up!

Contributing

We ❤️ contributions! But if you plan to work on something big or controversial, please contact us first!

We recommend working on nexmo-python with pipenv. The following command will install all the Python dependencies you need to run the tests:

make install

The tests are all written with pytest. You run them with:

make test

License

This library is released under the MIT License