Metadata-Version: 2.1
Name: playmobile-client
Version: 0.1.0
Summary: Python client for Playmobile.uz API
Home-page: https://github.com/absolutionsuz/playmobile-client
License: BSD-3-Clause
Keywords: playmobile,smsxabar,client,httpx,requests
Author: Daniil Andreev
Author-email: dandreevv22@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: attrs (>=22.0,<23.0)
Requires-Dist: httpx (>=0.23,<0.24)
Requires-Dist: marshmallow (>=3.18,<4.0)
Project-URL: Repository, https://github.com/absolutionsuz/playmobile-client
Description-Content-Type: text/markdown

# Python client for Playmobile.uz API (aka smsxabar.uz)

This is Python HTTP Client for [Playmobile.uz](https://playmobile.uz) (aka [smsxabar.uz](https://smsxabar.uz))
based on [httpx](https://github.com/encode/httpx).

Playmobile is a SMS broker which allows you to send messages throughout Uzbekistan.

## Installation

To install playmobile-client, simply:

``` bash
$ pip install playmobile-client
```
This package can be found on [PyPI](https://pypi.org).

## Usage

```python
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:

```python
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

