Metadata-Version: 2.1
Name: smsaero_api
Version: 2.2.0
Summary: Send SMS via smsaero.ru gate
Home-page: https://smsaero.ru/integration/class/python
Author: Apelt Dmitry
Author-email: apelt.dmitry@gmail.com
License: MIT
Keywords: sms,sendings,hlr,viber,calls,flashcalls
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
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.11
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
Requires-Dist: setuptools
Requires-Dist: requests

# SmsAero Python Api


### Installation:

    $ pip install -U smsaero_api


### Usage:

Get credentials from account settings page: https://smsaero.ru/cabinet/settings/apikey/
    
    SMSAERO_EMAIL = 'your email'
    SMSAERO_API_KEY = 'your api key'
    
    
    def send_sms(phone: int, message: str) -> dict:
        """
        Send sms and return results.
    
                Parameters:
                        phone (int): Phone number
                        message (str): Message to send
    
                Returns:
                        data (dict): API request result
        """
        api = SmsAero(SMSAERO_EMAIL, SMSAERO_API_KEY)
        res = api.send(phone, message)
        assert res.get('success'), res.get('message')
        return res.get('data')
    
    
    if __name__ == '__main__':
        data = send_sms(70000000000, 'Hello, World!')
        pprint(data)
