Messente avatar logo

Messente API official python library

Bartlomiej Kurek

30 Nov 2016 -

5 min read

Bartlomiej Kurek

30 Nov 2016

-

2 min read

Our collection of API libraries now include official Python language support.
Among the official and community contributed development tools Messente now provides official messente-python library compatible with both Python2 and Python3.

The library is distributed via PyPI and can be installed simply with:
pip install messente-python

messente-python is open-source and resides on GitHub.

Currently supported Messente services are:
To see it in action, let's take a simple example of sending sms:
import messente

api = messente.Messente(
    username="api_user",
    password="api_password"
)

response = api.sms.send({
    "to": "+372123456789",
    "from": "Server 2",
    "text": "Nginx restared at 10:32"
})

if response.is_ok():
    print("SMS Sent, id", response.get_sms_id())
else:
    print("Could not send SMS", response.get_full_error_msg())
Every API call returns a response object that provides utility methods for checking the status, error codes, obtaining the result of a performed action and translating the errors into meaningful messages.

For full documentation please visit GitHub page.
It's also worth mentioning that messente-python library comes with a list of example programs demonstrating the use of all the supported API calls.

The second Payment Services Directive (PSD2) impact: Read the full report.


Bartlomiej Kurek

Software engineer




We're here to help you connect with your customers. Let's start talking.

Email again:

Further reading

Startup Conferences: What’s the point? (Slush 2017)

20 Oct 2017

With Slush coming up in about a month, it’s a good time ponder the purpose of...

Yuriy Mikitchenko

2 min read

The economics behind undelivered, failed SMS messages    

17 Oct 2017

The cost and full impact of undelivered or failed messages isn’t immediately clear. The financial impact is not...

Uku Tomikas

2 min read

Fraud and Security: 2FA Considerations for PSD2

10 Oct 2017

The second Payment Services Directive (PSD2) is less than three months away from...

Raili Liiva

2 min read

Tools to avoid breaking the budget with SMS - Part 2

03 Oct 2017

In a previous blog post we discussed a few tools to help avoid breaking the budget...

Uku Tomikas

2 min read