Skip to main content

No project description provided

Project description

Retarus Python SDK

The official Python SDK provided by Retarus to contact our messaging services.

Installation

Install from PyPi using pip, a package manager for Python. Minimum python version 3.8.

pip install retarus-sms

Or you can download the source code for the Retarus python SDK and then build it with following command:

git clone https://github.com/retarus/retarus-python-sms
cd retarus-python
pip install .

Usage

The Python SDK implements different services that are offered by Retarus. Each service provides a small variety of examples to get a better understanding of how to use their functionality. The examples can be found in the examples directory sorted by each service. Furthermore, you can check out our OpenAPI documents on the interfaces here: https://developers.retarus.com

Configuring the SDK

First, you need to configure the SDK with your details.

from retarus.commons.configuration import Configuration


Configuration.set_auth(your_user_id, your_password)

Each service implements a client, so simply call "retarus.your_service" and create a client that provides your functionality.

from retarus.sms.client import SmsClient


sdk = SmsClient(True)

Please note that True will use the SDK in an asynchronous way while False will work in a synchronous setup.

Send a SMS

To send a sms, first setup the SDK like described above. For your credentials, we recommend setting up an .env file. It should also contain the customer number.

Please note: Using the API will only work with valid credentials.

After that, you can execute the examples 'send_jobs_async.py' (for asynchronous processing) or 'send_jobs_sync.py' (for synchronous processing) with Python. As a result, you should get a message that reports back the ID of the created job.

In the sms examples folder, you will also find examples on how to retrieve the status of a sms job. The examples contain a little documentation on their own.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retarus-sms-1.0.1.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

retarus_sms-1.0.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file retarus-sms-1.0.1.tar.gz.

File metadata

  • Download URL: retarus-sms-1.0.1.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for retarus-sms-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2dc8436512b0146c92f483a10b34d5c88601534fb5f2550ab089ec00bc5edb7c
MD5 6252a2c310f437fc136ec6e0a2e38297
BLAKE2b-256 fa219252577d90dd6def99ce4c29dfaa1ba41999f460fc9eb877299ce421d521

See more details on using hashes here.

File details

Details for the file retarus_sms-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: retarus_sms-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for retarus_sms-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5079e69b726c0b8bb21761b0d67cc611a4d137d1e1658e210c33ea44c9c62bd
MD5 51d86fbcb31d9629456fae67dd7e378a
BLAKE2b-256 7355202cdb68a0a05c4f2796ed81cf6016cfef378330c41bdc931e49fefa623a

See more details on using hashes here.

Supported by

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