GithubHelp home page GithubHelp logo

malikovss / eskiz-sms Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 4.0 152 KB

python package for eskiz.uz/sms

Home Page: https://pypi.org/project/eskiz-sms/

License: MIT License

Python 100.00%
python eskiz-sms

eskiz-sms's Introduction

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())

eskiz-sms's People

Contributors

malikovss avatar mlkvdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eskiz-sms's Issues

Refreshing token

I assumed that if token expires, 500 status_code will be returned. But they are returning 401
And token can't be refreshed once it expires.
This issue will be fixed in next release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.