Skip to content

malikovss/eskiz-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eskiz-sms

eskiz-sms package for eskiz.uz/sms

Downloads Downloads Downloads

⚠️ Please use the latest version. In previous versions, there are a lot of mistakes, bugs

Installation

pip install eskiz_sms

Quickstart

from eskiz_sms import EskizSMS

email = "[email protected]"
password = "your_password"
eskiz = EskizSMS(email=email, password=password)
eskiz.send_sms('998991234567', 'message', from_whom='4546', callback_url=None)

Using pre-saved token

from eskiz_sms import EskizSMS

your_saved_token = 'eySomething9320'
eskiz = EskizSMS('email', 'password')
eskiz.token.set(your_saved_token)

eskiz.send_sms('998901234567', message='message')

Saving token to env file

If you set save_token=True it will save the token to env file

from eskiz_sms import EskizSMS

eskiz = EskizSMS('email', 'password', save_token=True, env_file_path='.env')
# Don't forget to add env file to .gitignore!
response = eskiz.send_sms('998901234567', message='message')

Async usage

import asyncio

from eskiz_sms.async_ import EskizSMS


async def main():
    eskiz = EskizSMS('email', 'password')
    response = await eskiz.send_sms('998901234567', 'Hello, World!')


asyncio.run(main())