Eskiz SMS Gateway Python SDK (BETA)
Features
- Token Management: Auto auth and refresh expired tokens.
- Message Building: Construct messages efficiently with
MessageBuilder. - Token Context Management: Manage token contexts easily for temporary changes.
[!WARNING] We're currently in beta, actively refining our features.
Installation
pip install eskiz-sms-client
Quickstart
Example for auth get token:
import asyncio
from eskiz import SMSClient
async def main():
client = SMSClient()
await client.get_token('test@eskiz.uz', 'password')
print(client.token) # NEW TOKEN
asyncio.run(main())
[!TIP] Enable
SMSClient(log_response=True); all responses will be logged on stdout.
Example for refresh token:
if client.token.is_expired:
await client.refresh_token()
print(client.token) # REFRESHED TOKEN
Example for send SMS:
from eskiz import SMSClient
client = SMSClient(token='TOKEN', as_dict=False)
response = await client.send_sms(
mobile_phone=998991234567,
message="test from sdk"
)
print(response.status) # 'waiting'
# current response as dict
print(response.model_dump())
# { "id": "<id>", "status": "waiting", "message": "Waiting for SMS provider" }
[!TIP] set
as_dicttoTrue, all responses will be returned as dict
More Examples
In examples diriectory: see
Documentation
Metadata
Release files for eskiz-sms-client 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eskiz_sms_client-1.0.5.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eskiz_sms_client-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / eskiz_sms_client-1.0.5.tar.gz
| Download URL | eskiz_sms_client-1.0.5.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72065e3ffcf1cefc401ca10c5649b3fa4c99ac15d677d1796d2cd38b0f2c2a58
|
|
BLAKE2b-256 checksum How to use checksums |
ade8f9ba8af7312af83987ee022463d79013a41ff96f499b30e01d16d25cd693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-1021-azure
|
Release files / eskiz_sms_client-1.0.5-py3-none-any.whl
| Download URL | eskiz_sms_client-1.0.5-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b92627b2fc9645ac0bc04812fb62c9ce693499988375d6f826044cf296a7e5e3
|
|
BLAKE2b-256 checksum How to use checksums |
8e958278af36531f6d753e1ca11ceb10e932699f1e428dca9f0ff57ca3c34351
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-1021-azure
|