Python client for Playmobile.uz API
Project description
Python client for Playmobile.uz API (aka smsxabar.uz)
This is Python HTTP Client for Playmobile.uz (aka smsxabar.uz) based on httpx.
Playmobile is a SMS broker which allows you to send messages throughout Uzbekistan.
Installation
To install playmobile-client, simply:
$ pip install playmobile-client
This package can be found on PyPI.
Usage
import httpx
import playmobile
client = playmobile.HttpClient(
account=playmobile.Credentials(
username="example",
password="example",
),
base_url=httpx.URL("https://playmobile-example.uz"),
session=httpx.Client(),
)
sms = playmobile.SMS(
id="unique_string",
sender="0001",
recipient="998xx3332211",
text="Hello world!",
)
client.send_sms(sms)
Advanced users can set up HTTPX session with custom parameters. For example:
client = playmobile.Client(
...,
session = httpx.Client(
timeout=httpx.Timeout(timeout=2.0),
),
)
Package also have the test utils which will help you test your service:
- playmobile.generate_sms
- playmobile.generate_error
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for playmobile_client-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae234ed25801c0fc0185fe857d28ec3fc0a514fdb1a8a0931128b2d71075f96 |
|
MD5 | 198e6758f1e350721802056a0e96c76c |
|
BLAKE2b-256 | a2bbdc17b883d01e021fa725ce0a71a92860f13b705affd756842b7615447445 |