Skip to main content

Async Python SDK of Eskiz.uz SMS Gateway

Project description

Eskiz SMS Gateway Python SDK (BETA)

GitHub Release GitHub issue custom search in repo PyPI - Downloads Test Suite

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_dict to True, all responses will be returned as dict

More Examples

In examples diriectory: see

Documentation

https://documenter.getpostman.com/view/663428/RzfmES4z

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

eskiz_sms_client-1.0.5.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eskiz_sms_client-1.0.5-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file eskiz_sms_client-1.0.5.tar.gz.

File metadata

  • Download URL: eskiz_sms_client-1.0.5.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-1021-azure

File hashes

Hashes for eskiz_sms_client-1.0.5.tar.gz
Algorithm Hash digest
SHA256 72065e3ffcf1cefc401ca10c5649b3fa4c99ac15d677d1796d2cd38b0f2c2a58
MD5 31960d2e2af47feed5420eb48b7f9177
BLAKE2b-256 ade8f9ba8af7312af83987ee022463d79013a41ff96f499b30e01d16d25cd693

See more details on using hashes here.

File details

Details for the file eskiz_sms_client-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: eskiz_sms_client-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-1021-azure

File hashes

Hashes for eskiz_sms_client-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b92627b2fc9645ac0bc04812fb62c9ce693499988375d6f826044cf296a7e5e3
MD5 8909ee1d1667e389c5bd0d448fb8c289
BLAKE2b-256 8e958278af36531f6d753e1ca11ceb10e932699f1e428dca9f0ff57ca3c34351

See more details on using hashes here.

Supported by

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