Next Generation Python Helper Library Release

April 11, 2017
Written by

PythonLibrary

Today, we are excited to announce the general availability of our next-generation Python helper library.

The approach

The Python library offers new functionality and takes advantage of modern Python language features. We’ve rebuilt it from the ground up based on the developer feedback we received from you.

This release is the latest addition to the next-generation SDK family. We recently released new versions of PHP, Java, and .NET/C#. To learn more about our novel approach to make the helper libraries more consistent, enable faster iteration, and improve the libraries by having a shared foundation across languages, check out our blog post that introduced the next generation Twilio Helper Libraries.

The next language that we will release is Node, but first things first, let’s take a deeper look at the new features of the Python library first.

What’s new

  • Python version support: Works with version 2.7 and up, including Python 3.x versions.
  • Simplified import: There’s only 1 object you need to import.
  • Accessing resources: The new library makes Twilio API subdomains (Lookups, Conversations, Monitor, etc.) first-class citizens. You can now also pin your interactions to the Twilio API to specific versions of that API.
  • Listing resources: There are now 2 ways to get a list of resources – list and stream.
    • list returns an Array that contains the Instances of resources.
    • stream returns a generator that efficiently pages the list of resources for you.
  • Paging: Both list and stream automatically handle paging for you!
  • Proper types: Resources now serialize/deserialize appropriate types
  • Configurable HTTP client: You can now plug your own HTTP client into the Twilio client!

How to get started

The are several great resources to help you to get started with the new library:

  • The Getting Started Guide that covers installation and how to send your first message.
  • Our guides and tutorials provide code samples for several use cases.
  • The auto-generated library docs are a helpful reference documentation.
  • The Migration Guide is a great resource, especially if you are familiar with the previous generation. It covers some of the new features and highlights the differences.

 

The new libraries come in two lines based on our Versioning Strategy:

  • The ’mainline’ that contains our GA products and is the most stable release
  • ‘edge’ which includes new features that are in Developer Preview or Beta.

Deprecation

New functionality will only be added to the new library (Python Helper Library 6.x). The old library (5.x) will be officially supported until 7/3/2017. After that day, Twilio will stop providing bug fixes and Support might ask you to upgrade before debugging issues. Learn how to migrate your existing application.

Next-gen Release Candidates

With the latest release of the Python, we are approaching the home stretch of updating all supported languages libraries.

We’d love your get your feedback on our other release candidates. They are available on Github now and we are interested in your issue tickets and pull requests.

  • Node.js is the next language to get released.
  • Followed by Ruby.

 

We can’t wait to see what you build!